/* Use the system's macros with the system's compiler. */
/* Record that this is varargs.h; this turns off stdarg.h. */
#if defined(__hppa__) || defined(hp800)
/* On Next, erase any vestiges of stdarg.h. */
/* In GCC version 2, we want an ellipsis at the end of the declaration
of the argument list. GCC version 1 can't parse it. */
#define __va_ellipsis ...
/* These macros implement traditional (non-ANSI) varargs
#define va_alist __builtin_va_alist
/* The ... causes current_function_varargs to be set in cc1. */
#define va_dcl int __builtin_va_alist; __va_ellipsis
/* Define __gnuc_va_list, just as in gstdarg.h. */
#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
typedef char *__gnuc_va_list
;
typedef void *__gnuc_va_list
;
#define va_start(AP) AP=(char *) &__builtin_va_alist
#define __va_rounded_size(TYPE) \
(((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
#if defined (__arm__) || defined (__i386__) || defined (__ns32000__) || defined (__vax__)
/* This is for little-endian machines; small args are padded upward. */
#define va_arg(AP, TYPE) \
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
*((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE))))
/* This is for big-endian machines; small args are padded downward. */
#define va_arg(AP, TYPE) \
(AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \
*((TYPE *) (void *) ((char *) (AP) - ((sizeof (TYPE) < 4 \
: __va_rounded_size (TYPE))))))
#endif /* not _VARARGS_H */
/* Define va_list from __gnuc_va_list. */
#ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
so we must avoid testing it and setting it here. */
typedef __gnuc_va_list
va_list;
#else /* not __SVR4_2__ */
/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
But on BSD NET2 we must not test or define or undef it.
(Note that the comments in NET 2's ansi.h
are incorrect for _VA_LIST_--see stdio.h!) */
#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____)
/* The macro _VA_LIST is used in SCO Unix 3.2. */
#if !(defined (__BSD_NET2__) || defined (____386BSD____))
typedef __gnuc_va_list
va_list;
#endif /* not _VA_LIST */
#endif /* not _VA_LIST_ */
#endif /* not __SVR4_2__ */
/* The next BSD release (if there is one) wants this symbol to be
undefined instead of _VA_LIST_. */