diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-20 00:28:23 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-20 00:28:23 +0000 |
commit | 81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c (patch) | |
tree | 1a30fcf8423920024c85d20ef47b14d7a1d15980 /gdb | |
parent | 8cca004af1b90fcede9a043b986c6e7aa4a66c78 (diff) | |
download | gdb-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.zip gdb-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.tar.gz gdb-81b8eb809e1fd6ad16bbeda4a365b8e7a81a441c.tar.bz2 |
Move free() decl to utils.c.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/config/pa/xm-hppah.h | 2 | ||||
-rw-r--r-- | gdb/defs.h | 4 | ||||
-rw-r--r-- | gdb/utils.c | 8 |
4 files changed, 14 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 37ed002..8382df8 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 a55c764..f77493a 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 *); @@ -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 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() */ } |