Annotation of gcc/gvarargs.h, revision 1.1.1.1

1.1       root        1: #ifndef __GNUC__
                      2: /* Use the system's macros with the system's compiler.  */
                      3: #include <varargs.h>
                      4: #else
                      5: /* Record that varargs.h is defined; this turns off stdarg.h.  */
                      6: 
                      7: #ifndef _VARARGS_H
                      8: #define _VARARGS_H
                      9: 
                     10: #ifdef __sparc__
                     11: #include "va-sparc.h"
                     12: #else
                     13: #ifdef __spur__
                     14: #include "va-spur.h"
                     15: #else
                     16: #ifdef __mips__
                     17: #include "va-mips.h"
                     18: #else
                     19: #ifdef __i860__
                     20: #include "va-i860.h"
                     21: #else
                     22: #ifdef __pyr__
                     23: #include "va-pyr.h"
                     24: #else
                     25: #ifdef __m88k__
                     26: #include "va-m88k.h"
                     27: #else
                     28: #ifdef __hp9000s800__
                     29: #include "va-hp800.h"
                     30: #else
                     31: 
                     32: #ifdef __NeXT__
                     33: 
                     34: /* On Next, erase any vestiges of stdarg.h.  */
                     35: 
                     36: #undef va_alist
                     37: #undef va_dcl
                     38: #undef va_list
                     39: #undef va_start
                     40: #undef va_end
                     41: #undef __va_rounded_size
                     42: #undef va_arg
                     43: #endif  /* __NeXT__ */
                     44: 
                     45: /* In GCC version 2, we want an ellipsis at the end of the declaration
                     46:    of the argument list.  GCC version 1 can't parse it.  */
                     47: 
                     48: #if __GNUC__ > 1
                     49: #define __va_ellipsis ...
                     50: #else
                     51: #define __va_ellipsis
                     52: #endif
                     53: 
                     54: /* These macros implement traditional (non-ANSI) varargs
                     55:    for GNU C.  */
                     56: 
                     57: #define va_alist  __builtin_va_alist
                     58: /* The ... causes current_function_varargs to be set in cc1.  */
                     59: #define va_dcl    int __builtin_va_alist; __va_ellipsis
                     60: 
                     61: #ifdef _HIDDEN_VA_LIST  /* On OSF1, this means varargs.h is "half-loaded".  */
                     62: #undef _VA_LIST
                     63: #endif
                     64: 
                     65: /* The macro _VA_LIST_ is the same thing used by this file in Ultrix.  */
                     66: /* But in 4.3bsd-net2, _VA_LIST_ has another meaning.  So ignore it.  */
                     67: #if !defined (_VA_LIST_) || defined (_ANSI_H)
                     68: /* The macro _VA_LIST is used in SCO Unix 3.2.  */
                     69: #ifndef _VA_LIST
                     70: #ifndef _VA_LIST_
                     71: #define _VA_LIST_
                     72: #endif
                     73: #define _VA_LIST
                     74: /* Make this a macro rather than a typedef, so we can undef any other defn.  */
                     75: #define va_list __va___list
                     76: typedef char * __va___list;
                     77: #endif /* _VA_LIST */
                     78: #endif /* !defined (_VA_LIST_) || defined (_ANSI_H) */
                     79: 
                     80: /*  In 4.3bsd-net2, it is said we must #undef this.
                     81:     I hope this successfully identifies that system.
                     82:     I don't know why this works--rms.  */
                     83: #ifdef _ANSI_H
                     84: #undef _VA_LIST_
                     85: #endif
                     86: 
                     87: #define va_start(AP)  AP=(char *) &__builtin_va_alist
                     88: 
                     89: #define va_end(AP)
                     90: 
                     91: #define __va_rounded_size(TYPE)  \
                     92:   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
                     93: 
                     94: #define va_arg(AP, TYPE)                                               \
                     95:  (AP += __va_rounded_size (TYPE),                                      \
                     96:   *((TYPE *) (AP - __va_rounded_size (TYPE))))
                     97: 
                     98: #endif /* not hp800 */
                     99: #endif /* not m88k */
                    100: #endif /* not pyr */
                    101: #endif /* not i860 */
                    102: #endif /* not mips */
                    103: #endif /* not spur */
                    104: #endif /* not sparc */
                    105: #endif /* not _VARARGS_H */
                    106: #endif /* __GNUC__ */

unix.superglobalmegacorp.com

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