summaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-12-06 20:59:11 +0000
committerAndrew Cagney <cagney@redhat.com>2001-12-06 20:59:11 +0000
commit31e44f6259cac8da710859ec91cd129002d2eb77 (patch)
treebb1b55c9eb7ffd16ac8efb14a16b38316e1c133d /gdb/utils.c
parent0ebc87954b71891cb066eda738c8a7bc37dcdb2f (diff)
downloadgdb-31e44f6259cac8da710859ec91cd129002d2eb77.tar.gz
Eliminate global #include of "mmalloc.h".
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index ed1b2b7ba67..4d12c3998ce 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -56,6 +56,10 @@
#include <readline/readline.h>
+#ifdef USE_MMALLOC
+#include "mmalloc.h"
+#endif
+
#ifndef MALLOC_INCOMPATIBLE
#ifdef NEED_DECLARATION_MALLOC
extern PTR malloc ();
@@ -893,14 +897,14 @@ request_quit (int signo)
/* NOTE: These must use PTR so that their definition matches the
declaration found in "mmalloc.h". */
-PTR
-mmalloc (PTR md, size_t size)
+static void *
+mmalloc (void *md, size_t size)
{
return malloc (size); /* NOTE: GDB's only call to malloc() */
}
-PTR
-mrealloc (PTR md, PTR ptr, size_t size)
+static void *
+mrealloc (void *md, void *ptr, size_t size)
{
if (ptr == 0) /* Guard against old realloc's */
return mmalloc (md, size);
@@ -908,14 +912,14 @@ mrealloc (PTR md, PTR ptr, size_t size)
return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */
}
-PTR
-mcalloc (PTR md, size_t number, size_t size)
+static void *
+mcalloc (void *md, size_t number, size_t size)
{
return calloc (number, size); /* NOTE: GDB's only call to calloc() */
}
-void
-mfree (PTR md, PTR ptr)
+static void
+mfree (void *md, void *ptr)
{
free (ptr); /* NOTE: GDB's only call to free() */
}