Annotation of gcc/gstdarg.h, revision 1.1.1.2

1.1       root        1: /* stdarg.h for GNU.
                      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.  */
                      5: 
                      6: #ifndef _STDARG_H
                      7: #define _STDARG_H
                      8: 
                      9: #ifndef __GNUC__
                     10: /* Use the system's macros with the system's compiler.  */
                     11: #include <stdarg.h>
                     12: #else
                     13: #ifdef __m88k__
                     14: #include "va-m88k.h"
                     15: #else
                     16: #ifdef __i860__
                     17: #include "va-i860.h"
                     18: #else
                     19: #ifdef __hp9000s800__
                     20: #include "va-hp800.h"
                     21: #else
                     22: #ifdef __mips__
                     23: #include "va-mips.h"
                     24: #else
1.1.1.2 ! root       25: #ifdef __sparc__
        !            26: #include "va-sparc.h"
        !            27: #else
1.1       root       28: 
                     29: #ifdef _HIDDEN_VA_LIST  /* On OSF1, this means varargs.h is "half-loaded".  */
                     30: #undef _VA_LIST
                     31: #endif
                     32: 
                     33: /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
                     34: #ifndef _VA_LIST_
                     35: /* The macro _VA_LIST is used in SCO Unix 3.2.  */
                     36: #ifndef _VA_LIST
                     37: #define _VA_LIST_
                     38: #define _VA_LIST
                     39: typedef char *va_list;
                     40: #endif /* _VA_LIST */
                     41: #endif /* _VA_LIST_ */
                     42: 
                     43: /* Amount of space required in an argument list for an arg of type TYPE.
                     44:    TYPE may alternatively be an expression whose type is used.  */
                     45: 
                     46: #define __va_rounded_size(TYPE)  \
                     47:   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
                     48: 
                     49: #define va_start(AP, LASTARG)                                          \
                     50:  (AP = ((char *) __builtin_next_arg ()))
                     51: 
                     52: void va_end (va_list);         /* Defined in libgcc.a */
                     53: #define va_end(AP)
                     54: 
                     55: #define va_arg(AP, TYPE)                                               \
                     56:  (AP += __va_rounded_size (TYPE),                                      \
                     57:   *((TYPE *) (AP - __va_rounded_size (TYPE))))
                     58: 
1.1.1.2 ! root       59: #endif /* not sparc */
1.1       root       60: #endif /* not mips */
                     61: #endif /* not hp9000s800 */
                     62: #endif /* not i860 */
                     63: #endif /* not m88k */
                     64: #endif /* __GNUC__ */
                     65: #endif /* _STDARG_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.