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. */
22 /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. */
24 /* The macro _VA_LIST is used in SCO Unix 3.2. */
28 typedef char *va_list;
30 #endif /* _VA_LIST_ */
32 /* Amount of space required in an argument list for an arg of type TYPE.
33 TYPE may alternatively be an expression whose type is used. */
35 #define __va_rounded_size(TYPE) \
36 (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
39 #define va_start(AP, LASTARG) \
40 (AP = ((char *) __builtin_next_arg ()))
42 #define va_start(AP, LASTARG) \
43 (__builtin_saveregs (), \
44 AP = ((char *) __builtin_next_arg ()))
47 void va_end (va_list); /* Defined in libgcc.a */
50 #define va_arg(AP, TYPE) \
51 (AP += __va_rounded_size (TYPE), \
52 *((TYPE *) (AP - __va_rounded_size (TYPE))))
55 #endif /* not hp9000s800 */
58 #endif /* _STDARG_H */