Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] fix for utils.c bool problem
@ 2002-02-07 13:33 Martin M. Hunt
  2002-02-07 13:39 ` Daniel Jacobowitz
  2002-02-07 13:40 ` Fernando Nasser
  0 siblings, 2 replies; 13+ messages in thread
From: Martin M. Hunt @ 2002-02-07 13:33 UTC (permalink / raw)
  To: gdb-patches

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)

-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

2002-02-07  Martin M. Hunt  <hunt@redhat.com>

	* utils.c: Reorder includes to eliminate bool conflict.

Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.61
diff -u -p -r1.61 utils.c
--- utils.c	2002/02/05 04:37:22	1.61
+++ utils.c	2002/02/07 21:32:35
@@ -20,18 +20,18 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "defs.h"
-#include "gdb_assert.h"
-#include <ctype.h>
-#include "gdb_string.h"
-#include "event-top.h"
-
 #ifdef HAVE_CURSES_H
 #include <curses.h>
 #endif
 #ifdef HAVE_TERM_H
 #include <term.h>
 #endif
+
+#include "defs.h"
+#include "gdb_assert.h"
+#include <ctype.h>
+#include "gdb_string.h"
+#include "event-top.h"
 
 #ifdef __GO32__
 #include <pc.h>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-07 13:33 [RFA] fix for utils.c bool problem Martin M. Hunt
@ 2002-02-07 13:39 ` Daniel Jacobowitz
  2002-02-07 14:01   ` Andrew Cagney
  2002-02-08  7:57   ` Daniel Jacobowitz
  2002-02-07 13:40 ` Fernando Nasser
  1 sibling, 2 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2002-02-07 13:39 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: gdb-patches

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  <drow@mvista.com>

	* utils.c: Include <curses.h> 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 <ctype.h>
-#include "gdb_string.h"
-#include "event-top.h"
+#include "config.h"
 
+/* Include before "bfd.h" so that we get stdbool.h in time, if <curses.h>
+   brings it in.  */
 #ifdef HAVE_CURSES_H
 #include <curses.h>
 #endif
 #ifdef HAVE_TERM_H
 #include <term.h>
 #endif
+
+#include "defs.h"
+#include "gdb_assert.h"
+#include <ctype.h>
+#include "gdb_string.h"
+#include "event-top.h"
 
 #ifdef __GO32__
 #include <pc.h>
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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 #include "defs.h"
 #include <ctype.h>
 #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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 #include <stdio.h>
 #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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 #include "defs.h"
 #include <ctype.h>
 #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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 #include "defs.h"
 #include <ctype.h>
 #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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#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 <curses.h>, we must include it before we get "bfd.h".  */
+#include "config.h"
+#ifdef HAVE_NCURSES_H       
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
 #include <string.h>
 #include <ctype.h>
 #include "defs.h"


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-07 13:33 [RFA] fix for utils.c bool problem Martin M. Hunt
  2002-02-07 13:39 ` Daniel Jacobowitz
@ 2002-02-07 13:40 ` Fernando Nasser
  1 sibling, 0 replies; 13+ messages in thread
From: Fernando Nasser @ 2002-02-07 13:40 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: gdb-patches

"Martin M. Hunt" wrote:
> 
> Am I the only one seeing this?  On three different build systems I am getting errors like
> 

No, the boolean type syndrome is showing up everywhere (see below).
Nick just fixed that code.  The recent changes just uncovered these
things.

Fernando


On Tue, Feb 05, 2002 at 06:12:16PM +0000, Nick Clifton wrote:
> Hi Guys,
> 
>   The ARM port of GDB is currently failing to build for me because of
>   this problem:
> 
> In file included from /home/nickc/work/sources/egcs/gdb/rdi-share/ardi.h:17,
>                  from /home/nickc/work/sources/egcs/gdb/remote-rdi.c:46:
> /home/nickc/work/sources/egcs/gdb/rdi-share/host.h:123: conflicting types for `_Bool'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdbool.h:41: previous declaration of `_Bool'
> 




-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-07 13:39 ` Daniel Jacobowitz
@ 2002-02-07 14:01   ` Andrew Cagney
  2002-02-07 14:14     ` Daniel Jacobowitz
  2002-02-08  7:57   ` Daniel Jacobowitz
  1 sibling, 1 reply; 13+ messages in thread
From: Andrew Cagney @ 2002-02-07 14:01 UTC (permalink / raw)
  To: Daniel Jacobowitz, Martin M. Hunt; +Cc: gdb-patches

Martin,



@@ -20,18 +20,18 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "defs.h"
-#include "gdb_assert.h"
-#include <ctype.h>
-#include "gdb_string.h"
-#include "event-top.h"
-
 #ifdef HAVE_CURSES_H
 #include <curses.h>
#endif
 #ifdef HAVE_TERM_H
 #include <term.h>
#endif
+
+#include "defs.h"
+#include "gdb_assert.h"
+#include <ctype.h>
+#include "gdb_string.h"
+#include "event-top.h"
 
 #ifdef __GO32__
 #include <pc.h>

It needs to at least include "config.h" first (that is where HAVE_CURSES_H is defined).  I think something like:


#include "config.h"
#include "bfd.h"
#include "defs.h"

but the ``I think'' highlights the problem :-(  I don't think we should 
be working around problems in an un released BFD :-/

Andrew




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-07 14:01   ` Andrew Cagney
@ 2002-02-07 14:14     ` Daniel Jacobowitz
  2002-02-07 15:28       ` Andrew Cagney
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2002-02-07 14:14 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Martin M. Hunt, gdb-patches

On Thu, Feb 07, 2002 at 05:01:37PM -0500, Andrew Cagney wrote:
> Martin,
> 
> 
> 
> @@ -20,18 +20,18 @@
>    Foundation, Inc., 59 Temple Place - Suite 330,
>    Boston, MA 02111-1307, USA.  */
> 
> -#include "defs.h"
> -#include "gdb_assert.h"
> -#include <ctype.h>
> -#include "gdb_string.h"
> -#include "event-top.h"
> -
> #ifdef HAVE_CURSES_H
> #include <curses.h>
> #endif
> #ifdef HAVE_TERM_H
> #include <term.h>
> #endif
> +
> +#include "defs.h"
> +#include "gdb_assert.h"
> +#include <ctype.h>
> +#include "gdb_string.h"
> +#include "event-top.h"
> 
> #ifdef __GO32__
> #include <pc.h>
> 
> It needs to at least include "config.h" first (that is where HAVE_CURSES_H 
> is defined).  I think something like:
> 
> 
> #include "config.h"
> #include "bfd.h"
> #include "defs.h"

No, just include "config.h" and then <curses.h> before defs.h.

> but the ``I think'' highlights the problem :-(  I don't think we should 
> be working around problems in an un released BFD :-/

I don't follow that.  If we ever, ever built using a "system" bfd.h,
maybe.  BFD is part of our source distribution, for all that it is
owned by a different group.  "Released" doesn't mean anything.

The names that would need to be changed are 'true' and 'false'.  That's
a problem of fairly great magnitude.

(And I missed that Martin had forgotten config.h.  That should have
caused some warnings...)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-07 14:14     ` Daniel Jacobowitz
@ 2002-02-07 15:28       ` Andrew Cagney
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Cagney @ 2002-02-07 15:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Martin M. Hunt, gdb-patches

> but the ``I think'' highlights the problem :-(  I don't think we should 
>> be working around problems in an un released BFD :-/
> 
> 
> I don't follow that.  If we ever, ever built using a "system" bfd.h,
> maybe.  BFD is part of our source distribution, for all that it is
> owned by a different group.  "Released" doesn't mean anything.


BFD and GDB share a common repository as this allows close co-operation. 
  If it were possible, we'd be sharing a repository with GCC.  These GDB 
vs BFD problems come up all the time (this one is just extra nasty :-). 
  I think both GDB and BINUTILS should be getting together and fixing 
the problem.  Obviously if this had come up after a branch had been cut, 
I'd likely be giving a very different story - HACK - fortunatly it didn't.


> The names that would need to be changed are 'true' and 'false'.  That's
> a problem of fairly great magnitude.


While the problem is going to cause much entropy in the code, it should 
also be 100% mechanical.  Look at other changes that have gone through 
GDB they were far less mechanical but still successful.

As they say, GDB can provide BINUTILS with the necessary technical 
knowledge :-^

enjoy,
Andrew


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-07 13:39 ` Daniel Jacobowitz
  2002-02-07 14:01   ` Andrew Cagney
@ 2002-02-08  7:57   ` Daniel Jacobowitz
  2002-02-08  8:51     ` Andrew Cagney
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2002-02-08  7:57 UTC (permalink / raw)
  To: gdb-patches; +Cc: Martin M. Hunt

On Thu, Feb 07, 2002 at 04:39:44PM -0500, Daniel Jacobowitz wrote:
> 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!

No one objected, so I've committed this.  As far as I know GDB should
build everywhere it used to before I started playing with bool, as long
as you update both BFD and GDB.  If I'm wrong, please let me know.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-08  7:57   ` Daniel Jacobowitz
@ 2002-02-08  8:51     ` Andrew Cagney
  2002-02-08  8:57       ` Daniel Jacobowitz
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Cagney @ 2002-02-08  8:51 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches, Martin M. Hunt

> 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!
> 
> 
> No one objected, so I've committed this.  As far as I know GDB should
> build everywhere it used to before I started playing with bool, as long
> as you update both BFD and GDB.  If I'm wrong, please let me know.


Dan I couldn't see the point of the patch.   The immediate problem - 
bfd.h including <stdbool.h> was fixed.  The next step, I thought, was 
fix bfd.h.  It isn't hurting in a major way and definitly breaks GDB's 
coding style.

Andrew


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-08  8:51     ` Andrew Cagney
@ 2002-02-08  8:57       ` Daniel Jacobowitz
  2002-02-08  9:09         ` Andrew Cagney
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2002-02-08  8:57 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches, Martin M. Hunt

On Fri, Feb 08, 2002 at 11:51:10AM -0500, Andrew Cagney wrote:
> >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!
> >
> >
> >No one objected, so I've committed this.  As far as I know GDB should
> >build everywhere it used to before I started playing with bool, as long
> >as you update both BFD and GDB.  If I'm wrong, please let me know.
> 
> 
> Dan I couldn't see the point of the patch.   The immediate problem - 
> bfd.h including <stdbool.h> was fixed.  The next step, I thought, was 
> fix bfd.h.  It isn't hurting in a major way and definitly breaks GDB's 
> coding style.

Sorry if I missed an objection.  I was a little out of it yesterday.

The immediate problem was -not- fixed.  To start back at the beginning
again:
  - On my machine, running a current Debian system, <curses.h> includes
   <stdbool.h>.  We have to live with that.  There's nothing I can
   particularly do about it.
  - The way I tried to fix this was by also using stdbool.h if it was
   available.  But <stdbool.h> conflicts with an awful lot of existing
   code.  This is unfortunate, and this is where the proper fix lies,
   IMO.
  - The way I settled on fixing this, and committed, was to use
   <stdbool.h> if something included before bfd.h had already brought
   it in.  This appears to work in all cases.

I strongly want to avoid leaving GDB unbuildable on this class of
systems.  I don't have any particular attachment to my patch.  I would
love to revert it, as soon as there is an alternative solution in
place.


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-08  8:57       ` Daniel Jacobowitz
@ 2002-02-08  9:09         ` Andrew Cagney
  2002-02-08  9:38           ` Daniel Jacobowitz
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Cagney @ 2002-02-08  9:09 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches, Martin M. Hunt

> 
> Sorry if I missed an objection.  I was a little out of it yesterday.
> 
> The immediate problem was -not- fixed.  To start back at the beginning
> again:
>   - On my machine, running a current Debian system, <curses.h> includes
>    <stdbool.h>.  We have to live with that.  There's nothing I can
>    particularly do about it.


Is that a current or a released debian system?  A released system I'd 
probably agreeable to.  A current system I'm less so.

>   - The way I tried to fix this was by also using stdbool.h if it was
>    available.  But <stdbool.h> conflicts with an awful lot of existing
>    code.  This is unfortunate, and this is where the proper fix lies,
>    IMO.
>   - The way I settled on fixing this, and committed, was to use
>    <stdbool.h> if something included before bfd.h had already brought
>    it in.  This appears to work in all cases.
> 
> I strongly want to avoid leaving GDB unbuildable on this class of
> systems.  I don't have any particular attachment to my patch.  I would
> love to revert it, as soon as there is an alternative solution in
> place.


See my thread on binutils about how to fix the problem.

enjoy,
Andrew


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-08  9:09         ` Andrew Cagney
@ 2002-02-08  9:38           ` Daniel Jacobowitz
  2002-02-08 10:55             ` Andrew Cagney
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2002-02-08  9:38 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches, Martin M. Hunt

On Fri, Feb 08, 2002 at 12:09:22PM -0500, Andrew Cagney wrote:
> >
> >Sorry if I missed an objection.  I was a little out of it yesterday.
> >
> >The immediate problem was -not- fixed.  To start back at the beginning
> >again:
> >  - On my machine, running a current Debian system, <curses.h> includes
> >   <stdbool.h>.  We have to live with that.  There's nothing I can
> >   particularly do about it.
> 
> 
> Is that a current or a released debian system?  A released system I'd 
> probably agreeable to.  A current system I'm less so.

Current.  But for Debian that's a somewhat meaningless distinction;
probably a quarter or more of the Debian users run current.  The
package in question will be in the next release, hopefully in a few
months.

> >  - The way I tried to fix this was by also using stdbool.h if it was
> >   available.  But <stdbool.h> conflicts with an awful lot of existing
> >   code.  This is unfortunate, and this is where the proper fix lies,
> >   IMO.
> >  - The way I settled on fixing this, and committed, was to use
> >   <stdbool.h> if something included before bfd.h had already brought
> >   it in.  This appears to work in all cases.
> >
> >I strongly want to avoid leaving GDB unbuildable on this class of
> >systems.  I don't have any particular attachment to my patch.  I would
> >love to revert it, as soon as there is an alternative solution in
> >place.
> 
> 
> See my thread on binutils about how to fix the problem.

As I've said, I have no objection to fixing it that way.  But I do
object to leaving it broken.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-08  9:38           ` Daniel Jacobowitz
@ 2002-02-08 10:55             ` Andrew Cagney
  2002-02-28 22:04               ` Andrew Cagney
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Cagney @ 2002-02-08 10:55 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches, Martin M. Hunt

> Is that a current or a released debian system?  A released system I'd 
>> probably agreeable to.  A current system I'm less so.
> 
> 
> Current.  But for Debian that's a somewhat meaningless distinction;
> probably a quarter or more of the Debian users run current.  The
> package in question will be in the next release, hopefully in a few
> months.


Assuming the changes are in :-(  Can you please at least create bug 
reports (one for utils and one for TUI I guess) to track the problems. 
Can you please also add a FIXME: drow/2002-02-03: explaining the 
rationale behind the hack (especially mention the GNU/Linux variant) and 
how it should be fixed properly.


>> > - The way I tried to fix this was by also using stdbool.h if it was
>> > available.  But <stdbool.h> conflicts with an awful lot of existing
>> > code.  This is unfortunate, and this is where the proper fix lies,
>> > IMO.
>> > - The way I settled on fixing this, and committed, was to use
>> > <stdbool.h> if something included before bfd.h had already brought
>> > it in.  This appears to work in all cases.
>> >
>> >I strongly want to avoid leaving GDB unbuildable on this class of
>> >systems.  I don't have any particular attachment to my patch.  I would
>> >love to revert it, as soon as there is an alternative solution in
>> >place.
> 
>> 
>> 
>> See my thread on binutils about how to fix the problem.
> 
> 
> As I've said, I have no objection to fixing it that way.  But I do
> object to leaving it broken.


My problem is that this hack doesn't fix the problem.    The track 
record is that once a hack is in, everyone ignores it and goes onto 
something else - which leaves me to fix it :-(

sigh,
Andrew


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [RFA] fix for utils.c bool problem
  2002-02-08 10:55             ` Andrew Cagney
@ 2002-02-28 22:04               ` Andrew Cagney
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Cagney @ 2002-02-28 22:04 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

> Current.  But for Debian that's a somewhat meaningless distinction;
> probably a quarter or more of the Debian users run current.  The
> package in question will be in the next release, hopefully in a few
> months.
> 
> 
> Assuming the changes are in :-(  Can you please at least create bug reports (one for utils and one for TUI I guess) to track the problems. Can you please also add a FIXME: drow/2002-02-03: explaining the rationale behind the hack (especially mention the GNU/Linux variant) and how it should be fixed properly.


FYI, I've checked in the attached.

Andrew



[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 19721 bytes --]

2002-03-01  Andrew Cagney  <ac131313@redhat.com>

	* utils.c: Add FIXME explaining true/false problem.

Index: tui/ChangeLog
2002-03-01  Andrew Cagney  <ac131313@redhat.com>

	* tui-hooks.c: Add FIXME to explain true/false problem.  Update
	copyright.
	* tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c: Ditto.
	* tuiDisassem.c, tuiGeneralWin.c, tuiIO.c, tuiLayout.c: Ditto.
	* tuiRegs.c, tuiSource.c, tuiSourceWin.c, tuiStack.c: Ditto.
	* tuiWin.c: Ditto.

	2002-02-08  Daniel Jacobowitz  <drow@mvista.com>
	* tui-hooks.c: Include <curses.h> before "bfd.h".
	* tui.c: Likewise.
	* tuiCommand.c: Likewise.
	* tuiData.c: Likewise.
	* tuiDataWin.c: Likewise.
	* tuiDisassem.c: Likewise.
	* tuiGeneralWin.c: Likewise.
	* tuiIO.c: Likewise.
	* tuiLayout.c: Likewise.
	* tuiRegs.c: Likewise.
	* tuiSource.c: Likewise.
	* tuiSourceWin.c: Likewise.
	* tuiStack.c: Likewise.
	* tuiWin.c: Likewise.

Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.67
diff -u -r1.67 utils.c
--- utils.c	2002/02/27 12:29:43	1.67
+++ utils.c	2002/03/01 05:45:41
@@ -20,10 +20,16 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
+
 #include "config.h"
 
-/* Include before "bfd.h" so that we get stdbool.h in time, if <curses.h>
-   brings it in.  */
 #ifdef HAVE_CURSES_H
 #include <curses.h>
 #endif
Index: tui/tui-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-hooks.c,v
retrieving revision 1.2
diff -u -r1.2 tui-hooks.c
--- tui-hooks.c	2002/02/08 15:54:31	1.2
+++ tui-hooks.c	2002/03/01 05:45:48
@@ -1,6 +1,7 @@
 /* GDB hooks for TUI.
-   Copyright 2001 Free Software Foundation, Inc.
 
+   Copyright 2001, 2002 Free Software Foundation, Inc.
+
    This file is part of GDB.
 
    This program is free software; you can redistribute it and/or modify
@@ -17,8 +18,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H
 #include <ncurses.h>
Index: tui/tui.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui.c,v
retrieving revision 1.15
diff -u -r1.15 tui.c
--- tui.c	2002/02/08 15:54:32	1.15
+++ tui.c	2002/03/01 05:45:48
@@ -1,5 +1,8 @@
 /* General functions for the WDB TUI.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiCommand.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiCommand.c,v
retrieving revision 1.5
diff -u -r1.5 tuiCommand.c
--- tuiCommand.c	2002/02/08 15:54:32	1.5
+++ tuiCommand.c	2002/03/01 05:45:48
@@ -1,5 +1,8 @@
 /* Specific command window processing.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiData.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiData.c,v
retrieving revision 1.7
diff -u -r1.7 tuiData.c
--- tuiData.c	2002/02/08 15:54:32	1.7
+++ tuiData.c	2002/03/01 05:45:49
@@ -1,5 +1,8 @@
 /* TUI data manipulation routines.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiDataWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiDataWin.c,v
retrieving revision 1.5
diff -u -r1.5 tuiDataWin.c
--- tuiDataWin.c	2002/02/08 15:54:32	1.5
+++ tuiDataWin.c	2002/03/01 05:45:49
@@ -1,5 +1,8 @@
 /* Data/register window display.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiDisassem.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiDisassem.c,v
retrieving revision 1.11
diff -u -r1.11 tuiDisassem.c
--- tuiDisassem.c	2002/02/08 15:54:32	1.11
+++ tuiDisassem.c	2002/03/01 05:45:49
@@ -1,5 +1,8 @@
 /* Disassembly display.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiGeneralWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiGeneralWin.c,v
retrieving revision 1.8
diff -u -r1.8 tuiGeneralWin.c
--- tuiGeneralWin.c	2002/02/08 15:54:32	1.8
+++ tuiGeneralWin.c	2002/03/01 05:45:49
@@ -1,5 +1,8 @@
 /* General window behavior.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiIO.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiIO.c,v
retrieving revision 1.11
diff -u -r1.11 tuiIO.c
--- tuiIO.c	2002/02/08 15:54:32	1.11
+++ tuiIO.c	2002/03/01 05:45:49
@@ -1,5 +1,8 @@
 /* TUI support I/O functions.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiLayout.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiLayout.c,v
retrieving revision 1.14
diff -u -r1.14 tuiLayout.c
--- tuiLayout.c	2002/02/08 15:54:32	1.14
+++ tuiLayout.c	2002/03/01 05:45:52
@@ -1,5 +1,8 @@
 /* TUI layout window management.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiRegs.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiRegs.c,v
retrieving revision 1.11
diff -u -r1.11 tuiRegs.c
--- tuiRegs.c	2002/02/08 15:54:32	1.11
+++ tuiRegs.c	2002/03/01 05:45:53
@@ -1,5 +1,8 @@
 /* TUI display registers in window.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiSource.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiSource.c,v
retrieving revision 1.8
diff -u -r1.8 tuiSource.c
--- tuiSource.c	2002/02/08 15:54:32	1.8
+++ tuiSource.c	2002/03/01 05:45:53
@@ -1,5 +1,8 @@
 /* TUI display source window.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiSourceWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiSourceWin.c,v
retrieving revision 1.10
diff -u -r1.10 tuiSourceWin.c
--- tuiSourceWin.c	2002/02/08 15:54:32	1.10
+++ tuiSourceWin.c	2002/03/01 05:45:53
@@ -1,5 +1,8 @@
 /* TUI display source/assembly window.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiStack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiStack.c,v
retrieving revision 1.12
diff -u -r1.12 tuiStack.c
--- tuiStack.c	2002/02/08 15:54:32	1.12
+++ tuiStack.c	2002/03/01 05:45:53
@@ -1,5 +1,8 @@
 /* TUI display locator.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -18,8 +21,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>
Index: tui/tuiWin.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiWin.c,v
retrieving revision 1.18
diff -u -r1.18 tuiWin.c
--- tuiWin.c	2002/02/08 15:54:32	1.18
+++ tuiWin.c	2002/03/01 05:45:54
@@ -1,5 +1,8 @@
 /* TUI window generic functions.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+   Inc.
+
    Contributed by Hewlett-Packard Company.
 
    This file is part of GDB.
@@ -23,8 +26,15 @@
    like resize, scrolling, scrolling, changing focus, etc.
 
    Author: Susan B. Macchia  */
+
+/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
+   "defs.h" should be included first.  Unfortunatly some systems
+   (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
+   and they clash with "bfd.h"'s definiton of true/false.  The correct
+   fix is to remove true/false from "bfd.h", however, until that
+   happens, hack around it by including "config.h" and <curses.h>
+   first.  */
 
-/* If we need <curses.h>, we must include it before we get "bfd.h".  */
 #include "config.h"
 #ifdef HAVE_NCURSES_H       
 #include <ncurses.h>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-03-01  6:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-07 13:33 [RFA] fix for utils.c bool problem Martin M. Hunt
2002-02-07 13:39 ` Daniel Jacobowitz
2002-02-07 14:01   ` Andrew Cagney
2002-02-07 14:14     ` Daniel Jacobowitz
2002-02-07 15:28       ` Andrew Cagney
2002-02-08  7:57   ` Daniel Jacobowitz
2002-02-08  8:51     ` Andrew Cagney
2002-02-08  8:57       ` Daniel Jacobowitz
2002-02-08  9:09         ` Andrew Cagney
2002-02-08  9:38           ` Daniel Jacobowitz
2002-02-08 10:55             ` Andrew Cagney
2002-02-28 22:04               ` Andrew Cagney
2002-02-07 13:40 ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox