From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21246 invoked by alias); 7 Feb 2002 21:39:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21173 invoked from network); 7 Feb 2002 21:39:45 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 7 Feb 2002 21:39:45 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16YwGe-0008EL-00; Thu, 07 Feb 2002 16:39:44 -0500 Date: Thu, 07 Feb 2002 13:39:00 -0000 From: Daniel Jacobowitz To: "Martin M. Hunt" Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] fix for utils.c bool problem Message-ID: <20020207163944.A30605@nevyn.them.org> Mail-Followup-To: "Martin M. Hunt" , gdb-patches@sources.redhat.com References: <200202072133.NAA28346@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200202072133.NAA28346@cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-02/txt/msg00198.txt.bz2 On Thu, Feb 07, 2002 at 01:32:53PM -0800, Martin M. Hunt wrote: > Am I the only one seeing this? On three different build systems I am getting errors like > > gcc -c -g -O2 -I/usr/include/v9 -I. -I../../src/gdb -I../../src/gdb/config -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl -DMI_OUT=1 -DGDBTK -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized ../../src/gdb/utils.c > In file included from /usr/progressive/lib/gcc-lib/sparc-sun-solaris2.5/2.96-gnupro-00r1/include/curses.h:5, > from ../../src/gdb/utils.c:30: > /usr/include/curses.h:69: conflicting types for `_Bool' > /usr/progressive/lib/gcc-lib/sparc-sun-solaris2.5/2.96-gnupro-00r1/include/stdbool.h:41: previous declaration of `_Bool' > > Some newer versions of gcc apparently have stdbool.h improvements that > fix the problem. Another fix is to simply reorder the patch, which fixes builds > on all of my systems (Windows, Linux, Solaris) This is the patch I alluded to earlier today on binutils@. It's not quite complete, since TUI is also affected; I've attached mine. I'm quite surprised that this fixes the problem for you without the corresponding bfd patch that I haven't committed yet! -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer 2002-02-07 Daniel Jacobowitz * utils.c: Include before "bfd.h". * tui/tui-hooks.c: Likewise. * tui/tui.c: Likewise. * tui/tuiCommand.c: Likewise. * tui/tuiData.c: Likewise. * tui/tuiDataWin.c: Likewise. * tui/tuiDisassem.c: Likewise. * tui/tuiGeneralWin.c: Likewise. * tui/tuiIO.c: Likewise. * tui/tuiLayout.c: Likewise. * tui/tuiRegs.c: Likewise. * tui/tuiSource.c: Likewise. * tui/tuiSourceWin.c: Likewise. * tui/tuiStack.c: Likewise. * tui/tuiWin.c: Likewise. Index: utils.c =================================================================== RCS file: /cvs/src/src/gdb/utils.c,v retrieving revision 1.60 diff -u -p -r1.60 utils.c --- utils.c 2002/02/02 15:39:33 1.60 +++ utils.c 2002/02/07 21:35:59 @@ -20,18 +20,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "defs.h" -#include "gdb_assert.h" -#include -#include "gdb_string.h" -#include "event-top.h" +#include "config.h" +/* Include before "bfd.h" so that we get stdbool.h in time, if + brings it in. */ #ifdef HAVE_CURSES_H #include #endif #ifdef HAVE_TERM_H #include #endif + +#include "defs.h" +#include "gdb_assert.h" +#include +#include "gdb_string.h" +#include "event-top.h" #ifdef __GO32__ #include Index: tui/tui-hooks.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v retrieving revision 1.1 diff -u -p -r1.1 tui-hooks.c --- tui-hooks.c 2001/07/24 20:40:39 1.1 +++ tui-hooks.c 2002/02/07 21:35:59 @@ -18,6 +18,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "symtab.h" #include "inferior.h" Index: tui/tui.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tui.c,v retrieving revision 1.14 diff -u -p -r1.14 tui.c --- tui.c 2001/07/31 19:00:50 1.14 +++ tui.c 2002/02/07 21:35:59 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include #include #include Index: tui/tuiCommand.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiCommand.c,v retrieving revision 1.4 diff -u -p -r1.4 tuiCommand.c --- tuiCommand.c 2001/07/20 22:17:49 1.4 +++ tuiCommand.c 2002/02/07 21:35:59 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include #include "tui.h" Index: tui/tuiData.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiData.c,v retrieving revision 1.6 diff -u -p -r1.6 tuiData.c --- tuiData.c 2001/07/20 23:06:48 1.6 +++ tuiData.c 2002/02/07 21:35:59 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "tui.h" #include "tuiData.h" Index: tui/tuiDataWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiDataWin.c,v retrieving revision 1.4 diff -u -p -r1.4 tuiDataWin.c --- tuiDataWin.c 2001/07/20 22:26:54 1.4 +++ tuiDataWin.c 2002/02/07 21:35:59 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "tui.h" #include "tuiData.h" Index: tui/tuiDisassem.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiDisassem.c,v retrieving revision 1.10 diff -u -p -r1.10 tuiDisassem.c --- tuiDisassem.c 2001/10/21 17:19:38 1.10 +++ tuiDisassem.c 2002/02/07 21:35:59 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "symtab.h" #include "breakpoint.h" Index: tui/tuiGeneralWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiGeneralWin.c,v retrieving revision 1.7 diff -u -p -r1.7 tuiGeneralWin.c --- tuiGeneralWin.c 2001/07/21 19:44:38 1.7 +++ tuiGeneralWin.c 2002/02/07 21:35:59 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "tui.h" #include "tuiData.h" Index: tui/tuiIO.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiIO.c,v retrieving revision 1.10 diff -u -p -r1.10 tuiIO.c --- tuiIO.c 2001/07/23 21:16:20 1.10 +++ tuiIO.c 2002/02/07 21:36:00 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include #include "defs.h" #include "terminal.h" Index: tui/tuiLayout.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiLayout.c,v retrieving revision 1.13 diff -u -p -r1.13 tuiLayout.c --- tuiLayout.c 2001/07/20 22:26:54 1.13 +++ tuiLayout.c 2002/02/07 21:36:00 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "command.h" #include "symtab.h" Index: tui/tuiRegs.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiRegs.c,v retrieving revision 1.10 diff -u -p -r1.10 tuiRegs.c --- tuiRegs.c 2001/07/21 19:46:59 1.10 +++ tuiRegs.c 2002/02/07 21:36:00 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "tui.h" #include "tuiData.h" Index: tui/tuiSource.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiSource.c,v retrieving revision 1.7 diff -u -p -r1.7 tuiSource.c --- tuiSource.c 2001/08/02 11:58:29 1.7 +++ tuiSource.c 2002/02/07 21:36:00 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include #include "symtab.h" Index: tui/tuiSourceWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiSourceWin.c,v retrieving revision 1.9 diff -u -p -r1.9 tuiSourceWin.c --- tuiSourceWin.c 2001/10/21 17:19:38 1.9 +++ tuiSourceWin.c 2002/02/07 21:36:00 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include #include "symtab.h" Index: tui/tuiStack.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiStack.c,v retrieving revision 1.11 diff -u -p -r1.11 tuiStack.c --- tuiStack.c 2001/07/23 21:13:57 1.11 +++ tuiStack.c 2002/02/07 21:36:00 @@ -19,6 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include "defs.h" #include "symtab.h" #include "breakpoint.h" Index: tui/tuiWin.c =================================================================== RCS file: /cvs/src/src/gdb/tui/tuiWin.c,v retrieving revision 1.17 diff -u -p -r1.17 tuiWin.c --- tuiWin.c 2002/02/02 00:56:37 1.17 +++ tuiWin.c 2002/02/07 21:36:00 @@ -24,6 +24,16 @@ Author: Susan B. Macchia */ +/* If we need , we must include it before we get "bfd.h". */ +#include "config.h" +#ifdef HAVE_NCURSES_H +#include +#else +#ifdef HAVE_CURSES_H +#include +#endif +#endif + #include #include #include "defs.h"