mirror of git://gcc.gnu.org/git/gcc.git
asprintf.c: Consistently use either stdarg or varargs.
* asprintf.c: Consistently use either stdarg or varargs. Bring over from devo. From-SVN: r15929
This commit is contained in:
parent
2636fde4ba
commit
a6e74b833c
|
@ -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>
|
Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
|
||||||
|
|
||||||
* cplus-dem.c (demangle_signature): Don't look for return types on
|
* cplus-dem.c (demangle_signature): Don't look for return types on
|
||||||
|
|
|
@ -22,14 +22,18 @@ Boston, MA 02111-1307, USA. */
|
||||||
#include "ansidecl.h"
|
#include "ansidecl.h"
|
||||||
#include "libiberty.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>
|
#include <stdarg.h>
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <varargs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* VARARGS */
|
/* VARARGS */
|
||||||
#ifdef ANSI_PROTOTYPES
|
#ifdef USE_STDARG
|
||||||
int
|
int
|
||||||
asprintf (char **buf, const char *fmt, ...)
|
asprintf (char **buf, const char *fmt, ...)
|
||||||
#else
|
#else
|
||||||
|
@ -42,7 +46,7 @@ asprintf (buf, fmt, va_alist)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
#ifdef ANSI_PROTOTYPES
|
#ifdef USE_STDARG
|
||||||
va_start (ap, fmt);
|
va_start (ap, fmt);
|
||||||
#else
|
#else
|
||||||
va_start (ap);
|
va_start (ap);
|
||||||
|
|
Loading…
Reference in New Issue