diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-01 08:16:25 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-01 08:16:25 +0000 |
commit | bbb8ca064d01c76dd68e15166af039b6074806dc (patch) | |
tree | 3b43b1e5c740bd5316f62a3d857f18b639d3902c /gcc/gensupport.c | |
parent | 8aba075370c6d58c5ab822383c7e1939bb3237ff (diff) | |
download | gcc-bbb8ca064d01c76dd68e15166af039b6074806dc.tar.gz |
* gencheck.c, gengenrtl.c: Don't define xmalloc.
* gensupport.c: Don't define xstrdup, xcalloc, xrealloc,
xmalloc.
* f/fini.c: Use xmalloc.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47506 138bc75d-0d04-0410-961f-82ee72b054a4
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; -} |