Annotation of gcc/gstddef.h, revision 1.1.1.5

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
1.1.1.5 ! root       38: /* Undef _FOO_T_ if we are supposed to define foo_t.  */
        !            39: #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
1.1.1.4   root       40: #undef _PTRDIFF_T_
1.1.1.5 ! root       41: #endif
        !            42: #if defined (__need_size_t) || defined (_STDDEF_H_)
1.1.1.4   root       43: #undef _SIZE_T_
1.1.1.5 ! root       44: #endif
        !            45: #if defined (__need_wchar_t) || defined (_STDDEF_H_)
1.1.1.4   root       46: #undef _WCHAR_T_
                     47: #endif
                     48: #endif /* _ANSI_H_ */
                     49: 
1.1.1.5 ! root       50: /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
        !            51:    Just ignore it.  */
        !            52: #if defined (__sequent__) && defined (_PTRDIFF_T_)
        !            53: #undef _PTRDIFF_T_
        !            54: #endif
        !            55: 
1.1       root       56: /* In case nobody has defined these types, but we aren't running under
                     57:    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
                     58:    __WCHAR_TYPE__ have reasonable values.  This can happen if the
                     59:    parts of GCC is compiled by an older compiler, that actually
                     60:    include gstddef.h, such as collect2.  */
                     61: 
                     62: /* Signed type of difference of two pointers.  */
                     63: 
1.1.1.4   root       64: /* Define this type if we are doing the whole job,
                     65:    or if we want this type in particular.  */
                     66: #if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
1.1       root       67: #ifndef _PTRDIFF_T     /* in case <sys/types.h> has defined it. */
1.1.1.2   root       68: #ifndef _T_PTRDIFF_
1.1       root       69: #ifndef _T_PTRDIFF
                     70: #ifndef __PTRDIFF_T
                     71: #ifndef _PTRDIFF_T_
                     72: #ifndef ___int_ptrdiff_t_h
1.1.1.2   root       73: #ifndef _GCC_PTRDIFF_T
1.1       root       74: #define _PTRDIFF_T
1.1.1.2   root       75: #define _T_PTRDIFF_
1.1       root       76: #define _T_PTRDIFF
                     77: #define __PTRDIFF_T
                     78: #define _PTRDIFF_T_
                     79: #define ___int_ptrdiff_t_h
1.1.1.2   root       80: #define _GCC_PTRDIFF_T
1.1       root       81: #ifndef __PTRDIFF_TYPE__
                     82: #define __PTRDIFF_TYPE__ long int
                     83: #endif
                     84: typedef __PTRDIFF_TYPE__ ptrdiff_t;
1.1.1.2   root       85: #endif /* _GCC_PTRDIFF_T */
1.1       root       86: #endif /* ___int_ptrdiff_t_h */
                     87: #endif /* _PTRDIFF_T_ */
                     88: #endif /* __PTRDIFF_T */
                     89: #endif /* _T_PTRDIFF */
1.1.1.2   root       90: #endif /* _T_PTRDIFF_ */
1.1       root       91: #endif /* _PTRDIFF_T */
                     92: 
1.1.1.3   root       93: /* If this symbol has done its job, get rid of it.  */
                     94: #undef __need_ptrdiff_t
                     95: 
1.1.1.4   root       96: #endif /* _STDDEF_H or __need_ptrdiff_t.  */
                     97: 
1.1       root       98: /* Unsigned type of `sizeof' something.  */
                     99: 
1.1.1.4   root      100: /* Define this type if we are doing the whole job,
                    101:    or if we want this type in particular.  */
                    102: #if defined (_STDDEF_H) || defined (__need_size_t)
1.1       root      103: #ifndef _SIZE_T        /* in case <sys/types.h> has defined it. */
1.1.1.5 ! root      104: #ifndef _SYS_SIZE_T_H
1.1.1.2   root      105: #ifndef _T_SIZE_
1.1       root      106: #ifndef _T_SIZE
                    107: #ifndef __SIZE_T
                    108: #ifndef _SIZE_T_
                    109: #ifndef ___int_size_t_h
1.1.1.2   root      110: #ifndef _GCC_SIZE_T
1.1.1.3   root      111: #ifndef _SIZET_
1.1       root      112: #define _SIZE_T
1.1.1.5 ! root      113: #define _SYS_SIZE_T_H
1.1.1.2   root      114: #define _T_SIZE_
1.1       root      115: #define _T_SIZE
                    116: #define __SIZE_T
                    117: #define _SIZE_T_
                    118: #define ___int_size_t_h
1.1.1.2   root      119: #define _GCC_SIZE_T
1.1.1.3   root      120: #define _SIZET_
1.1       root      121: #ifndef __SIZE_TYPE__
                    122: #define __SIZE_TYPE__ long unsigned int
                    123: #endif
1.1.1.5 ! root      124: #if !(defined (__GNUG__) && defined (size_t))
1.1       root      125: typedef __SIZE_TYPE__ size_t;
1.1.1.5 ! root      126: #endif /* !(defined (__GNUG__) && defined (size_t)) */
1.1.1.3   root      127: #endif /* _SIZET_ */
1.1.1.2   root      128: #endif /* _GCC_SIZE_T */
1.1       root      129: #endif /* ___int_size_t_h */
                    130: #endif /* _SIZE_T_ */
                    131: #endif /* __SIZE_T */
                    132: #endif /* _T_SIZE */
1.1.1.2   root      133: #endif /* _T_SIZE_ */
1.1.1.5 ! root      134: #endif /* _SYS_SIZE_T_H */
1.1       root      135: #endif /* _SIZE_T */
1.1.1.3   root      136: #undef __need_size_t
1.1.1.4   root      137: #endif /* _STDDEF_H or __need_size_t.  */
1.1       root      138: 
1.1.1.3   root      139: 
                    140: /* Wide character type.
                    141:    Locale-writers should change this as necessary to
                    142:    be big enough to hold unique values not between 0 and 127,
                    143:    and not (wchar_t) -1, for each defined multibyte character.  */
1.1       root      144: 
1.1.1.4   root      145: /* Define this type if we are doing the whole job,
                    146:    or if we want this type in particular.  */
                    147: #if defined (_STDDEF_H) || defined (__need_wchar_t)
1.1       root      148: #ifndef _WCHAR_T
                    149: #ifndef _T_WCHAR_
                    150: #ifndef _T_WCHAR
                    151: #ifndef __WCHAR_T
                    152: #ifndef _WCHAR_T_
                    153: #ifndef ___int_wchar_t_h
1.1.1.2   root      154: #ifndef _GCC_WCHAR_T
1.1       root      155: #define _WCHAR_T
                    156: #define _T_WCHAR_
                    157: #define _T_WCHAR
                    158: #define __WCHAR_T
                    159: #define _WCHAR_T_
                    160: #define ___int_wchar_t_h
1.1.1.2   root      161: #define _GCC_WCHAR_T
1.1       root      162: #ifndef __WCHAR_TYPE__
                    163: #define __WCHAR_TYPE__ int
                    164: #endif
1.1.1.4   root      165: #ifdef __GNUG__
                    166: /* In C++, wchar_t is a distinct basic type,
                    167:    and we can expect __wchar_t to be defined by cc1plus.  */
                    168: typedef __wchar_t wchar_t;
                    169: #else
                    170: /* In C, cpp tells us which type to make an alias for.  */
1.1       root      171: typedef __WCHAR_TYPE__ wchar_t;
1.1.1.4   root      172: #endif
1.1       root      173: #endif
                    174: #endif
                    175: #endif
                    176: #endif
                    177: #endif
                    178: #endif
1.1.1.2   root      179: #endif
1.1.1.3   root      180: #undef __need_wchar_t
1.1.1.4   root      181: #endif /* _STDDEF_H or __need_wchar_t.  */
                    182: 
                    183: /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
1.1.1.5 ! root      184:     are already defined.  */
1.1.1.4   root      185: #ifdef _ANSI_H_
1.1.1.5 ! root      186: #ifdef _GCC_PTRDIFF_T_
1.1.1.4   root      187: #undef _PTRDIFF_T_
1.1.1.5 ! root      188: #endif
        !           189: #ifdef _GCC_SIZE_T_
1.1.1.4   root      190: #undef _SIZE_T_
                    191: #endif
1.1.1.5 ! root      192: #ifdef _GCC_WCHAR_T_
        !           193: #undef _WCHAR_T_
1.1.1.4   root      194: #endif
1.1.1.5 ! root      195: #endif /* _ANSI_H_ */
1.1       root      196: 
                    197: #endif /* __sys_stdtypes_h */
                    198: 
                    199: /* A null pointer constant.  */
                    200: 
1.1.1.3   root      201: #if defined (_STDDEF_H) || defined (__need_NULL)
1.1       root      202: #undef NULL            /* in case <stdio.h> has defined it. */
                    203: #define NULL ((void *)0)
1.1.1.3   root      204: #endif /* NULL not defined and <stddef.h> or need NULL.  */
                    205: #undef __need_NULL
                    206: 
                    207: #ifdef _STDDEF_H
1.1       root      208: 
                    209: /* Offset of member MEMBER in a struct of type TYPE.  */
                    210: 
                    211: #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
                    212: 
1.1.1.3   root      213: #endif /* _STDDEF_H was defined this time */
1.1.1.4   root      214: 
                    215: #endif /* _ANSI_STDDEF_H was not defined before */
1.1.1.3   root      216: #endif /* _STDDEF_H_ was not defined before */
                    217: #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.