2 /* Use the system's macros with the system's compiler. */
5 /* Record that varargs.h is defined; this turns off stdarg.h. */
28 #if defined(__hppa__) || defined(hp800)
40 /* On Next, erase any vestiges of stdarg.h. */
47 #undef __va_rounded_size
51 /* In GCC version 2, we want an ellipsis at the end of the declaration
52 of the argument list. GCC version 1 can't parse it. */
55 #define __va_ellipsis ...
60 /* These macros implement traditional (non-ANSI) varargs
63 #define va_alist __builtin_va_alist
64 /* The ... causes current_function_varargs to be set in cc1. */
65 #define va_dcl int __builtin_va_alist; __va_ellipsis
67 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
71 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
72 /* But in 4.3bsd-net2, _VA_LIST_ has another meaning. So ignore it. */
73 #if !defined (_VA_LIST_) || defined (_ANSI_H)
74 /* The macro _VA_LIST is used in SCO Unix 3.2. */
80 /* Make this a macro rather than a typedef, so we can undef any other defn. */
81 #define va_list __va___list
82 typedef char * __va___list;
84 #endif /* !defined (_VA_LIST_) || defined (_ANSI_H) */
86 /* In 4.3bsd-net2, it is said we must #undef this.
87 I hope this successfully identifies that system.
88 I don't know why this works--rms. */
93 #define va_start(AP) AP=(char *) &__builtin_va_alist
97 #define __va_rounded_size(TYPE) \
98 (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
100 #define va_arg(AP, TYPE) \
101 (AP += __va_rounded_size (TYPE), \
102 *((TYPE *) (AP - __va_rounded_size (TYPE))))
104 #endif /* not alpha */
105 #endif /* not i960 */
106 #endif /* not hppa */
107 #endif /* not m88k */
109 #endif /* not i860 */
110 #endif /* not mips */
111 #endif /* not spur */
112 #endif /* not sparc */
113 #endif /* not _VARARGS_H */
115 #ifdef __GNUC_VA_LIST
116 /* If an include file defined __GNUC_VA_LIST,
117 copy it into va_list. */
119 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
123 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
125 /* The macro _VA_LIST is used in SCO Unix 3.2. */
129 typedef __gnuc_va_list va_list;
130 #endif /* _VA_LIST */
131 #endif /* _VA_LIST_ */
132 #endif /* __GNUC_VA_LIST */
134 #endif /* __GNUC__ */