From: Eli Zaretskii Date: Fri, 13 Jan 2012 10:44:35 +0000 (+0000) Subject: Avoid compiler warnings in gdb_curses.h on MinGW. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee5106fedefc3b2378641dbfaac0b4c5a919584e;p=binutils-gdb.git Avoid compiler warnings in gdb_curses.h on MinGW. See http://sourceware.org/ml/gdb-patches/2012-01/msg00298.html for more details about the problem. gdb/gdb_curses.h (MOUSE_MOVED) [__MINGW32__]: Undefine before including curses.h. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1a96f26dfd8..0aac2afc357 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-01-13 Eli Zaretskii + + * gdb_curses.h (MOUSE_MOVED) [__MINGW32__]: Undefine before + including curses.h. + 2012-01-12 Jan Kratochvil * configure: Regenerate. diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h index 8b55c2936ef..787f293c7d3 100644 --- a/gdb/gdb_curses.h +++ b/gdb/gdb_curses.h @@ -27,6 +27,14 @@ #elif defined (HAVE_CURSESX_H) #include #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 + purpose. Since we don't use the Windows semantics of MOUSE_MOVED + anywhere, avoid compiler warnings by undefining MOUSE_MOVED before + including curses.h. */ +#undef MOUSE_MOVED +#endif #include #endif