aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/f/malloc.c')
-rw-r--r--gcc/f/malloc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/f/malloc.c b/gcc/f/malloc.c
index 456021149ea..b0d31af81ef 100644
--- a/gcc/f/malloc.c
+++ b/gcc/f/malloc.c
@@ -1,6 +1,6 @@
/* malloc.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
- Contributed by James Craig Burley (burley@gnu.org).
+ Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -33,10 +33,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "proj.h"
#include "malloc.h"
-/* Assume gcc/toplev.o is linked in. */
-void *xmalloc (unsigned size);
-void *xrealloc (void *ptr, int size);
-
/* Externals defined here. */
struct _malloc_root_ malloc_root_
@@ -52,6 +48,8 @@ struct _malloc_root_ malloc_root_
0,
#if MALLOC_DEBUG
0, 0, 0, 0, 0, 0, 0, { '/' }
+#else
+ { 0 }
#endif
},
};
@@ -72,7 +70,7 @@ struct _malloc_root_ malloc_root_
static void *malloc_reserve_ = NULL; /* For crashes. */
#if MALLOC_DEBUG
-static char *malloc_types_[] =
+static const char *malloc_types_[] =
{"KS", "KSR", "NF", "NFR", "US", "USR"};
#endif
@@ -236,7 +234,7 @@ malloc_pool_kill (mallocPool p)
Makes a new pool with the given name and default new-chunk allocation. */
mallocPool
-malloc_pool_new (char *name, mallocPool parent,
+malloc_pool_new (const char *name, mallocPool parent,
unsigned long chunks UNUSED)
{
mallocPool p;
@@ -386,7 +384,7 @@ malloc_new_ (mallocSize s)
add it to the list of mallocArea_s for the pool. */
void *
-malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
+malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s)
{
void *ptr;
mallocArea_ a;
@@ -439,7 +437,7 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
you pass it a 0). */
void *
-malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s,
+malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s,
int z)
{
void *ptr;