aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2001-12-01 08:16:25 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-12-01 08:16:25 +0000
commitcfc45fb499aafa52c6b13b259a1a10acd67fcd9c (patch)
tree3b43b1e5c740bd5316f62a3d857f18b639d3902c /gcc
parentaf46cdde202aec94a5f65dc69a1f1f0a9704c67b (diff)
downloadgcc-cfc45fb499aafa52c6b13b259a1a10acd67fcd9c.zip
gcc-cfc45fb499aafa52c6b13b259a1a10acd67fcd9c.tar.gz
gcc-cfc45fb499aafa52c6b13b259a1a10acd67fcd9c.tar.bz2
gencheck.c, [...]: Don't define xmalloc.
* gencheck.c, gengenrtl.c: Don't define xmalloc. * gensupport.c: Don't define xstrdup, xcalloc, xrealloc, xmalloc. * f/fini.c: Use xmalloc. From-SVN: r47506
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/f/ChangeLog4
-rw-r--r--gcc/f/fini.c2
-rw-r--r--gcc/gencheck.c21
-rw-r--r--gcc/gengenrtl.c18
-rw-r--r--gcc/gensupport.c52
6 files changed, 11 insertions, 92 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c6c0237..6af1446 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-01 Zack Weinberg <zack@codesourcery.com>
+
+ * gencheck.c, gengenrtl.c: Don't define xmalloc.
+ * gensupport.c: Don't define xstrdup, xcalloc, xrealloc,
+ xmalloc.
+
2001-11-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (output_ascii): Cast `p' to unsigned char.
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index ad2b4aa..969a476 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,7 @@
+2001-12-01 Zack Weinberg <zack@codesourcery.com>
+
+ * f/fini.c: Use xmalloc.
+
Fri Nov 30 20:54:02 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in: Delete references to proj.[co], proj-h.[co].
diff --git a/gcc/f/fini.c b/gcc/f/fini.c
index cfb5ffd..28d9028 100644
--- a/gcc/f/fini.c
+++ b/gcc/f/fini.c
@@ -367,7 +367,7 @@ main (int argc, char **argv)
/* Make new name object to store name and its keyword. */
- newname = (name) really_call_malloc (sizeof (*newname));
+ newname = (name) xmalloc (sizeof (*newname));
newname->namelen = strlen (buf);
newname->kwlen = strlen (kwname);
total_length = newname->kwlen + fixlengths;
diff --git a/gcc/gencheck.c b/gcc/gencheck.c
index 8736450..c676ef9 100644
--- a/gcc/gencheck.c
+++ b/gcc/gencheck.c
@@ -70,24 +70,3 @@ main (argc, argv)
puts ("\n#endif /* GCC_TREE_CHECK_H */");
return 0;
}
-
-#if defined(USE_C_ALLOCA)
-/* FIXME: We only need an xmalloc definition because we are forced to
- link with alloca.o on some platforms. This should go away if/when
- we link against libiberty.a. (ghazi@caip.rutgers.edu 6/3/98) */
-PTR
-xmalloc (nbytes)
- size_t nbytes;
-{
- PTR tmp = (PTR) really_call_malloc (nbytes);
-
- if (!tmp)
- {
- fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n",
- nbytes);
- exit (FATAL_EXIT_CODE);
- }
-
- return tmp;
-}
-#endif /* USE_C_ALLOCA */
diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c
index ad1bc7f..0d40025 100644
--- a/gcc/gengenrtl.c
+++ b/gcc/gengenrtl.c
@@ -390,24 +390,6 @@ gencode ()
gendef (*fmt);
}
-#if defined(USE_C_ALLOCA)
-PTR
-xmalloc (nbytes)
- size_t nbytes;
-{
- PTR tmp = (PTR) really_call_malloc (nbytes);
-
- if (!tmp)
- {
- fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n",
- nbytes);
- exit (FATAL_EXIT_CODE);
- }
-
- return tmp;
-}
-#endif /* USE_C_ALLOCA */
-
/* This is the main program. We accept only one argument, "-h", which
says we are writing the genrtl.h file. Otherwise we are writing the
genrtl.c file. */
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index 26cf3cb..ae42a41 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -1102,55 +1102,3 @@ read_md_rtx (lineno, seqnr)
return desc;
}
-
-/* Until we can use the versions in libiberty. */
-char *
-xstrdup (input)
- const char *input;
-{
- size_t len = strlen (input) + 1;
- char *output = xmalloc (len);
- memcpy (output, input, len);
- return output;
-}
-
-PTR
-xcalloc (nelem, elsize)
- size_t nelem, elsize;
-{
- PTR newmem;
-
- if (nelem == 0 || elsize == 0)
- nelem = elsize = 1;
-
- newmem = really_call_calloc (nelem, elsize);
- if (!newmem)
- fatal ("virtual memory exhausted");
- return (newmem);
-}
-
-PTR
-xrealloc (old, size)
- PTR old;
- size_t size;
-{
- PTR ptr;
- if (old)
- ptr = (PTR) really_call_realloc (old, size);
- else
- ptr = (PTR) really_call_malloc (size);
- if (!ptr)
- fatal ("virtual memory exhausted");
- return ptr;
-}
-
-PTR
-xmalloc (size)
- size_t size;
-{
- PTR val = (PTR) really_call_malloc (size);
-
- if (val == 0)
- fatal ("virtual memory exhausted");
- return val;
-}