summaryrefslogtreecommitdiff
path: root/gdb/gdb_curses.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-01-13 10:44:35 +0000
committerEli Zaretskii <eliz@gnu.org>2012-01-13 10:44:35 +0000
commitee5106fedefc3b2378641dbfaac0b4c5a919584e (patch)
treeca90ccae03322a2dee4e7553e8c889b34c5969fe /gdb/gdb_curses.h
parent763bf0cf3b964aa4266e0d6ab11ebb47b512d0d2 (diff)
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.
Diffstat (limited to 'gdb/gdb_curses.h')
-rw-r--r--gdb/gdb_curses.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h
index 8b55c2936e..787f293c7d 100644
--- a/gdb/gdb_curses.h
+++ b/gdb/gdb_curses.h
@@ -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