Annotation of gcc/ginclude/stddef.h, revision 1.1.1.1

1.1       root        1: #ifndef _STDDEF_H
                      2: #ifndef _STDDEF_H_
                      3: #ifndef _ANSI_STDDEF_H
                      4: #ifndef __STDDEF_H__
                      5: 
                      6: /* Any one of these symbols __need_* means that GNU libc
                      7:    wants us just to define one data type.  So don't define
                      8:    the symbols that indicate this file's entire job has been done.  */
                      9: #if (!defined(__need_wchar_t) && !defined(__need_size_t)       \
                     10:      && !defined(__need_ptrdiff_t) && !defined(__need_NULL))
                     11: #define _STDDEF_H
                     12: #define _STDDEF_H_
                     13: /* [email protected] says the NeXT needs this.  */
                     14: #define _ANSI_STDDEF_H
                     15: /* Irix 5.1 needs this.  */
                     16: #define __STDDEF_H__
                     17: #endif
                     18: 
                     19: #ifndef __sys_stdtypes_h
                     20: /* This avoids lossage on SunOS but only if stdtypes.h comes first.
                     21:    There's no way to win with the other order!  Sun lossage.  */
                     22: 
                     23: /* On 4.3bsd-net2, make sure ansi.h is included, so we have
                     24:    one less case to deal with in the following.  */
                     25: #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
                     26: #include <machine/ansi.h>
                     27: #endif
                     28: 
                     29: /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
                     30:     defined if the corresponding type is *not* defined.  */
                     31: #ifdef _ANSI_H_
                     32: #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
                     33: #define _SIZE_T
                     34: #endif
                     35: #if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
                     36: #define _PTRDIFF_T
                     37: #endif
                     38: /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
                     39:    instead of _WCHAR_T_. */
                     40: #if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
                     41: #ifndef _BSD_WCHAR_T_
                     42: #define _WCHAR_T
                     43: #endif
                     44: #endif
                     45: /* Undef _FOO_T_ if we are supposed to define foo_t.  */
                     46: #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
                     47: #undef _PTRDIFF_T_
                     48: #undef _BSD_PTRDIFF_T_
                     49: #endif
                     50: #if defined (__need_size_t) || defined (_STDDEF_H_)
                     51: #undef _SIZE_T_
                     52: #undef _BSD_SIZE_T_
                     53: #endif
                     54: #if defined (__need_wchar_t) || defined (_STDDEF_H_)
                     55: #undef _WCHAR_T_
                     56: #undef _BSD_WCHAR_T_
                     57: #endif
                     58: #endif /* _ANSI_H_ */
                     59: 
                     60: /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
                     61:    Just ignore it.  */
                     62: #if defined (__sequent__) && defined (_PTRDIFF_T_)
                     63: #undef _PTRDIFF_T_
                     64: #endif
                     65: 
                     66: /* In case nobody has defined these types, but we aren't running under
                     67:    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
                     68:    __WCHAR_TYPE__ have reasonable values.  This can happen if the
                     69:    parts of GCC is compiled by an older compiler, that actually
                     70:    include gstddef.h, such as collect2.  */
                     71: 
                     72: /* Signed type of difference of two pointers.  */
                     73: 
                     74: /* Define this type if we are doing the whole job,
                     75:    or if we want this type in particular.  */
                     76: #if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
                     77: #ifndef _PTRDIFF_T     /* in case <sys/types.h> has defined it. */
                     78: #ifndef _T_PTRDIFF_
                     79: #ifndef _T_PTRDIFF
                     80: #ifndef __PTRDIFF_T
                     81: #ifndef _PTRDIFF_T_
                     82: #ifndef _BSD_PTRDIFF_T_
                     83: #ifndef ___int_ptrdiff_t_h
                     84: #ifndef _GCC_PTRDIFF_T
                     85: #define _PTRDIFF_T
                     86: #define _T_PTRDIFF_
                     87: #define _T_PTRDIFF
                     88: #define __PTRDIFF_T
                     89: #define _PTRDIFF_T_
                     90: #define _BSD_PTRDIFF_T_
                     91: #define ___int_ptrdiff_t_h
                     92: #define _GCC_PTRDIFF_T
                     93: #ifndef __PTRDIFF_TYPE__
                     94: #define __PTRDIFF_TYPE__ long int
                     95: #endif
                     96: typedef __PTRDIFF_TYPE__ ptrdiff_t;
                     97: #endif /* _GCC_PTRDIFF_T */
                     98: #endif /* ___int_ptrdiff_t_h */
                     99: #endif /* _BSD_PTRDIFF_T_ */
                    100: #endif /* _PTRDIFF_T_ */
                    101: #endif /* __PTRDIFF_T */
                    102: #endif /* _T_PTRDIFF */
                    103: #endif /* _T_PTRDIFF_ */
                    104: #endif /* _PTRDIFF_T */
                    105: 
                    106: /* If this symbol has done its job, get rid of it.  */
                    107: #undef __need_ptrdiff_t
                    108: 
                    109: #endif /* _STDDEF_H or __need_ptrdiff_t.  */
                    110: 
                    111: /* Unsigned type of `sizeof' something.  */
                    112: 
                    113: /* Define this type if we are doing the whole job,
                    114:    or if we want this type in particular.  */
                    115: #if defined (_STDDEF_H) || defined (__need_size_t)
                    116: #ifndef _SIZE_T        /* in case <sys/types.h> has defined it. */
                    117: #ifndef _SYS_SIZE_T_H
                    118: #ifndef _T_SIZE_
                    119: #ifndef _T_SIZE
                    120: #ifndef __SIZE_T
                    121: #ifndef _SIZE_T_
                    122: #ifndef _BSD_SIZE_T_
                    123: #ifndef _SIZE_T_DEFINED_
                    124: #ifndef ___int_size_t_h
                    125: #ifndef _GCC_SIZE_T
                    126: #ifndef _SIZET_
                    127: #ifndef __size_t
                    128: #define _SIZE_T
                    129: #define _SYS_SIZE_T_H
                    130: #define _T_SIZE_
                    131: #define _T_SIZE
                    132: #define __SIZE_T
                    133: #define _SIZE_T_
                    134: #define _BSD_SIZE_T_
                    135: #define _SIZE_T_DEFINED_
                    136: #define ___int_size_t_h
                    137: #define _GCC_SIZE_T
                    138: #define _SIZET_
                    139: #define __size_t
                    140: #ifndef __SIZE_TYPE__
                    141: #define __SIZE_TYPE__ long unsigned int
                    142: #endif
                    143: #if !(defined (__GNUG__) && defined (size_t))
                    144: typedef __SIZE_TYPE__ size_t;
                    145: #endif /* !(defined (__GNUG__) && defined (size_t)) */
                    146: #endif /* __size_t */
                    147: #endif /* _SIZET_ */
                    148: #endif /* _GCC_SIZE_T */
                    149: #endif /* ___int_size_t_h */
                    150: #endif /* _SIZE_T_DEFINED_ */
                    151: #endif /* _BSD_SIZE_T_ */
                    152: #endif /* _SIZE_T_ */
                    153: #endif /* __SIZE_T */
                    154: #endif /* _T_SIZE */
                    155: #endif /* _T_SIZE_ */
                    156: #endif /* _SYS_SIZE_T_H */
                    157: #endif /* _SIZE_T */
                    158: #undef __need_size_t
                    159: #endif /* _STDDEF_H or __need_size_t.  */
                    160: 
                    161: 
                    162: /* Wide character type.
                    163:    Locale-writers should change this as necessary to
                    164:    be big enough to hold unique values not between 0 and 127,
                    165:    and not (wchar_t) -1, for each defined multibyte character.  */
                    166: 
                    167: /* Define this type if we are doing the whole job,
                    168:    or if we want this type in particular.  */
                    169: #if defined (_STDDEF_H) || defined (__need_wchar_t)
                    170: #ifndef _WCHAR_T
                    171: #ifndef _T_WCHAR_
                    172: #ifndef _T_WCHAR
                    173: #ifndef __WCHAR_T
                    174: #ifndef _WCHAR_T_
                    175: #ifndef _BSD_WCHAR_T_
                    176: #ifndef _WCHAR_T_DEFINED_
                    177: #ifndef _WCHAR_T_H
                    178: #ifndef ___int_wchar_t_h
                    179: #ifndef __INT_WCHAR_T_H
                    180: #ifndef _GCC_WCHAR_T
                    181: #define _WCHAR_T
                    182: #define _T_WCHAR_
                    183: #define _T_WCHAR
                    184: #define __WCHAR_T
                    185: #define _WCHAR_T_
                    186: #define _BSD_WCHAR_T_
                    187: #define _WCHAR_T_DEFINED_
                    188: #define _WCHAR_T_H
                    189: #define ___int_wchar_t_h
                    190: #define __INT_WCHAR_T_H
                    191: #define _GCC_WCHAR_T
                    192: 
                    193: /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
                    194:    instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
                    195:    symbols in the _FOO_T_ family, stays defined even after its
                    196:    corresponding type is defined).  If we define wchar_t, then we
                    197:    must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
                    198:    we undef _WCHAR_T_, then we must also define rune_t, since 
                    199:    headers like runetype.h assume that if machine/ansi.h is included,
                    200:    and _BSD_WCHAR_T_ is not defined, then rune_t is available.
                    201:    machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
                    202:    the same type." */
                    203: #ifdef _BSD_WCHAR_T_
                    204: #undef _BSD_WCHAR_T_
                    205: #ifdef _BSD_RUNE_T_
                    206: #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
                    207: typedef _BSD_RUNE_T_ rune_t;
                    208: #endif
                    209: #endif
                    210: #endif
                    211: 
                    212: #ifndef __WCHAR_TYPE__
                    213: #define __WCHAR_TYPE__ int
                    214: #endif
                    215: typedef __WCHAR_TYPE__ wchar_t;
                    216: #endif
                    217: #endif
                    218: #endif
                    219: #endif
                    220: #endif
                    221: #endif
                    222: #endif
                    223: #endif
                    224: #endif
                    225: #endif
                    226: #endif
                    227: #undef __need_wchar_t
                    228: #endif /* _STDDEF_H or __need_wchar_t.  */
                    229: 
                    230: /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
                    231:     are already defined.  */
                    232: #ifdef _ANSI_H_
                    233: /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
                    234:     are probably typos and should be removed before 2.7 is released.  */
                    235: #ifdef _GCC_PTRDIFF_T_
                    236: #undef _PTRDIFF_T_
                    237: #undef _BSD_PTRDIFF_T_
                    238: #endif
                    239: #ifdef _GCC_SIZE_T_
                    240: #undef _SIZE_T_
                    241: #undef _BSD_SIZE_T_
                    242: #endif
                    243: #ifdef _GCC_WCHAR_T_
                    244: #undef _WCHAR_T_
                    245: #undef _BSD_WCHAR_T_
                    246: #endif
                    247: /*  The following ones are the real ones.  */
                    248: #ifdef _GCC_PTRDIFF_T
                    249: #undef _PTRDIFF_T_
                    250: #endif
                    251: #ifdef _GCC_SIZE_T
                    252: #undef _SIZE_T_
                    253: #endif
                    254: #ifdef _GCC_WCHAR_T
                    255: #undef _WCHAR_T_
                    256: #endif
                    257: #endif /* _ANSI_H_ */
                    258: 
                    259: #endif /* __sys_stdtypes_h */
                    260: 
                    261: /* A null pointer constant.  */
                    262: 
                    263: #if defined (_STDDEF_H) || defined (__need_NULL)
                    264: #undef NULL            /* in case <stdio.h> has defined it. */
                    265: #define NULL ((void *)0)
                    266: #endif /* NULL not defined and <stddef.h> or need NULL.  */
                    267: #undef __need_NULL
                    268: 
                    269: #ifdef _STDDEF_H
                    270: 
                    271: /* Offset of member MEMBER in a struct of type TYPE.  */
                    272: 
                    273: #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
                    274: 
                    275: #endif /* _STDDEF_H was defined this time */
                    276: 
                    277: #endif /* __STDDEF_H__ was not defined before */
                    278: #endif /* _ANSI_STDDEF_H was not defined before */
                    279: #endif /* _STDDEF_H_ was not defined before */
                    280: #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.