OSDN Git Service

*** empty log message ***
[pf3gnuchains/gcc-fork.git] / gcc / ginclude / stddef.h
1 #ifndef _STDDEF_H
2 #ifndef _STDDEF_H_
3 #define _STDDEF_H
4 #define _STDDEF_H_
5
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.  */
9
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.  */
15
16 /* Signed type of difference of two pointers.  */
17
18 #ifndef _PTRDIFF_T      /* in case <sys/types.h> has defined it. */
19 #ifndef _T_PTRDIFF_
20 #ifndef _T_PTRDIFF
21 #ifndef __PTRDIFF_T
22 #ifndef _PTRDIFF_T_
23 #ifndef ___int_ptrdiff_t_h
24 #ifndef _GCC_PTRDIFF_T
25 #define _PTRDIFF_T
26 #define _T_PTRDIFF_
27 #define _T_PTRDIFF
28 #define __PTRDIFF_T
29 #define _PTRDIFF_T_
30 #define ___int_ptrdiff_t_h
31 #define _GCC_PTRDIFF_T
32 #ifndef __PTRDIFF_TYPE__
33 #define __PTRDIFF_TYPE__ long int
34 #endif
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 */
43
44 /* Unsigned type of `sizeof' something.  */
45
46 #ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
47 #ifndef _T_SIZE_
48 #ifndef _T_SIZE
49 #ifndef __SIZE_T
50 #ifndef _SIZE_T_
51 #ifndef ___int_size_t_h
52 #ifndef _GCC_SIZE_T
53 #define _SIZE_T
54 #define _T_SIZE_
55 #define _T_SIZE
56 #define __SIZE_T
57 #define _SIZE_T_
58 #define ___int_size_t_h
59 #define _GCC_SIZE_T
60 #ifndef __SIZE_TYPE__
61 #define __SIZE_TYPE__ long unsigned int
62 #endif
63 typedef __SIZE_TYPE__ size_t;
64 #endif /* _GCC_SIZE_T */
65 #endif /* ___int_size_t_h */
66 #endif /* _SIZE_T_ */
67 #endif /* __SIZE_T */
68 #endif /* _T_SIZE */
69 #endif /* _T_SIZE_ */
70 #endif /* _SIZE_T */
71
72 /* Data type for wide chars.  */
73
74 #ifndef _WCHAR_T
75 #ifndef _T_WCHAR_
76 #ifndef _T_WCHAR
77 #ifndef __WCHAR_T
78 #ifndef _WCHAR_T_
79 #ifndef ___int_wchar_t_h
80 #ifndef _GCC_WCHAR_T
81 #define _WCHAR_T
82 #define _T_WCHAR_
83 #define _T_WCHAR
84 #define __WCHAR_T
85 #define _WCHAR_T_
86 #define ___int_wchar_t_h
87 #define _GCC_WCHAR_T
88 #ifndef __WCHAR_TYPE__
89 #define __WCHAR_TYPE__ int
90 #endif
91 typedef __WCHAR_TYPE__ wchar_t;
92 #endif
93 #endif
94 #endif
95 #endif
96 #endif
97 #endif
98 #endif
99
100 #endif /* __sys_stdtypes_h */
101
102 /* A null pointer constant.  */
103
104 #undef NULL             /* in case <stdio.h> has defined it. */
105 #define NULL ((void *)0)
106
107 /* Offset of member MEMBER in a struct of type TYPE.  */
108
109 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
110
111 #endif /* _STDDEF_H_ */
112 #endif /* _STDDEF_H */