This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Fix boolean fallout; Was: bye-bye boolean


I've committed the attached. Fix the fallout from zapping boolean (Thanks for doing this!).

Alan, suggest mentioning this in the NEWS file.

Andrew
2002-11-30  Andrew Cagney  <cagney@redhat.com>

	* exec.c (xfer_memory): Replace boolean with int.
	* p-exp.y: Use 0 instead of false.
	* corelow.c (gdb_check_format): Change return type to int from
	boolean.
	* utils.c: Don't include <curses.h> or <term.h> first.

Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.25
diff -u -r1.25 corelow.c
--- corelow.c	29 Nov 2002 19:15:14 -0000	1.25
+++ corelow.c	30 Nov 2002 15:59:07 -0000
@@ -62,7 +62,7 @@
 
 static struct core_fns *sniff_core_bfd (bfd *);
 
-static boolean gdb_check_format (bfd *);
+static int gdb_check_format (bfd *);
 
 static void core_open (char *, int);
 
@@ -160,7 +160,7 @@
 
 /* Attempt to recognize core file formats that BFD rejects. */
 
-static boolean 
+static int
 gdb_check_format (bfd *abfd)
 {
   struct core_fns *cf;
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.20
diff -u -r1.20 exec.c
--- exec.c	16 Nov 2002 19:23:52 -0000	1.20
+++ exec.c	30 Nov 2002 15:59:07 -0000
@@ -481,10 +481,10 @@
 	     struct mem_attrib *attrib,
 	     struct target_ops *target)
 {
-  boolean res;
+  int res;
   struct section_table *p;
   CORE_ADDR nextsectaddr, memend;
-  boolean (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
+  int (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
   asection *section = NULL;
 
   if (len <= 0)
Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.19
diff -u -r1.19 p-exp.y
--- p-exp.y	19 Nov 2002 12:44:43 -0000	1.19
+++ p-exp.y	30 Nov 2002 15:59:08 -0000
@@ -293,7 +293,7 @@
 			    { while (TYPE_CODE (current_type) == TYPE_CODE_PTR)
 				current_type = TYPE_TARGET_TYPE (current_type);
 			      current_type = lookup_struct_elt_type (
-				current_type, $4.ptr, false); };
+				current_type, $4.ptr, 0); };
 			 } ; 
 exp	:	exp '['
 			/* We need to save the current_type value */
@@ -677,7 +677,7 @@
 			      if (this_type)
 				current_type = lookup_struct_elt_type (
 				  this_type,
-				  copy_name($1.stoken), false);
+				  copy_name ($1.stoken), 0);
 			      else
 				current_type = NULL; 
 			    }
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.86
diff -u -r1.86 utils.c
--- utils.c	14 Nov 2002 00:50:04 -0000	1.86
+++ utils.c	30 Nov 2002 15:59:09 -0000
@@ -20,23 +20,6 @@
    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"
-
-#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>
@@ -67,6 +50,13 @@
 #include "inferior.h" /* for signed_pointer_to_address */
 
 #include <sys/param.h>		/* For MAXPATHLEN */
+
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#ifdef HAVE_TERM_H
+#include <term.h>
+#endif
 
 #include <readline/readline.h>
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]