4 /* Any one of these symbols __need_* means that GNU libc
5 wants us just to define one data type. So don't define
6 the symbols that indicate this file's entire job has been done. */
7 #if (!defined(__need_wchar_t) && !defined(__need_size_t) \
8 && !defined(__need_ptrdiff_t) && !defined(__need_NULL))
13 #ifndef __sys_stdtypes_h
14 /* This avoids lossage on Sunos but only if stdtypes.h comes first.
15 There's no way to win with the other order! Sun lossage. */
17 /* In case nobody has defined these types, but we aren't running under
18 GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
19 __WCHAR_TYPE__ have reasonable values. This can happen if the
20 parts of GCC is compiled by an older compiler, that actually
21 include gstddef.h, such as collect2. */
23 /* Signed type of difference of two pointers. */
25 #ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */
30 #ifndef ___int_ptrdiff_t_h
31 #ifndef _GCC_PTRDIFF_T
37 #define ___int_ptrdiff_t_h
38 #define _GCC_PTRDIFF_T
39 #ifndef __PTRDIFF_TYPE__
40 #define __PTRDIFF_TYPE__ long int
42 /* Define this type if we are doing the whole job,
43 or if we want this type in particular. */
44 #if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
45 typedef __PTRDIFF_TYPE__ ptrdiff_t;
46 #endif /* <stddef.h> or __need_ptrdiff_t. */
47 #endif /* _GCC_PTRDIFF_T */
48 #endif /* ___int_ptrdiff_t_h */
49 #endif /* _PTRDIFF_T_ */
50 #endif /* __PTRDIFF_T */
51 #endif /* _T_PTRDIFF */
52 #endif /* _T_PTRDIFF_ */
53 #endif /* _PTRDIFF_T */
55 /* If this symbol has done its job, get rid of it. */
56 #undef __need_ptrdiff_t
58 /* Unsigned type of `sizeof' something. */
60 #ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
65 #ifndef ___int_size_t_h
73 #define ___int_size_t_h
77 #define __SIZE_TYPE__ long unsigned int
79 /* Define this type if we are doing the whole job,
80 or if we want this type in particular. */
81 #if defined (_STDDEF_H) || defined (__need_size_t)
82 typedef __SIZE_TYPE__ size_t;
83 #endif /* <stddef.h> or __need_size_t. */
85 #endif /* _GCC_SIZE_T */
86 #endif /* ___int_size_t_h */
95 /* Wide character type.
96 Locale-writers should change this as necessary to
97 be big enough to hold unique values not between 0 and 127,
98 and not (wchar_t) -1, for each defined multibyte character. */
105 #ifndef ___int_wchar_t_h
112 #define ___int_wchar_t_h
114 #ifndef __WCHAR_TYPE__
115 #define __WCHAR_TYPE__ int
117 /* Define this type if we are doing the whole job,
118 or if we want this type in particular. */
119 #if defined (_STDDEF_H) || defined (__need_wchar_t)
120 typedef __WCHAR_TYPE__ wchar_t;
121 #endif /* <stddef.h> or __need_wchar_t. */
129 #undef __need_wchar_t
131 #endif /* __sys_stdtypes_h */
133 /* A null pointer constant. */
135 #if defined (_STDDEF_H) || defined (__need_NULL)
136 #undef NULL /* in case <stdio.h> has defined it. */
137 #define NULL ((void *)0)
138 #endif /* NULL not defined and <stddef.h> or need NULL. */
143 /* Offset of member MEMBER in a struct of type TYPE. */
145 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
147 #endif /* _STDDEF_H was defined this time */
148 #endif /* _STDDEF_H_ was not defined before */
149 #endif /* _STDDEF_H was not defined before */