This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] elimnate MALLOC_INCOMPATIBLE
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 19 Jan 2002 23:08:10 -0500
- Subject: [patch] elimnate MALLOC_INCOMPATIBLE
Hello,
The attached eliminates the xm*.h macro MALLOC_INCOMPATIBLE. Only SunOS
4.x was defining it and more recent changes have made it unnecessary.
This in turn lets the xm file be deleted.
Andrew
2002-01-19 Andrew Cagney <ac131313@redhat.com>
* utils.c: Remove #ifndef MALLOC_INCOMPATIBLE.
* config/sparc/xm-sun4os4.h (PTRACE_ARG3_TYPE): Move macro ....
* config/sparc/nm-sun4os4.h (PTRACE_ARG3_TYPE): ... to here.
* config/sparc/xm-sun4os4.h: Delete file.
* config/sparc/sun4os4.mh (XM_FILE): Delete makefile variable.
Index: doc/ChangeLog
2002-01-19 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Host Definition): Remove references to
MALLOC_INCOMPATIBLE.
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.56
diff -p -r1.56 utils.c
*** utils.c 2002/01/20 00:44:47 1.56
--- utils.c 2002/01/20 04:02:01
***************
*** 62,68 ****
#include "mmalloc.h"
#endif
- #ifndef MALLOC_INCOMPATIBLE
#ifdef NEED_DECLARATION_MALLOC
extern PTR malloc ();
#endif
--- 62,67 ----
*************** extern PTR realloc ();
*** 71,77 ****
#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
- #endif
#endif
#undef XMALLOC
--- 70,75 ----
Index: config/sparc/nm-sun4os4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/nm-sun4os4.h,v
retrieving revision 1.4
diff -p -r1.4 nm-sun4os4.h
*** nm-sun4os4.h 2001/03/14 23:23:14 1.4
--- nm-sun4os4.h 2002/01/20 04:02:05
***************
*** 36,38 ****
--- 36,42 ----
#define KERNEL_U_SIZE kernel_u_size()
extern int kernel_u_size (void);
+
+ /* SunOS 4.x uses nonstandard "char *" as type of third argument to ptrace() */
+
+ #define PTRACE_ARG3_TYPE char*
Index: config/sparc/sun4os4.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/sun4os4.mh,v
retrieving revision 1.3
diff -p -r1.3 sun4os4.mh
*** sun4os4.mh 2002/01/18 04:51:08 1.3
--- sun4os4.mh 2002/01/20 04:02:05
***************
*** 1,5 ****
# Host: Sun 4 or Sparcstation, running SunOS 4
- XM_FILE= xm-sun4os4.h
NAT_FILE= nm-sun4os4.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
HOST_IPC=-DBSD_IPC
--- 1,4 ----
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.56
diff -p -r1.56 gdbint.texinfo
*** gdbint.texinfo 2002/01/18 04:51:10 1.56
--- gdbint.texinfo 2002/01/20 04:03:50
*************** This macro is used as the argument to @c
*** 2206,2215 ****
@code{bfd_seek}). FIXME, should be replaced by SEEK_SET instead,
which is the POSIX equivalent.
- @item MALLOC_INCOMPATIBLE
- Define this if the system's prototype for @code{malloc} differs from the
- @sc{ansi} definition.
-
@item MMAP_BASE_ADDRESS
When using HAVE_MMAP, the first mapping should go at this address.
--- 2206,2211 ----