2 /* Use the system's macros with the system's compiler. */
5 /* Record that varargs.h is defined; this turns off stdarg.h. */
37 /* On Next, erase any vestiges of stdarg.h. */
44 #undef __va_rounded_size
48 /* In GCC version 2, we want an ellipsis at the end of the declaration
49 of the argument list. GCC version 1 can't parse it. */
52 #define __va_ellipsis ...
57 /* These macros implement traditional (non-ANSI) varargs
60 #define va_alist __builtin_va_alist
61 /* The ... causes current_function_varargs to be set in cc1. */
62 #define va_dcl int __builtin_va_alist; __va_ellipsis
64 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
68 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
69 /* But in 4.3bsd-net2, _VA_LIST_ has another meaning. So ignore it. */
70 #if !defined (_VA_LIST_) || defined (_ANSI_H)
71 /* The macro _VA_LIST is used in SCO Unix 3.2. */
77 /* Make this a macro rather than a typedef, so we can undef any other defn. */
78 #define va_list __va___list
79 typedef char * __va___list;
81 #endif /* !defined (_VA_LIST_) || defined (_ANSI_H) */
83 /* In 4.3bsd-net2, it is said we must #undef this.
84 I hope this successfully identifies that system.
85 I don't know why this works--rms. */
90 #define va_start(AP) AP=(char *) &__builtin_va_alist
94 #define __va_rounded_size(TYPE) \
95 (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
97 #define va_arg(AP, TYPE) \
98 (AP += __va_rounded_size (TYPE), \
99 *((TYPE *) (AP - __va_rounded_size (TYPE))))
101 #endif /* not i960 */
102 #endif /* not hp800 */
103 #endif /* not m88k */
105 #endif /* not i860 */
106 #endif /* not mips */
107 #endif /* not spur */
108 #endif /* not sparc */
109 #endif /* not _VARARGS_H */
111 #ifdef __GNUC_VA_LIST
112 /* If an include file defined __GNUC_VA_LIST,
113 copy it into va_list. */
115 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
119 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
121 /* The macro _VA_LIST is used in SCO Unix 3.2. */
125 typedef __gnuc_va_list va_list;
126 #endif /* _VA_LIST */
127 #endif /* _VA_LIST_ */
128 #endif /* __GNUC_VA_LIST */
130 #endif /* __GNUC__ */