diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-05-02 17:13:39 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-05-02 17:13:39 +0000 |
commit | b31b86a79810e7cf8d84a18525b193498b443ed8 (patch) | |
tree | c1097f4fd3db38a8613328e4d4fc64e42f2c40bd /gdb/gdb_curses.h | |
parent | 1c062060daa660f74c7ebd230f30eebb14cdc9b0 (diff) | |
download | gdb-b31b86a79810e7cf8d84a18525b193498b443ed8.zip gdb-b31b86a79810e7cf8d84a18525b193498b443ed8.tar.gz gdb-b31b86a79810e7cf8d84a18525b193498b443ed8.tar.bz2 |
gdb_curses.h: Undefine KEY_EVENT before including curses
headers. Move "#undef MOUSE_MOVED" before any curses header
inclusion.
Diffstat (limited to 'gdb/gdb_curses.h')
-rw-r--r-- | gdb/gdb_curses.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h index 787f293..242d6e7 100644 --- a/gdb/gdb_curses.h +++ b/gdb/gdb_curses.h @@ -20,13 +20,6 @@ #ifndef GDB_CURSES_H #define GDB_CURSES_H 1 -#if defined (HAVE_NCURSES_NCURSES_H) -#include <ncurses/ncurses.h> -#elif defined (HAVE_NCURSES_H) -#include <ncurses.h> -#elif defined (HAVE_CURSESX_H) -#include <cursesX.h> -#elif defined (HAVE_CURSES_H) #ifdef __MINGW32__ /* Windows API headers, included e.g. by serial.h, define MOUSE_MOVED, and so does PDCurses's curses.h, but for an entirely different @@ -34,7 +27,18 @@ anywhere, avoid compiler warnings by undefining MOUSE_MOVED before including curses.h. */ #undef MOUSE_MOVED +/* Likewise, KEY_EVENT is defined by ncurses.h, but also by Windows + API headers. */ +#undef KEY_EVENT #endif + +#if defined (HAVE_NCURSES_NCURSES_H) +#include <ncurses/ncurses.h> +#elif defined (HAVE_NCURSES_H) +#include <ncurses.h> +#elif defined (HAVE_CURSESX_H) +#include <cursesX.h> +#elif defined (HAVE_CURSES_H) #include <curses.h> #endif |