Annotation of gcc/gstddef.h, revision 1.1.1.4

1.1       root        1: #ifndef _STDDEF_H
                      2: #ifndef _STDDEF_H_
1.1.1.4 ! root        3: #ifndef _ANSI_STDDEF_H
1.1.1.3   root        4: 
                      5: /* Any one of these symbols __need_* means that GNU libc
                      6:    wants us just to define one data type.  So don't define
                      7:    the symbols that indicate this file's entire job has been done.  */
                      8: #if (!defined(__need_wchar_t) && !defined(__need_size_t)       \
                      9:      && !defined(__need_ptrdiff_t) && !defined(__need_NULL))
1.1       root       10: #define _STDDEF_H
                     11: #define _STDDEF_H_
1.1.1.4 ! root       12: /* [email protected] says the NeXT needs this.  */
        !            13: #define _ANSI_STDDEF_H
1.1.1.3   root       14: #endif
1.1       root       15: 
                     16: #ifndef __sys_stdtypes_h
1.1.1.4 ! root       17: /* This avoids lossage on SunOS but only if stdtypes.h comes first.
1.1       root       18:    There's no way to win with the other order!  Sun lossage.  */
                     19: 
1.1.1.4 ! root       20: /* On 4.3bsd-net2, make sure ansi.h is included, so we have
        !            21:    one less case to deal with in the following.  */
        !            22: #if defined (__BSD_NET2__) || defined (____386BSD____)
        !            23: #include <machine/ansi.h>
        !            24: #endif
        !            25: 
        !            26: /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
        !            27:     defined if the corresponding type is *not* defined.  */
        !            28: #ifdef _ANSI_H_
        !            29: #ifndef _SIZE_T_
        !            30: #define _SIZE_T
        !            31: #endif
        !            32: #ifndef _PTRDIFF_T_
        !            33: #define _PTRDIFF_T
        !            34: #endif
        !            35: #ifndef _WCHAR_T_
        !            36: #define _WCHAR_T
        !            37: #endif
        !            38: #undef _PTRDIFF_T_
        !            39: #ifndef __need_ptrdiff_t
        !            40: #undef _SIZE_T_
        !            41: #undef _WCHAR_T_
        !            42: #endif
        !            43: #endif /* _ANSI_H_ */
        !            44: 
1.1       root       45: /* In case nobody has defined these types, but we aren't running under
                     46:    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
                     47:    __WCHAR_TYPE__ have reasonable values.  This can happen if the
                     48:    parts of GCC is compiled by an older compiler, that actually
                     49:    include gstddef.h, such as collect2.  */
                     50: 
                     51: /* Signed type of difference of two pointers.  */
                     52: 
1.1.1.4 ! root       53: /* Define this type if we are doing the whole job,
        !            54:    or if we want this type in particular.  */
        !            55: #if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
1.1       root       56: #ifndef _PTRDIFF_T     /* in case <sys/types.h> has defined it. */
1.1.1.2   root       57: #ifndef _T_PTRDIFF_
1.1       root       58: #ifndef _T_PTRDIFF
                     59: #ifndef __PTRDIFF_T
                     60: #ifndef _PTRDIFF_T_
                     61: #ifndef ___int_ptrdiff_t_h
1.1.1.2   root       62: #ifndef _GCC_PTRDIFF_T
1.1       root       63: #define _PTRDIFF_T
1.1.1.2   root       64: #define _T_PTRDIFF_
1.1       root       65: #define _T_PTRDIFF
                     66: #define __PTRDIFF_T
                     67: #define _PTRDIFF_T_
                     68: #define ___int_ptrdiff_t_h
1.1.1.2   root       69: #define _GCC_PTRDIFF_T
1.1       root       70: #ifndef __PTRDIFF_TYPE__
                     71: #define __PTRDIFF_TYPE__ long int
                     72: #endif
                     73: typedef __PTRDIFF_TYPE__ ptrdiff_t;
1.1.1.2   root       74: #endif /* _GCC_PTRDIFF_T */
1.1       root       75: #endif /* ___int_ptrdiff_t_h */
                     76: #endif /* _PTRDIFF_T_ */
                     77: #endif /* __PTRDIFF_T */
                     78: #endif /* _T_PTRDIFF */
1.1.1.2   root       79: #endif /* _T_PTRDIFF_ */
1.1       root       80: #endif /* _PTRDIFF_T */
                     81: 
1.1.1.3   root       82: /* If this symbol has done its job, get rid of it.  */
                     83: #undef __need_ptrdiff_t
                     84: 
1.1.1.4 ! root       85: #endif /* _STDDEF_H or __need_ptrdiff_t.  */
        !            86: 
1.1       root       87: /* Unsigned type of `sizeof' something.  */
                     88: 
1.1.1.4 ! root       89: /* Define this type if we are doing the whole job,
        !            90:    or if we want this type in particular.  */
        !            91: #if defined (_STDDEF_H) || defined (__need_size_t)
1.1       root       92: #ifndef _SIZE_T        /* in case <sys/types.h> has defined it. */
1.1.1.2   root       93: #ifndef _T_SIZE_
1.1       root       94: #ifndef _T_SIZE
                     95: #ifndef __SIZE_T
                     96: #ifndef _SIZE_T_
                     97: #ifndef ___int_size_t_h
1.1.1.2   root       98: #ifndef _GCC_SIZE_T
1.1.1.3   root       99: #ifndef _SIZET_
1.1       root      100: #define _SIZE_T
1.1.1.2   root      101: #define _T_SIZE_
1.1       root      102: #define _T_SIZE
                    103: #define __SIZE_T
                    104: #define _SIZE_T_
                    105: #define ___int_size_t_h
1.1.1.2   root      106: #define _GCC_SIZE_T
1.1.1.3   root      107: #define _SIZET_
1.1       root      108: #ifndef __SIZE_TYPE__
                    109: #define __SIZE_TYPE__ long unsigned int
                    110: #endif
                    111: typedef __SIZE_TYPE__ size_t;
1.1.1.3   root      112: #endif /* _SIZET_ */
1.1.1.2   root      113: #endif /* _GCC_SIZE_T */
1.1       root      114: #endif /* ___int_size_t_h */
                    115: #endif /* _SIZE_T_ */
                    116: #endif /* __SIZE_T */
                    117: #endif /* _T_SIZE */
1.1.1.2   root      118: #endif /* _T_SIZE_ */
1.1       root      119: #endif /* _SIZE_T */
1.1.1.3   root      120: #undef __need_size_t
1.1.1.4 ! root      121: #endif /* _STDDEF_H or __need_size_t.  */
1.1       root      122: 
1.1.1.3   root      123: 
                    124: /* Wide character type.
                    125:    Locale-writers should change this as necessary to
                    126:    be big enough to hold unique values not between 0 and 127,
                    127:    and not (wchar_t) -1, for each defined multibyte character.  */
1.1       root      128: 
1.1.1.4 ! root      129: /* Define this type if we are doing the whole job,
        !           130:    or if we want this type in particular.  */
        !           131: #if defined (_STDDEF_H) || defined (__need_wchar_t)
1.1       root      132: #ifndef _WCHAR_T
                    133: #ifndef _T_WCHAR_
                    134: #ifndef _T_WCHAR
                    135: #ifndef __WCHAR_T
                    136: #ifndef _WCHAR_T_
                    137: #ifndef ___int_wchar_t_h
1.1.1.2   root      138: #ifndef _GCC_WCHAR_T
1.1       root      139: #define _WCHAR_T
                    140: #define _T_WCHAR_
                    141: #define _T_WCHAR
                    142: #define __WCHAR_T
                    143: #define _WCHAR_T_
                    144: #define ___int_wchar_t_h
1.1.1.2   root      145: #define _GCC_WCHAR_T
1.1       root      146: #ifndef __WCHAR_TYPE__
                    147: #define __WCHAR_TYPE__ int
                    148: #endif
1.1.1.4 ! root      149: #ifdef __GNUG__
        !           150: /* In C++, wchar_t is a distinct basic type,
        !           151:    and we can expect __wchar_t to be defined by cc1plus.  */
        !           152: typedef __wchar_t wchar_t;
        !           153: #else
        !           154: /* In C, cpp tells us which type to make an alias for.  */
1.1       root      155: typedef __WCHAR_TYPE__ wchar_t;
1.1.1.4 ! root      156: #endif
1.1       root      157: #endif
                    158: #endif
                    159: #endif
                    160: #endif
                    161: #endif
                    162: #endif
1.1.1.2   root      163: #endif
1.1.1.3   root      164: #undef __need_wchar_t
1.1.1.4 ! root      165: #endif /* _STDDEF_H or __need_wchar_t.  */
        !           166: 
        !           167: /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
        !           168:     are already defined.  We need not worry about the case of wanting just
        !           169:     one of these types, not on 4.3bsd-net2, because only the GNU libc
        !           170:     header files do that.  */
        !           171: #ifdef _ANSI_H_
        !           172: #undef _PTRDIFF_T_
        !           173: #ifdef _STDDEF_H /* This is a kludge.
        !           174:                    _STDDEF_H is defined when we are using the whole file,
        !           175:                    undefined when obstack.h wants just ptrdiff_t.  */
        !           176: #undef _SIZE_T_
        !           177: #undef _WCHAR_T_
        !           178: #endif
        !           179: #endif
1.1       root      180: 
                    181: #endif /* __sys_stdtypes_h */
                    182: 
                    183: /* A null pointer constant.  */
                    184: 
1.1.1.3   root      185: #if defined (_STDDEF_H) || defined (__need_NULL)
1.1       root      186: #undef NULL            /* in case <stdio.h> has defined it. */
                    187: #define NULL ((void *)0)
1.1.1.3   root      188: #endif /* NULL not defined and <stddef.h> or need NULL.  */
                    189: #undef __need_NULL
                    190: 
                    191: #ifdef _STDDEF_H
1.1       root      192: 
                    193: /* Offset of member MEMBER in a struct of type TYPE.  */
                    194: 
                    195: #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
                    196: 
1.1.1.3   root      197: #endif /* _STDDEF_H was defined this time */
1.1.1.4 ! root      198: 
        !           199: #endif /* _ANSI_STDDEF_H was not defined before */
1.1.1.3   root      200: #endif /* _STDDEF_H_ was not defined before */
                    201: #endif /* _STDDEF_H was not defined before */

unix.superglobalmegacorp.com

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