]> 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 10:44:35 +0000 (10:44 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2012 10:44:35 +0000 (10:44 +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 1a96f26dfd8b7406da40029b5e9faa36f94d5114..0aac2afc357699920f4f7d7cd8a7d547cc35bede 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  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * configure: Regenerate.
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