Commit 0a85964e by Richard Stallman

*** empty log message ***

From-SVN: r1294
parent 59d52763
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
Thus, va_arg (..., short) is not valid. */ Thus, va_arg (..., short) is not valid. */
#ifndef _STDARG_H #ifndef _STDARG_H
#ifndef __need___va_list
#define _STDARG_H #define _STDARG_H
#endif
#undef __need___va_list
#ifndef __GNUC__ #ifndef __GNUC__
/* Use the system's macros with the system's compiler. */ /* Use the system's macros with the system's compiler. */
...@@ -29,23 +32,20 @@ ...@@ -29,23 +32,20 @@
#include "va-i960.h" #include "va-i960.h"
#else #else
#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ /* Define __gnuc_va_list. */
#undef _VA_LIST
#endif
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */ #ifndef __GNUC_VA_LIST
#ifndef _VA_LIST_ #define __GNUC_VA_LIST
/* The macro _VA_LIST is used in SCO Unix 3.2. */ #ifdef __svr4__
#ifndef _VA_LIST typedef char *__gnuc_va_list;
#define _VA_LIST_
#define _VA_LIST
#ifndef __svr4__
typedef char *va_list;
#else #else
typedef void *va_list; typedef void *__gnuc_va_list;
#endif #endif
#endif /* _VA_LIST */ #endif
#endif /* _VA_LIST_ */
/* Define the standard macros for the user,
if this invocation was from the user program. */
#ifdef __STDARG_H
/* Amount of space required in an argument list for an arg of type TYPE. /* Amount of space required in an argument list for an arg of type TYPE.
TYPE may alternatively be an expression whose type is used. */ TYPE may alternatively be an expression whose type is used. */
...@@ -56,12 +56,13 @@ typedef void *va_list; ...@@ -56,12 +56,13 @@ typedef void *va_list;
#define va_start(AP, LASTARG) \ #define va_start(AP, LASTARG) \
(AP = ((char *) __builtin_next_arg ())) (AP = ((char *) __builtin_next_arg ()))
void va_end (va_list); /* Defined in libgcc.a */ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
#define va_end(AP) #define va_end(AP)
#define va_arg(AP, TYPE) \ #define va_arg(AP, TYPE) \
(AP = ((char *) (AP)) += __va_rounded_size (TYPE), \ (AP = ((char *) (AP)) += __va_rounded_size (TYPE), \
*((TYPE *) ((char *) (AP) - __va_rounded_size (TYPE)))) *((TYPE *) ((char *) (AP) - __va_rounded_size (TYPE))))
#endif /* _STDARG_H */
#endif /* not i960 */ #endif /* not i960 */
#endif /* not sparc */ #endif /* not sparc */
...@@ -69,5 +70,24 @@ void va_end (va_list); /* Defined in libgcc.a */ ...@@ -69,5 +70,24 @@ void va_end (va_list); /* Defined in libgcc.a */
#endif /* not hp9000s800 */ #endif /* not hp9000s800 */
#endif /* not i860 */ #endif /* not i860 */
#endif /* not m88k */ #endif /* not m88k */
#endif /* __GNUC__ */
#ifdef _STDARG_H
/* Define va_list, if desired, from __gnuc_va_list. */
#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
#undef _VA_LIST
#endif
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
#ifndef _VA_LIST_
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#ifndef _VA_LIST
#define _VA_LIST_
#define _VA_LIST
typedef __gnuc_va_list va_list;
#endif /* _VA_LIST */
#endif /* _VA_LIST_ */
#endif /* _STDARG_H */ #endif /* _STDARG_H */
#endif /* __GNUC__ */
#endif /* not _STDARG_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment