OSDN Git Service

b94bef0bbf344ca3910ba59166a5b92d76e1dacd
[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 /* Signed type of difference of two pointers.  */
11
12 #ifndef _PTRDIFF_T      /* in case <sys/types.h> has defined it. */
13 #ifndef _T_PTRDIFF
14 #ifndef __PTRDIFF_T
15 #ifndef _PTRDIFF_T_
16 #ifndef ___int_ptrdiff_t_h
17 #define _PTRDIFF_T
18 #define _T_PTRDIFF
19 #define __PTRDIFF_T
20 #define _PTRDIFF_T_
21 #define ___int_ptrdiff_t_h
22 typedef __PTRDIFF_TYPE__ ptrdiff_t;
23 #endif /* ___int_ptrdiff_t_h */
24 #endif /* _PTRDIFF_T_ */
25 #endif /* __PTRDIFF_T */
26 #endif /* _T_PTRDIFF */
27 #endif /* _PTRDIFF_T */
28
29 /* Unsigned type of `sizeof' something.  */
30
31 #ifndef _SIZE_T /* in case <sys/types.h> has defined it. */
32 #ifndef _T_SIZE
33 #ifndef __SIZE_T
34 #ifndef _SIZE_T_
35 #ifndef ___int_size_t_h
36 #define _SIZE_T
37 #define _T_SIZE
38 #define __SIZE_T
39 #define _SIZE_T_
40 #define ___int_size_t_h
41 typedef __SIZE_TYPE__ size_t;
42 #endif /* ___int_size_t_h */
43 #endif /* _SIZE_T_ */
44 #endif /* __SIZE_T */
45 #endif /* _T_SIZE */
46 #endif /* _SIZE_T */
47
48 /* Data type for wide chars.  */
49
50 #ifndef _WCHAR_T
51 #ifndef _T_WCHAR_
52 #ifndef __WCHAR_T
53 #ifndef _WCHAR_T_
54 #ifndef ___int_wchar_t_h
55 #define _WCHAR_T
56 #define _T_WCHAR_
57 #define __WCHAR_T
58 #define _WCHAR_T_
59 #define ___int_wchar_t_h
60 typedef __WCHAR_TYPE__ wchar_t;
61 #endif
62 #endif
63 #endif
64 #endif
65 #endif
66
67 #endif /* __sys_stdtypes_h */
68
69 /* A null pointer constant.  */
70
71 #undef NULL             /* in case <stdio.h> has defined it. */
72 #define NULL ((void *)0)
73
74 /* Offset of member MEMBER in a struct of type TYPE.  */
75
76 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
77
78 #endif /* _STDDEF_H_ */
79 #endif /* _STDDEF_H */