diff options
author | DJ Delorie <dj@delorie.com> | 2005-03-28 02:09:01 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2005-03-28 02:09:01 +0000 |
commit | 330f7c1a6218d3b4a10b5b571eee65f3d53b64ac (patch) | |
tree | c293e7d81ced8094d1f3e020d8eaf36173ea26a4 /libiberty/vasprintf.c | |
parent | 78535644ba911dce637b8f8f3f8488859558c605 (diff) | |
download | gdb-330f7c1a6218d3b4a10b5b571eee65f3d53b64ac.tar.gz |
merge from gcc
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 7eaf2b18d6f..ff4b5315199 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); |