Annotation of gcc/gstdarg.h, revision 1.1

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
        !            25: 
        !            26: #ifdef _HIDDEN_VA_LIST  /* On OSF1, this means varargs.h is "half-loaded".  */
        !            27: #undef _VA_LIST
        !            28: #endif
        !            29: 
        !            30: /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
        !            31: #ifndef _VA_LIST_
        !            32: /* The macro _VA_LIST is used in SCO Unix 3.2.  */
        !            33: #ifndef _VA_LIST
        !            34: #define _VA_LIST_
        !            35: #define _VA_LIST
        !            36: typedef char *va_list;
        !            37: #endif /* _VA_LIST */
        !            38: #endif /* _VA_LIST_ */
        !            39: 
        !            40: /* Amount of space required in an argument list for an arg of type TYPE.
        !            41:    TYPE may alternatively be an expression whose type is used.  */
        !            42: 
        !            43: #define __va_rounded_size(TYPE)  \
        !            44:   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
        !            45: 
        !            46: #ifndef __sparc__
        !            47: #define va_start(AP, LASTARG)                                          \
        !            48:  (AP = ((char *) __builtin_next_arg ()))
        !            49: #else
        !            50: #define va_start(AP, LASTARG)                                          \
        !            51:  (__builtin_saveregs (),                                               \
        !            52:   AP = ((char *) __builtin_next_arg ()))
        !            53: #endif
        !            54: 
        !            55: void va_end (va_list);         /* Defined in libgcc.a */
        !            56: #define va_end(AP)
        !            57: 
        !            58: #define va_arg(AP, TYPE)                                               \
        !            59:  (AP += __va_rounded_size (TYPE),                                      \
        !            60:   *((TYPE *) (AP - __va_rounded_size (TYPE))))
        !            61: 
        !            62: #endif /* not mips */
        !            63: #endif /* not hp9000s800 */
        !            64: #endif /* not i860 */
        !            65: #endif /* not m88k */
        !            66: #endif /* __GNUC__ */
        !            67: #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.