summaryrefslogtreecommitdiffstats
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
commit81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c (patch)
tree1a30fcf8423920024c85d20ef47b14d7a1d15980
parent8cca004af1b90fcede9a043b986c6e7aa4a66c78 (diff)
downloadppe42-binutils-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.tar.gz
ppe42-binutils-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.zip
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 37ed00207e..8382df8403 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 a55c764309..f77493ab8b 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 66c3e78419..939a8cc6de 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 b81e3fd4c9..3aac2db362 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() */
}
OpenPOWER on IntegriCloud