diff options
author | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2005-03-28 01:28:01 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2005-03-28 01:28:01 +0000 |
commit | 7a17ef5e63f029d589de5cb4e499b00cb0f620b5 (patch) | |
tree | b5aec1f785455ee50707717b6c5a6c16dfd4814f /libiberty/vasprintf.c | |
parent | 023d54e0f553da239db6017c5a602ee57e5c4467 (diff) | |
download | gcc-7a17ef5e63f029d589de5cb4e499b00cb0f620b5.zip gcc-7a17ef5e63f029d589de5cb4e499b00cb0f620b5.tar.gz gcc-7a17ef5e63f029d589de5cb4e499b00cb0f620b5.tar.bz2 |
ternary.h: Don't use PARAMS anymore.
include/
2005-03-27 Gabriel Dos Reis <gdr@integreable-solutions.net>
* ternary.h: Don't use PARAMS anymore.
libiberty/
2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 6/n.
* strerror.c (init_error_tables, errno_max, strerror,
strerrno,
strtoerrno, main): Use ISO C prototype style.
* strncasecmp.c (strncasecmp): Likewise.
* strncmp.c (strncmp): Likewise.
* strndup.c (strndup): Likewise.
* strrchr.c (strrchr): Likewise.
* strsignal.c (init_signal_tables, signo_max, strsignal,
strsigno, strtosigno, psignal, main): Likewise.
* strstr.c (strstr): Likewise.
* strtod.c (strtod, atof): Likewise.
* strtol.c (strtol): Likewise.
* strtoul.c (strtoul): Likewise.
* ternary.c (ternary_insert, ternary_cleanup, ternary_search,
ternary_recursivesearch): Likewise.
* tmpnam.c (tmpnam): Likewise.
* unlink-if-ordinary.c (unlink_if_ordinary): Likewise.
* vasprintf.c (int_vasprintf, vasprintf, checkit, main):
Likewise.
* vfork.c (vfork): Likewise.
* vfprintf.c (vfprintf): Likewise.
* vprintf.c (vprintf): Likewise.
* vsnprintf.c (vsnprintf, checkit, main): Likewise.
* vsprintf.c (vsprintf): Likewise.
* waitpid.c (waitpid): Likewise.
* xatexit.c (xatexit, xatexit_cleanup): Likewise.
* xexit.c (xexit): Likewise.
* xmalloc.c (xmalloc_set_program_name, xmalloc_failed,
xmalloc,
xcalloc, xrealloc): Likewise.
* xmemdup.c (xmemdup): Likewise.
* xstrdup.c (xstrdup): Likewise.
* xstrerror.c (xstrerror): Likewise.
* xstrndup.c (xstrndup): Likewise.
From-SVN: r97122
Diffstat (limited to 'libiberty/vasprintf.c')
-rw-r--r-- | libiberty/vasprintf.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c index 7eaf2b1..ff4b531 100644 --- a/libiberty/vasprintf.c +++ b/libiberty/vasprintf.c @@ -22,11 +22,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #endif #include <ansidecl.h> -#ifdef ANSI_PROTOTYPES #include <stdarg.h> -#else -#include <varargs.h> -#endif #if !defined (va_copy) && defined (__va_copy) # define va_copy(d,s) __va_copy((d),(s)) #endif @@ -62,13 +58,10 @@ not be allocated, minus one is returned and @code{NULL} is stored in */ -static int int_vasprintf PARAMS ((char **, const char *, va_list)); +static int int_vasprintf (char **, const char *, va_list); static int -int_vasprintf (result, format, args) - char **result; - const char *format; - va_list args; +int_vasprintf (char **result, const char *format, va_list args) { const char *p = format; /* Add one to make sure that it is never zero, which might cause malloc @@ -156,13 +149,11 @@ int_vasprintf (result, format, args) } int -vasprintf (result, format, args) - char **result; - const char *format; +vasprintf (char **result, const char *format, #if defined (_BSD_VA_LIST_) && defined (__FreeBSD__) - _BSD_VA_LIST_ args; + _BSD_VA_LIST_ args) #else - va_list args; + va_list args) #endif { return int_vasprintf (result, format, args); @@ -170,7 +161,7 @@ vasprintf (result, format, args) #ifdef TEST static void ATTRIBUTE_PRINTF_1 -checkit VPARAMS ((const char *format, ...)) +checkit (const char *format, ...) { char *result; VA_OPEN (args, format); @@ -187,10 +178,10 @@ checkit VPARAMS ((const char *format, ...)) free (result); } -extern int main PARAMS ((void)); +extern int main (void); int -main () +main (void) { checkit ("%d", 0x12345678); checkit ("%200d", 5); |