* Makefile.in (c-exp.tab.c, m2-exp.tab.c): Filter out bogus extern
authorStu Grossman <grossman@cygnus>
Fri, 19 Jun 1992 22:39:44 +0000 (22:39 +0000)
committerStu Grossman <grossman@cygnus>
Fri, 19 Jun 1992 22:39:44 +0000 (22:39 +0000)
declarations of malloc/realloc/free that are inserted by some
versions of yacc.
* m2-exp.y:  Prevent conflicts with TRUE and FALSE tokens by
#undeffing them.
* xm-rs6000.h:  Declare malloc/realloc/free appropriately.  Yet
another decl of strdup (this really ought to come from libiberty.h!).

gdb/ChangeLog
gdb/Makefile.in
gdb/m2-exp.y
gdb/xm-rs6000.h

index 4bee5943c60b0761314ed4cda3fd2dcc1cfc3450..a443329b66684927fa491e8513d80e8ce2341760 100644 (file)
@@ -1,3 +1,13 @@
+Fri Jun 19 15:30:15 1992  Stu Grossman  (grossman at cygnus.com)
+
+       * Makefile.in (c-exp.tab.c, m2-exp.tab.c):  Filter out bogus extern
+       declarations of malloc/realloc/free that are inserted by some
+       versions of yacc.
+       * m2-exp.y:  Prevent conflicts with TRUE and FALSE tokens by
+       #undeffing them.
+       * xm-rs6000.h:  Declare malloc/realloc/free appropriately.  Yet
+       another decl of strdup (this really ought to come from libiberty.h!).
+
 Fri Jun 19 10:28:05 1992  John Gilmore  (gnu at cygnus.com)
 
        * remote.c (getpkt):  Error if input exceeds buffer size.
index 12d9ed1d844b37e5fcee12ed72c32644a0313f0f..c1b0b5062c8eb3649b0343f53abe75e34a10d5e9 100644 (file)
@@ -240,7 +240,7 @@ SFILES_KGDB  = $(SFILES) stuff.c kdb-start.c
 HFILES=        breakpoint.h buildsym.h call-cmds.h command.h defs.h demangle.h \
        environ.h expression.h frame.h gdbcmd.h gdbcore.h gdbtypes.h \
        ieee-float.h inferior.h minimon.h objfiles.h partial-stab.h \
-       signals.h symfile.h symtab.h solib.h xcoffsolib.h \
+       serial.h signals.h symfile.h symtab.h solib.h xcoffsolib.h \
        target.h terminal.h tm-68k.h tm-i960.h tm-sunos.h tm-sysv4.h \
        xm-m68k.h xm-sysv4.h language.h parser-defs.h value.h xm-vax.h
 
@@ -625,18 +625,28 @@ version.c: Makefile
 
 # c-exp.tab.c is generated in target dir from c-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to c-exp.tab.o.
+# Remove bogus decls for malloc/realloc/free which conflict with everything
+# else.
 c-exp.tab.o: c-exp.tab.c
 c-exp.tab.c: $(srcdir)/c-exp.y
        @echo 'Expect 4 shift/reduce conflicts.'
        ${YACC} $(srcdir)/c-exp.y
-       -mv y.tab.c c-exp.tab.c
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+         < y.tab.c > c-exp.tab.c
+       -rm y.tab.c
 
 # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist
 # in srcdir, then compiled in target dir to m2-exp.tab.o.
 m2-exp.tab.o: m2-exp.tab.c
 m2-exp.tab.c: $(srcdir)/m2-exp.y
        ${YACC} $(srcdir)/m2-exp.y
-       -mv y.tab.c m2-exp.tab.c
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+         < y.tab.c > m2-exp.tab.c
+       -rm y.tab.c
 
 # The symbol-file readers have dependencies on BFD header files.
 dbxread.o: ${srcdir}/dbxread.c
index 850019e15c01974a29e00b5877ce3e763d3244d5..7b70e4ecec1a1dd565b31c5c68adacccb2397eaf 100644 (file)
@@ -104,6 +104,9 @@ struct block *modblock=0;
 
 /* #define     YYDEBUG 1 */
 
+/* !@&%ing AIX defines these!  Prevent cpp complaints by undeffing them */
+#undef TRUE
+#undef FALSE
 %}
 
 /* Although the yacc "value" of an expression is not used,
index 3ad96a65a842c9f64ba50d0e1f71e056034a873e..30e2c24749603350ec0f3b67f5964af64bd48dc2 100644 (file)
@@ -66,8 +66,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* /usr/include/stdlib.h always uses void* and void,
    even when __STDC__ isn't defined. */
 #define MALLOC_INCOMPATIBLE
-extern char *malloc();
-extern char *realloc();
-extern void free();
+extern void *malloc PARAMS ((size_t size));
+extern void *realloc PARAMS ((void *ptr, size_t size));
+extern void free PARAMS ((void *));
 
-extern char *strdup();
+/* AIX doesn't have strdup, so we need to declare it for libiberty */
+extern char *strdup PARAMS ((char *));
This page took 0.034049 seconds and 4 git commands to generate.