gdb/gdb_curses.h - gdb

Macros defined

Source code

  1. /* Portable <curses.h>.

  2.    Copyright (C) 2004-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef GDB_CURSES_H
  15. #define GDB_CURSES_H 1

  16. #ifdef __MINGW32__
  17. /* Windows API headers, included e.g. by serial.h, define MOUSE_MOVED,
  18.    and so does PDCurses's curses.h, but for an entirely different
  19.    purpose.  Since we don't use the Windows semantics of MOUSE_MOVED
  20.    anywhere, avoid compiler warnings by undefining MOUSE_MOVED before
  21.    including curses.h.  */
  22. #undef MOUSE_MOVED
  23. /* Likewise, KEY_EVENT is defined by ncurses.h, but also by Windows
  24.    API headers.  */
  25. #undef KEY_EVENT
  26. #endif

  27. #if defined (HAVE_NCURSES_NCURSES_H)
  28. #include <ncurses/ncurses.h>
  29. #elif defined (HAVE_NCURSES_H)
  30. #include <ncurses.h>
  31. #elif defined (HAVE_CURSESX_H)
  32. #include <cursesX.h>
  33. #elif defined (HAVE_CURSES_H)
  34. #include <curses.h>
  35. #endif

  36. #if defined (HAVE_NCURSES_TERM_H)
  37. #include <ncurses/term.h>
  38. #elif defined (HAVE_TERM_H)
  39. #include <term.h>
  40. #else
  41. /* On MinGW, a real termcap library is usually not present.  Stub versions
  42.    of the termcap functions will be built from windows-termcap.c.  Readline
  43.    provides its own extern declarations when there's no termcap.h; do the
  44.    same here for the termcap functions used in GDB.  */
  45. extern int tgetnum (const char *);
  46. #endif

  47. /* SunOS's curses.h has a '#define reg register' in it.  Thank you Sun.  */
  48. /* Ditto for:
  49.    -bash-4.2$ uname -a
  50.    AIX power-aix 1 7 00F84C0C4C00  */
  51. #ifdef reg
  52. #undef reg
  53. #endif

  54. #endif /* gdb_curses.h */