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.
This commit is contained in:
Eli Zaretskii 2012-01-13 10:44:35 +00:00
parent 763bf0cf3b
commit ee5106fede
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-01-13 Eli Zaretskii <eliz@gnu.org>
* gdb_curses.h (MOUSE_MOVED) [__MINGW32__]: Undefine before
including curses.h.
2012-01-12 Jan Kratochvil <jan.kratochvil@redhat.com>
* configure: Regenerate.

View File

@ -27,6 +27,14 @@
#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
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 <curses.h>
#endif