Can somebody explain the following code segment, from stdargs.h (from
linux 0.01)
#define __va_rounded_si ze(TYPE) \
(((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof
(int))va_rounde d_size
#define va_start(AP, LASTARG) \
(__builtin_save regs (), \
AP = ((char *) &(LASTARG) + __va_rounded_si ze (LASTARG)))
#define va_arg(AP, TYPE) \
(AP += __va_rounded_si ze (TYPE), \
*((TYPE *) (AP - __va_rounded_si ze (TYPE))))
What are the above macros trying to accomplish?
Tilak
linux 0.01)
#define __va_rounded_si ze(TYPE) \
(((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof
(int))va_rounde d_size
#define va_start(AP, LASTARG) \
(__builtin_save regs (), \
AP = ((char *) &(LASTARG) + __va_rounded_si ze (LASTARG)))
#define va_arg(AP, TYPE) \
(AP += __va_rounded_si ze (TYPE), \
*((TYPE *) (AP - __va_rounded_si ze (TYPE))))
What are the above macros trying to accomplish?
Tilak
Comment