]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Avoid compiler warnings in gdb_curses.h on MinGW.
authorEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2012 11:17:56 +0000 (11:17 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2012 11:17:56 +0000 (11:17 +0000)
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.

gdb/ChangeLog
gdb/gdb_curses.h

index 50e1391f17bd89715093af97af7e9edb0d198db4..030b32e90643efd40396b3216d2af09f4597b837 100644 (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  Pedro Alves  <palves@redhat.com>
 
        * i386-tdep.c (i386_frame_cache_1): Also mark the frame base as
index 8b55c2936ef8f5d8c002d33218c247dcfa88388d..787f293c7d3cfc150e251d7ac24346ea6912b52a 100644 (file)
 #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