From 2778b98d9088057e96730a5a4f314d9d57bedc65 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 27 Nov 1998 10:09:17 +0000 Subject: 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 --- gcc/prefix.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gcc/prefix.c') diff --git a/gcc/prefix.c b/gcc/prefix.c index 387ff46..3e98ded 100644 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -73,7 +73,6 @@ static char *std_prefix = PREFIX; static char *get_key_value PROTO((char *)); static char *translate_name PROTO((char *)); -static char *concat PVPROTO((char *, ...)); static char *save_string PROTO((char *, int)); #ifdef _WIN32 @@ -110,23 +109,23 @@ get_key_value (key) This function is based on the one in libiberty. */ -static char * -concat VPROTO((char *first, ...)) +char * +concat VPROTO((const char *first, ...)) { register int length; register char *newstr; register char *end; - register char *arg; + register const char *arg; va_list args; #ifndef ANSI_PROTOTYPES - char *first; + const char *first; #endif /* First compute the size of the result and get sufficient memory. */ VA_START (args, first); #ifndef ANSI_PROTOTYPES - first = va_arg (args, char *); + first = va_arg (args, const char *); #endif arg = first; @@ -135,7 +134,7 @@ concat VPROTO((char *first, ...)) while (arg != 0) { length += strlen (arg); - arg = va_arg (args, char *); + arg = va_arg (args, const char *); } newstr = (char *) malloc (length + 1); @@ -154,7 +153,7 @@ concat VPROTO((char *first, ...)) { while (*arg) *end++ = *arg++; - arg = va_arg (args, char *); + arg = va_arg (args, const char *); } *end = '\000'; va_end (args); -- cgit v1.1