aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
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 /gdb/utils.c
parent8cca004af1b90fcede9a043b986c6e7aa4a66c78 (diff)
downloadgdb-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.zip
gdb-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.tar.gz
gdb-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.tar.bz2
Move free() decl to utils.c.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index b81e3fd..3aac2db 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() */
}