6 #ifndef __sys_stdtypes_h
7 /* This avoids lossage on Sunos but only if stdtypes.h comes first.
8 There's no way to win with the other order! Sun lossage. */
10 /* In case nobody has defined these types, but we aren't running under
11 GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
12 __WCHAR_TYPE__ have reasonable values. This can happen if the
13 parts of GCC is compiled by an older compiler, that actually
14 include gstddef.h, such as collect2. */
16 /* Signed type of difference of two pointers. */
18 #ifndef _PTRDIFF_T /* in case <sys/types.h> has defined it. */
23 #ifndef ___int_ptrdiff_t_h
24 #ifndef _GCC_PTRDIFF_T
30 #define ___int_ptrdiff_t_h
31 #define _GCC_PTRDIFF_T
32 #ifndef __PTRDIFF_TYPE__
33 #define __PTRDIFF_TYPE__ long int
35 typedef __PTRDIFF_TYPE__ ptrdiff_t;
36 #endif /* _GCC_PTRDIFF_T */
37 #endif /* ___int_ptrdiff_t_h */
38 #endif /* _PTRDIFF_T_ */
39 #endif /* __PTRDIFF_T */
40 #endif /* _T_PTRDIFF */
41 #endif /* _T_PTRDIFF_ */
42 #endif /* _PTRDIFF_T */
44 /* Unsigned type of `sizeof' something. */
46 #ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
51 #ifndef ___int_size_t_h
58 #define ___int_size_t_h
61 #define __SIZE_TYPE__ long unsigned int
63 typedef __SIZE_TYPE__ size_t;
64 #endif /* _GCC_SIZE_T */
65 #endif /* ___int_size_t_h */
72 /* Data type for wide chars. */
79 #ifndef ___int_wchar_t_h
86 #define ___int_wchar_t_h
88 #ifndef __WCHAR_TYPE__
89 #define __WCHAR_TYPE__ int
91 typedef __WCHAR_TYPE__ wchar_t;
100 #endif /* __sys_stdtypes_h */
102 /* A null pointer constant. */
104 #undef NULL /* in case <stdio.h> has defined it. */
105 #define NULL ((void *)0)
107 /* Offset of member MEMBER in a struct of type TYPE. */
109 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
111 #endif /* _STDDEF_H_ */
112 #endif /* _STDDEF_H */