diff options
author | Zack Weinberg <zack@codesourcery.com> | 2001-12-01 08:16:25 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2001-12-01 08:16:25 +0000 |
commit | cfc45fb499aafa52c6b13b259a1a10acd67fcd9c (patch) | |
tree | 3b43b1e5c740bd5316f62a3d857f18b639d3902c /gcc/gensupport.c | |
parent | af46cdde202aec94a5f65dc69a1f1f0a9704c67b (diff) | |
download | gcc-cfc45fb499aafa52c6b13b259a1a10acd67fcd9c.tar.gz |
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/gensupport.c')
-rw-r--r-- | gcc/gensupport.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c index 26cf3cb23d2..ae42a41f2b5 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; -} |