1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #if __GNUC__ >= 3
26 @PRAGMA_SYSTEM_HEADER@
27 #endif
28 @PRAGMA_COLUMNS@
29
30 #if defined __need_wchar_t || defined __need_size_t \
31 || defined __need_ptrdiff_t || defined __need_NULL \
32 || defined __need_wint_t
33
34
35
36
37
38
39
40 # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _@GUARD_PREFIX@_STDDEF_WINT_T)
41 # ifdef __need_wint_t
42 # define _@GUARD_PREFIX@_STDDEF_WINT_T
43 # endif
44 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
45
46
47 # undef __need_wchar_t
48 # undef __need_size_t
49 # undef __need_ptrdiff_t
50 # undef __need_NULL
51 # undef __need_wint_t
52 # endif
53
54 #else
55
56
57 # ifndef _@GUARD_PREFIX@_STDDEF_H
58
59
60
61 # if defined _AIX && defined __LP64__
62 # if !GNULIB_defined_max_align_t
63 # ifdef _MAX_ALIGN_T
64
65 typedef long rpl_max_align_t;
66 # define max_align_t rpl_max_align_t
67 # else
68
69 typedef long max_align_t;
70 # define _MAX_ALIGN_T
71 # endif
72 # define __CLANG_MAX_ALIGN_T_DEFINED
73 # define GNULIB_defined_max_align_t 1
74 # endif
75 # endif
76
77
78
79 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
80
81
82 # if (@REPLACE_NULL@ \
83 && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _@GUARD_PREFIX@_STDDEF_WINT_T))
84 # undef NULL
85 # ifdef __cplusplus
86
87
88 # if __GNUG__ >= 3
89
90
91
92 # define NULL __null
93 # else
94 # define NULL 0L
95 # endif
96 # else
97 # define NULL ((void *) 0)
98 # endif
99 # endif
100
101 # ifndef _@GUARD_PREFIX@_STDDEF_H
102 # define _@GUARD_PREFIX@_STDDEF_H
103
104
105 #if !_GL_CONFIG_H_INCLUDED
106 #error "Please include config.h first."
107 #endif
108
109
110 #if !@HAVE_WCHAR_T@
111 # define wchar_t int
112 #endif
113
114
115
116
117
118
119
120
121 #if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \
122 && defined __cplusplus
123 # include <cstddef>
124 #else
125 # if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __clang__))
126 # if !GNULIB_defined_max_align_t
127
128
129
130
131
132 # if defined __GNUC__ || (__clang_major__ >= 4)
133 # define _GL_STDDEF_ALIGNAS(type) \
134 __attribute__ ((__aligned__ (__alignof__ (type))))
135 # else
136 # define _GL_STDDEF_ALIGNAS(type)
137 # endif
138 typedef union
139 {
140 char *__p _GL_STDDEF_ALIGNAS (char *);
141 double __d _GL_STDDEF_ALIGNAS (double);
142 long double __ld _GL_STDDEF_ALIGNAS (long double);
143 long int __i _GL_STDDEF_ALIGNAS (long int);
144 } rpl_max_align_t;
145 # define max_align_t rpl_max_align_t
146 # define __CLANG_MAX_ALIGN_T_DEFINED
147 # define GNULIB_defined_max_align_t 1
148 # endif
149 # endif
150 #endif
151
152
153 #ifndef unreachable
154
155
156 # ifndef _GL_HAS_BUILTIN_UNREACHABLE
157 # if defined __clang_major__ && __clang_major__ < 5
158 # define _GL_HAS_BUILTIN_UNREACHABLE 0
159 # elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
160 # define _GL_HAS_BUILTIN_UNREACHABLE 1
161 # elif defined __has_builtin
162 # define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
163 # else
164 # define _GL_HAS_BUILTIN_UNREACHABLE 0
165 # endif
166 # endif
167
168 # if _GL_HAS_BUILTIN_UNREACHABLE
169 # define unreachable() __builtin_unreachable ()
170 # elif 1200 <= _MSC_VER
171 # define unreachable() __assume (0)
172 # else
173
174 extern
175 # if defined __cplusplus
176 "C"
177 # endif
178 _Noreturn
179 void abort (void)
180 # if defined __cplusplus && (__GLIBC__ >= 2)
181 throw ()
182 # endif
183 ;
184 # define unreachable() abort ()
185 # endif
186
187 #endif
188
189 # endif
190 # endif
191 #endif