summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-20 00:28:23 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-20 00:28:23 +0000
commit619b7fe63b30edc68481be5f60ccde24165e837e (patch)
tree15f231666ea3d0fed8d10f4b92b83f6bff4aea90
parentcec17fda455f2b9c8d6ecd531cfbb7d5cbb11ab5 (diff)
downloadgdb-619b7fe63b30edc68481be5f60ccde24165e837e.tar.gz
Move free() decl to utils.c.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/config/pa/xm-hppah.h2
-rw-r--r--gdb/defs.h4
-rw-r--r--gdb/utils.c8
4 files changed, 14 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 37ed00207e0..8382df8403c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-19 Andrew Cagney <ac131313@redhat.com>
+
+ * defs.h (free): Move declaration from here.
+ * utils.c (free): To here.
+ (xfree): Document as the only call to free().
+ * config/pa/xm-hppah.h (free): Delete declaration.
+
2001-03-19 Kevin Buettner <kevinb@redhat.com>
* config/ia64/linux.mh (NATDEPFILES): Add proc-service.o to
diff --git a/gdb/config/pa/xm-hppah.h b/gdb/config/pa/xm-hppah.h
index a55c7643093..f77493ab8ba 100644
--- a/gdb/config/pa/xm-hppah.h
+++ b/gdb/config/pa/xm-hppah.h
@@ -44,5 +44,3 @@
extern void *malloc (size_t);
extern void *realloc (void *, size_t);
-
-extern void free (void *);
diff --git a/gdb/defs.h b/gdb/defs.h
index 66c3e78419a..939a8cc6dee 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -955,10 +955,6 @@ extern PTR malloc ();
extern PTR realloc ();
#endif
-#ifdef NEED_DECLARATION_FREE
-extern void free ();
-#endif
-
#endif /* MALLOC_INCOMPATIBLE */
/* Various possibilities for alloca. */
diff --git a/gdb/utils.c b/gdb/utils.c
index b81e3fd4c90..3aac2db3625 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -56,6 +56,12 @@
#include <readline/readline.h>
+#ifndef MALLOC_INCOMPATIBLE
+#ifdef NEED_DECLARATION_FREE
+extern void free ();
+#endif
+#endif
+
#undef XMALLOC
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
@@ -1110,7 +1116,7 @@ void
xfree (void *ptr)
{
if (ptr != NULL)
- free (ptr);
+ free (ptr); /* NOTE: GDB's only call to free() */
}