2 /* Use the system's macros with the system's compiler. */
5 /* Record that this is varargs.h; this turns off stdarg.h. */
28 #if defined(__hppa__) || defined(hp800)
40 /* On Next, erase any vestiges of stdarg.h. */
42 #ifdef _ANSI_STDARG_H_
45 #define _ANSI_STDARG_H_
52 #undef __va_rounded_size
56 /* In GCC version 2, we want an ellipsis at the end of the declaration
57 of the argument list. GCC version 1 can't parse it. */
60 #define __va_ellipsis ...
65 /* These macros implement traditional (non-ANSI) varargs
68 #define va_alist __builtin_va_alist
69 /* The ... causes current_function_varargs to be set in cc1. */
70 #define va_dcl int __builtin_va_alist; __va_ellipsis
72 /* Define __gnuc_va_list, just as in gstdarg.h. */
74 #ifndef __GNUC_VA_LIST
75 #define __GNUC_VA_LIST
76 #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX)
77 typedef char *__gnuc_va_list;
79 typedef void *__gnuc_va_list;
83 #define va_start(AP) AP=(char *) &__builtin_va_alist
87 #define __va_rounded_size(TYPE) \
88 (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
90 #define va_arg(AP, TYPE) \
91 (AP += __va_rounded_size (TYPE), \
92 *((TYPE *) (AP - __va_rounded_size (TYPE))))
94 #endif /* not alpha */
100 #endif /* not mips */
101 #endif /* not spur */
102 #endif /* not sparc */
103 #endif /* not _VARARGS_H */
105 /* Define va_list from __gnuc_va_list. */
107 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
113 /* SVR4.2 uses _VA_LIST for an internal alias for va_list,
114 so we must avoid testing it and setting it here. */
117 typedef __gnuc_va_list va_list;
118 #endif /* _VA_LIST_ */
120 #else /* not __SVR4_2__ */
122 /* On 4.3bsd-net2, make sure ansi.h is included, so we have
123 one less case to deal with in the following. */
124 #if defined (__BSD_NET2__) || defined (____386BSD____)
128 /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which remain
129 defined as long as the corresponding type is *not* defined. */
135 #endif /* _ANSI_H_ */
137 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
139 /* The macro _VA_LIST is used in SCO Unix 3.2. */
143 typedef __gnuc_va_list va_list;
144 #endif /* not _VA_LIST */
145 #endif /* not _VA_LIST_ */
147 #endif /* not __SVR4_2__ */
149 /* On 4.3bsd-net2, leave _VA_LIST_ undef to indicate va_list is defined. */
154 /* The next BSD release (if there is one) wants this symbol to be
155 undefined instead of _VA_LIST_. */
160 #endif /* __GNUC__ */