aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-11-27 10:09:17 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-11-27 10:09:17 +0000
commit2778b98d9088057e96730a5a4f314d9d57bedc65 (patch)
tree34ccf49c3a33a630b8aabf80bc4b9c4bd0db64b8 /gcc/cccp.c
parent3081a3ada689c56e5a8c348aac90dfe7f00122bd (diff)
downloadgcc-2778b98d9088057e96730a5a4f314d9d57bedc65.zip
gcc-2778b98d9088057e96730a5a4f314d9d57bedc65.tar.gz
gcc-2778b98d9088057e96730a5a4f314d9d57bedc65.tar.bz2
system.h: Include libiberty.h.
* system.h: Include libiberty.h. * c-aux-info.c: Remove prototypes for concat/concat3. Change function `concat' from fixed parameters to variable parameters, as is done in libiberty. All callers of concat/concat3 changed to use the new `concat' with variable args. * cccp.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * cexp.y: Likewise. * collect2.c: Likewise. * config/1750a/1750a.h: Likewise. * cppalloc.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * dyn-string.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencheck.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * gengenrtl.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * getpwd.c: Likewise. * halfpic.c: Likewise. * hash.c: Likewise. * mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes in NEED_DECLARATION_* macros. * mips-tfile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. (fatal): Fix const-ification of variable `format' in !ANSI_PROTOTYPES case. * prefix.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid conflicting with function `spaces' from libiberty. * profile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * protoize.c: Likewise. * rtl.h: Likewise. * scan.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tree.h: Likewise. From-SVN: r23931
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index d6b2aa0..87868a0 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -1035,9 +1035,6 @@ static void pfatal_with_name PROTO((char *)) __attribute__ ((noreturn));
static void pipe_closed PROTO((int)) __attribute__ ((noreturn));
static void memory_full PROTO((void)) __attribute__ ((noreturn));
-GENERIC_PTR xmalloc PROTO((size_t));
-static GENERIC_PTR xrealloc PROTO((GENERIC_PTR, size_t));
-static GENERIC_PTR xcalloc PROTO((size_t, size_t));
static char *savestring PROTO((char *));
static void print_help PROTO((void));
@@ -10678,34 +10675,33 @@ memory_full ()
fatal ("Memory exhausted.");
}
-
-GENERIC_PTR
+PTR
xmalloc (size)
- size_t size;
+ size_t size;
{
- register GENERIC_PTR ptr = (GENERIC_PTR) malloc (size);
+ register PTR ptr = (PTR) malloc (size);
if (!ptr)
memory_full ();
return ptr;
}
-static GENERIC_PTR
+PTR
xrealloc (old, size)
- GENERIC_PTR old;
- size_t size;
+ PTR old;
+ size_t size;
{
- register GENERIC_PTR ptr = (GENERIC_PTR) realloc (old, size);
+ register PTR ptr = (PTR) realloc (old, size);
if (!ptr)
memory_full ();
return ptr;
}
-static GENERIC_PTR
+PTR
xcalloc (number, size)
- size_t number, size;
+ size_t number, size;
{
register size_t total = number * size;
- register GENERIC_PTR ptr = (GENERIC_PTR) malloc (total);
+ register PTR ptr = (PTR) malloc (total);
if (!ptr)
memory_full ();
bzero (ptr, total);