From: Eli Zaretskii Date: Fri, 13 Jan 2012 11:17:56 +0000 (+0000) Subject: Avoid compiler warnings in gdb_curses.h on MinGW. X-Git-Tag: gdb_7_4-2012-01-24-release~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc1e2026097e097c58dc0b51d618afb23f3a38c3;p=thirdparty%2Fbinutils-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 50e1391f17b..030b32e9064 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 Pedro Alves * i386-tdep.c (i386_frame_cache_1): Also mark the frame base as 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