From: Daniel Jacobowitz <drow@mvista.com>
To: "Martin M. Hunt" <hunt@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] fix for utils.c bool problem
Date: Thu, 07 Feb 2002 13:39:00 -0000 [thread overview]
Message-ID: <20020207163944.A30605@nevyn.them.org> (raw)
In-Reply-To: <200202072133.NAA28346@cygnus.com>
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"
next prev parent reply other threads:[~2002-02-07 21:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-07 13:33 Martin M. Hunt
2002-02-07 13:39 ` Daniel Jacobowitz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020207163944.A30605@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=hunt@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox