2 Note that the type used in va_arg is supposed to match the
3 actual type **after default promotions**.
4 Thus, va_arg (..., short) is not valid. */
7 #ifndef __need___va_list
10 #undef __need___va_list
13 /* Use the system's macros with the system's compiler. */
35 /* Define __gnuc_va_list. */
37 #ifndef __GNUC_VA_LIST
38 #define __GNUC_VA_LIST
40 typedef char *__gnuc_va_list;
42 typedef void *__gnuc_va_list;
46 /* Define the standard macros for the user,
47 if this invocation was from the user program. */
50 /* Amount of space required in an argument list for an arg of type TYPE.
51 TYPE may alternatively be an expression whose type is used. */
53 #define __va_rounded_size(TYPE) \
54 (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
56 #define va_start(AP, LASTARG) \
57 (AP = ((char *) __builtin_next_arg ()))
59 void va_end (__gnuc_va_list); /* Defined in libgcc.a */
62 #define va_arg(AP, TYPE) \
63 (AP = (char *) (AP) + __va_rounded_size (TYPE), \
64 *((TYPE *) ((char *) (AP) - __va_rounded_size (TYPE))))
65 #endif /* _STDARG_H */
68 #endif /* not sparc */
75 /* Define va_list, if desired, from __gnuc_va_list. */
76 /* We deliberately do not define va_list when called from
77 stdio.h, because ANSI C says that stdio.h is not supposed to define
78 va_list. stdio.h needs to have access to that data type,
79 but must not use that name. It should use the name __gnuc_va_list,
80 which is safe because it is reserved for the implementation. */
82 #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */
90 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
92 /* The macro _VA_LIST is used in SCO Unix 3.2. */
96 typedef __gnuc_va_list va_list;
98 #endif /* _VA_LIST_ */
99 #endif /* _STDARG_H */
101 #endif /* __GNUC__ */
102 #endif /* not _STDARG_H */