diff options
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; -} |