diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-16 07:39:03 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-10-16 07:39:03 +0000 |
commit | 55e6b1b1880483d3998ecb10e76ff4c3d6a44bd1 (patch) | |
tree | 848d3bb7111334e4d216bc8006cb59a2adbbd7a7 /libiberty | |
parent | 006f94cdee02752dccc1322e7ce13fcff95b6936 (diff) | |
download | gcc-55e6b1b1880483d3998ecb10e76ff4c3d6a44bd1.tar.gz |
* asprintf.c: Consistently use either stdarg or varargs.
Bring over from devo.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15929 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 4 | ||||
-rw-r--r-- | libiberty/asprintf.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index b0dc9dca2ba..6b964483a45 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 15 19:13:48 1997 Ian Lance Taylor <ian@cygnus.com> + + * asprintf.c: Consistently use either stdarg or varargs. + Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net> * cplus-dem.c (demangle_signature): Don't look for return types on diff --git a/libiberty/asprintf.c b/libiberty/asprintf.c index 1cd63978037..5aaf3200f0d 100644 --- a/libiberty/asprintf.c +++ b/libiberty/asprintf.c @@ -22,14 +22,18 @@ Boston, MA 02111-1307, USA. */ #include "ansidecl.h" #include "libiberty.h" -#if defined __STDC__ || defined ALMOST_STDC +#if defined (ANSI_PROTOTYPES) || defined (ALMOST_STDC) +#define USE_STDARG +#endif + +#ifdef USE_STDARG #include <stdarg.h> #else #include <varargs.h> #endif /* VARARGS */ -#ifdef ANSI_PROTOTYPES +#ifdef USE_STDARG int asprintf (char **buf, const char *fmt, ...) #else @@ -42,7 +46,7 @@ asprintf (buf, fmt, va_alist) { int status; va_list ap; -#ifdef ANSI_PROTOTYPES +#ifdef USE_STDARG va_start (ap, fmt); #else va_start (ap); |