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
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". */
111 /* In 4.3bsd-net2, _VA_LIST_ is defined by machine/ansi.h, but no
112 typedef for va_list is in that file. Undef _VA_LIST_ here
113 so we do define va_list. */
118 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
120 /* The macro _VA_LIST is used in SCO Unix 3.2. */
124 typedef __gnuc_va_list va_list;
125 #endif /* _VA_LIST */
126 #endif /* _VA_LIST_ */
128 /* I think that in 4.3bsd-net2 there is some need
129 to leave _VA_LIST_ undefined after. I don't know why. -- rms. */
134 /* The next BSD release (if there is one) wants this symbol to be
135 undefined instead of _VA_LIST_. */
140 #endif /* __GNUC__ */