/* * stdarg for DLX */ /* Define __gnuc_va_list. */ #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST typedef void *__gnuc_va_list; #endif /* Define the standard macros for the user, if this invocation was from the user program. */ #ifdef _STDARG_H /* Amount of space required in an argument list for an arg of type TYPE. TYPE may alternatively be an expression whose type is used. */ #define __va_rounded_size(TYPE) \ (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) #define va_start(AP, LASTARG) \ (AP = ((__gnuc_va_list) __builtin_next_arg (LASTARG))) #undef va_end void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #define va_end(AP) ((void)0) /* We cast to void * and then to TYPE * because this avoids a warning about increasing the alignment requirement. */ /* This is for big-endian machines; small args are padded downward. */ #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (((long)(AP)+(__va_rounded_size(TYPE)-1))&~(__va_rounded_size(TYPE)-1)) + __va_rounded_size (TYPE)), \ *((TYPE *) (void *) ((char *) (AP) \ - ((sizeof (TYPE) < 4 \ ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) #endif /* _STDARG_H */