From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3033 invoked by alias); 13 Jan 2012 11:23:07 -0000 Received: (qmail 3024 invoked by uid 22791); 13 Jan 2012 11:23:06 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL,TW_GD X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Jan 2012 11:22:44 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LXQ00700I4DD900@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Fri, 13 Jan 2012 13:22:42 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.136.230]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LXQ007VWI9TD300@a-mtaout21.012.net.il>; Fri, 13 Jan 2012 13:22:42 +0200 (IST) Date: Fri, 13 Jan 2012 11:28:00 -0000 From: Eli Zaretskii Subject: Re: Building GDB 7.3.92 with MinGW In-reply-to: To: Doug Evans Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83sjjjkfso.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <83hb03e9sx.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00469.txt.bz2 > Date: Tue, 10 Jan 2012 10:46:24 -0800 > From: Doug Evans > Cc: gdb-patches@sourceware.org > > On Tue, Jan 10, 2012 at 9:39 AM, Eli Zaretskii wrote: > > I've successfully built the latest pretest of GDB 7.3.92 with MinGW on > > MS-Windows.  But I did encounter a few minor issues; this is my report > > about them. > > > > 1. Compilation warning: > > > >     gcc -O2 -gdwarf-2 -g3 -D__USE_MINGW_ACCESS   -I. -I. -I./common -I./config -DLOCALEDIR="\"/d/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./../intl -I./gnulib -Ignulib    -I/d/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wno-format  -c -o utils.o -MT utils.o -MMD -MP -MF .deps/utils.Tpo utils.c > >     In file included from gdb_curses.h:30, > >                      from utils.c:68: > >     d:/usr/include/curses.h:153:1: warning: "MOUSE_MOVED" redefined > >     In file included from d:/usr/include/windows.h:49, > >                      from d:/usr/include/winsock2.h:22, > >                      from serial.h:24, > >                      from utils.c:48: > >     d:/usr/include/wincon.h:58:1: warning: this is the location of the previous definition > > > >  Any objections to the following patch?  (If approved, I will add a > >  comment explaining the problem on Windows which requires this.) > > > >     --- gdb/gdb_curses.h~0     2012-01-06 06:43:14.000000000 +0200 > >     +++ gdb/gdb_curses.h       2012-01-10 13:21:10.626119900 +0200 > >     @@ -27,6 +27,9 @@ > >      #elif defined (HAVE_CURSESX_H) > >      #include > >      #elif defined (HAVE_CURSES_H) > >     +#if defined(__MINGW32__) && defined(MOUSE_MOVED) > >     +#undef MOUSE_MOVED > >     +#endif > >      #include > >      #endif > > This is ok with me but remove the "&& defined(MOUSE_MOVED)". > And one space after defined in "defined(__MINGW32__)". Thanks. Here's what I committed, trunk and branch: 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. Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.13735 retrieving revision 1.13736 diff -u -r1.13735 -r1.13736 --- gdb/ChangeLog 12 Jan 2012 23:38:46 -0000 1.13735 +++ gdb/ChangeLog 13 Jan 2012 10:44:35 -0000 1.13736 @@ -1,3 +1,8 @@ +2012-01-13 Eli Zaretskii + + * gdb_curses.h (MOUSE_MOVED) [__MINGW32__]: Undefine before + including curses.h. + 2012-01-12 Jan Kratochvil * configure: Regenerate. Index: gdb/gdb_curses.h =================================================================== RCS file: /cvs/src/src/gdb/gdb_curses.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- gdb/gdb_curses.h 4 Jan 2012 08:17:02 -0000 1.14 +++ gdb/gdb_curses.h 13 Jan 2012 10:44:35 -0000 1.15 @@ -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