Commit | Line | Data |
---|---|---|
b64a9bd1 FF |
1 | diff -u -r ../clisp-2.49/src/gllib/stdint.in.h ./src/gllib/stdint.in.h |
2 | --- ../clisp-2.49/src/gllib/stdint.in.h 2010-05-18 14:38:04.000000000 -0400 | |
3 | +++ ./src/gllib/stdint.in.h 2016-02-17 15:35:07.664544781 -0500 | |
4 | @@ -1,568 +1 @@ | |
5 | -/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc. | |
6 | - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. | |
7 | - This file is part of gnulib. | |
8 | - | |
9 | - This program is free software; you can redistribute it and/or modify | |
10 | - it under the terms of the GNU General Public License as published by | |
11 | - the Free Software Foundation; either version 3, or (at your option) | |
12 | - any later version. | |
13 | - | |
14 | - This program is distributed in the hope that it will be useful, | |
15 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - GNU General Public License for more details. | |
18 | - | |
19 | - You should have received a copy of the GNU General Public License | |
20 | - along with this program; if not, write to the Free Software Foundation, | |
21 | - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | |
22 | - | |
23 | -/* | |
24 | - * ISO C 99 <stdint.h> for platforms that lack it. | |
25 | - * <http://www.opengroup.org/susv3xbd/stdint.h.html> | |
26 | - */ | |
27 | - | |
28 | -#ifndef _gl_GL_STDINT_H | |
29 | - | |
30 | -#if __GNUC__ >= 3 | |
31 | -@PRAGMA_SYSTEM_HEADER@ | |
32 | -#endif | |
33 | - | |
34 | -/* When including a system file that in turn includes <inttypes.h>, | |
35 | - use the system <inttypes.h>, not our substitute. This avoids | |
36 | - problems with (for example) VMS, whose <sys/bitypes.h> includes | |
37 | - <inttypes.h>. */ | |
38 | -#define _gl_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H | |
39 | - | |
40 | -/* Get those types that are already defined in other system include | |
41 | - files, so that we can "#define int8_t signed char" below without | |
42 | - worrying about a later system include file containing a "typedef | |
43 | - signed char int8_t;" that will get messed up by our macro. Our | |
44 | - macros should all be consistent with the system versions, except | |
45 | - for the "fast" types and macros, which we recommend against using | |
46 | - in public interfaces due to compiler differences. */ | |
47 | - | |
48 | -#if @HAVE_STDINT_H@ | |
49 | -# if defined __sgi && ! defined __c99 | |
50 | - /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users | |
51 | - with "This header file is to be used only for c99 mode compilations" | |
52 | - diagnostics. */ | |
53 | -# define __STDINT_H__ | |
54 | -# endif | |
55 | - /* Other systems may have an incomplete or buggy <stdint.h>. | |
56 | - Include it before <inttypes.h>, since any "#include <stdint.h>" | |
57 | - in <inttypes.h> would reinclude us, skipping our contents because | |
58 | - _gl_GL_STDINT_H is defined. | |
59 | - The include_next requires a split double-inclusion guard. */ | |
60 | -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ | |
61 | -#endif | |
62 | - | |
63 | -#if ! defined _gl_GL_STDINT_H && ! defined _gl_GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
64 | -#define _gl_GL_STDINT_H | |
65 | - | |
66 | -/* <sys/types.h> defines some of the stdint.h types as well, on glibc, | |
67 | - IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>). | |
68 | - AIX 5.2 <sys/types.h> isn't needed and causes troubles. | |
69 | - MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but | |
70 | - relies on the system <stdint.h> definitions, so include | |
71 | - <sys/types.h> after @NEXT_STDINT_H@. */ | |
72 | -#if @HAVE_SYS_TYPES_H@ && ! defined _AIX | |
73 | -# include <sys/types.h> | |
74 | -#endif | |
75 | - | |
76 | -/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ | |
77 | -#include <limits.h> | |
78 | - | |
79 | -#if @HAVE_INTTYPES_H@ | |
80 | - /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines | |
81 | - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. | |
82 | - <inttypes.h> also defines intptr_t and uintptr_t. */ | |
83 | -# include <inttypes.h> | |
84 | -#elif @HAVE_SYS_INTTYPES_H@ | |
85 | - /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and | |
86 | - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ | |
87 | -# include <sys/inttypes.h> | |
88 | -#endif | |
89 | - | |
90 | -#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ | |
91 | - /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines | |
92 | - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is | |
93 | - included by <sys/types.h>. */ | |
94 | -# include <sys/bitypes.h> | |
95 | -#endif | |
96 | - | |
97 | -#undef _gl_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H | |
98 | - | |
99 | -/* Minimum and maximum values for a integer type under the usual assumption. | |
100 | - Return an unspecified value if BITS == 0, adding a check to pacify | |
101 | - picky compilers. */ | |
102 | - | |
103 | -#define _STDINT_MIN(signed, bits, zero) \ | |
104 | - ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) | |
105 | - | |
106 | -#define _STDINT_MAX(signed, bits, zero) \ | |
107 | - ((signed) \ | |
108 | - ? ~ _STDINT_MIN (signed, bits, zero) \ | |
109 | - : /* The expression for the unsigned case. The subtraction of (signed) \ | |
110 | - is a nop in the unsigned case and avoids "signed integer overflow" \ | |
111 | - warnings in the signed case. */ \ | |
112 | - ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) | |
113 | - | |
114 | -/* 7.18.1.1. Exact-width integer types */ | |
115 | - | |
116 | -/* Here we assume a standard architecture where the hardware integer | |
117 | - types have 8, 16, 32, optionally 64 bits. */ | |
118 | - | |
119 | -#undef int8_t | |
120 | -#undef uint8_t | |
121 | -typedef signed char gl_int8_t; | |
122 | -typedef unsigned char gl_uint8_t; | |
123 | -#define int8_t gl_int8_t | |
124 | -#define uint8_t gl_uint8_t | |
125 | - | |
126 | -#undef int16_t | |
127 | -#undef uint16_t | |
128 | -typedef short int gl_int16_t; | |
129 | -typedef unsigned short int gl_uint16_t; | |
130 | -#define int16_t gl_int16_t | |
131 | -#define uint16_t gl_uint16_t | |
132 | - | |
133 | -#undef int32_t | |
134 | -#undef uint32_t | |
135 | -typedef int gl_int32_t; | |
136 | -typedef unsigned int gl_uint32_t; | |
137 | -#define int32_t gl_int32_t | |
138 | -#define uint32_t gl_uint32_t | |
139 | - | |
140 | -/* Do not undefine int64_t if gnulib is not being used with 64-bit | |
141 | - types, since otherwise it breaks platforms like Tandem/NSK. */ | |
142 | -#if LONG_MAX >> 31 >> 31 == 1 | |
143 | -# undef int64_t | |
144 | -typedef long int gl_int64_t; | |
145 | -# define int64_t gl_int64_t | |
146 | -# define GL_INT64_T | |
147 | -#elif defined _MSC_VER | |
148 | -# undef int64_t | |
149 | -typedef __int64 gl_int64_t; | |
150 | -# define int64_t gl_int64_t | |
151 | -# define GL_INT64_T | |
152 | -#elif @HAVE_LONG_LONG_INT@ | |
153 | -# undef int64_t | |
154 | -typedef long long int gl_int64_t; | |
155 | -# define int64_t gl_int64_t | |
156 | -# define GL_INT64_T | |
157 | -#endif | |
158 | - | |
159 | -#if ULONG_MAX >> 31 >> 31 >> 1 == 1 | |
160 | -# undef uint64_t | |
161 | -typedef unsigned long int gl_uint64_t; | |
162 | -# define uint64_t gl_uint64_t | |
163 | -# define GL_UINT64_T | |
164 | -#elif defined _MSC_VER | |
165 | -# undef uint64_t | |
166 | -typedef unsigned __int64 gl_uint64_t; | |
167 | -# define uint64_t gl_uint64_t | |
168 | -# define GL_UINT64_T | |
169 | -#elif @HAVE_UNSIGNED_LONG_LONG_INT@ | |
170 | -# undef uint64_t | |
171 | -typedef unsigned long long int gl_uint64_t; | |
172 | -# define uint64_t gl_uint64_t | |
173 | -# define GL_UINT64_T | |
174 | -#endif | |
175 | - | |
176 | -/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */ | |
177 | -#define _UINT8_T | |
178 | -#define _UINT32_T | |
179 | -#define _UINT64_T | |
180 | - | |
181 | - | |
182 | -/* 7.18.1.2. Minimum-width integer types */ | |
183 | - | |
184 | -/* Here we assume a standard architecture where the hardware integer | |
185 | - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types | |
186 | - are the same as the corresponding N_t types. */ | |
187 | - | |
188 | -#undef int_least8_t | |
189 | -#undef uint_least8_t | |
190 | -#undef int_least16_t | |
191 | -#undef uint_least16_t | |
192 | -#undef int_least32_t | |
193 | -#undef uint_least32_t | |
194 | -#undef int_least64_t | |
195 | -#undef uint_least64_t | |
196 | -#define int_least8_t int8_t | |
197 | -#define uint_least8_t uint8_t | |
198 | -#define int_least16_t int16_t | |
199 | -#define uint_least16_t uint16_t | |
200 | -#define int_least32_t int32_t | |
201 | -#define uint_least32_t uint32_t | |
202 | -#ifdef GL_INT64_T | |
203 | -# define int_least64_t int64_t | |
204 | -#endif | |
205 | -#ifdef GL_UINT64_T | |
206 | -# define uint_least64_t uint64_t | |
207 | -#endif | |
208 | - | |
209 | -/* 7.18.1.3. Fastest minimum-width integer types */ | |
210 | - | |
211 | -/* Note: Other <stdint.h> substitutes may define these types differently. | |
212 | - It is not recommended to use these types in public header files. */ | |
213 | - | |
214 | -/* Here we assume a standard architecture where the hardware integer | |
215 | - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types | |
216 | - are taken from the same list of types. Assume that 'long int' | |
217 | - is fast enough for all narrower integers. */ | |
218 | - | |
219 | -#undef int_fast8_t | |
220 | -#undef uint_fast8_t | |
221 | -#undef int_fast16_t | |
222 | -#undef uint_fast16_t | |
223 | -#undef int_fast32_t | |
224 | -#undef uint_fast32_t | |
225 | -#undef int_fast64_t | |
226 | -#undef uint_fast64_t | |
227 | -typedef long int gl_int_fast8_t; | |
228 | -typedef unsigned long int gl_uint_fast8_t; | |
229 | -typedef long int gl_int_fast16_t; | |
230 | -typedef unsigned long int gl_uint_fast16_t; | |
231 | -typedef long int gl_int_fast32_t; | |
232 | -typedef unsigned long int gl_uint_fast32_t; | |
233 | -#define int_fast8_t gl_int_fast8_t | |
234 | -#define uint_fast8_t gl_uint_fast8_t | |
235 | -#define int_fast16_t gl_int_fast16_t | |
236 | -#define uint_fast16_t gl_uint_fast16_t | |
237 | -#define int_fast32_t gl_int_fast32_t | |
238 | -#define uint_fast32_t gl_uint_fast32_t | |
239 | -#ifdef GL_INT64_T | |
240 | -# define int_fast64_t int64_t | |
241 | -#endif | |
242 | -#ifdef GL_UINT64_T | |
243 | -# define uint_fast64_t uint64_t | |
244 | -#endif | |
245 | - | |
246 | -/* 7.18.1.4. Integer types capable of holding object pointers */ | |
247 | - | |
248 | -#undef intptr_t | |
249 | -#undef uintptr_t | |
250 | -typedef long int gl_intptr_t; | |
251 | -typedef unsigned long int gl_uintptr_t; | |
252 | -#define intptr_t gl_intptr_t | |
253 | -#define uintptr_t gl_uintptr_t | |
254 | - | |
255 | -/* 7.18.1.5. Greatest-width integer types */ | |
256 | - | |
257 | -/* Note: These types are compiler dependent. It may be unwise to use them in | |
258 | - public header files. */ | |
259 | - | |
260 | -#undef intmax_t | |
261 | -#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | |
262 | -typedef long long int gl_intmax_t; | |
263 | -# define intmax_t gl_intmax_t | |
264 | -#elif defined GL_INT64_T | |
265 | -# define intmax_t int64_t | |
266 | -#else | |
267 | -typedef long int gl_intmax_t; | |
268 | -# define intmax_t gl_intmax_t | |
269 | -#endif | |
270 | - | |
271 | -#undef uintmax_t | |
272 | -#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | |
273 | -typedef unsigned long long int gl_uintmax_t; | |
274 | -# define uintmax_t gl_uintmax_t | |
275 | -#elif defined GL_UINT64_T | |
276 | -# define uintmax_t uint64_t | |
277 | -#else | |
278 | -typedef unsigned long int gl_uintmax_t; | |
279 | -# define uintmax_t gl_uintmax_t | |
280 | -#endif | |
281 | - | |
282 | -/* Verify that intmax_t and uintmax_t have the same size. Too much code | |
283 | - breaks if this is not the case. If this check fails, the reason is likely | |
284 | - to be found in the autoconf macros. */ | |
285 | -typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; | |
286 | - | |
287 | -/* 7.18.2. Limits of specified-width integer types */ | |
288 | - | |
289 | -#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS | |
290 | - | |
291 | -/* 7.18.2.1. Limits of exact-width integer types */ | |
292 | - | |
293 | -/* Here we assume a standard architecture where the hardware integer | |
294 | - types have 8, 16, 32, optionally 64 bits. */ | |
295 | - | |
296 | -#undef INT8_MIN | |
297 | -#undef INT8_MAX | |
298 | -#undef UINT8_MAX | |
299 | -#define INT8_MIN (~ INT8_MAX) | |
300 | -#define INT8_MAX 127 | |
301 | -#define UINT8_MAX 255 | |
302 | - | |
303 | -#undef INT16_MIN | |
304 | -#undef INT16_MAX | |
305 | -#undef UINT16_MAX | |
306 | -#define INT16_MIN (~ INT16_MAX) | |
307 | -#define INT16_MAX 32767 | |
308 | -#define UINT16_MAX 65535 | |
309 | - | |
310 | -#undef INT32_MIN | |
311 | -#undef INT32_MAX | |
312 | -#undef UINT32_MAX | |
313 | -#define INT32_MIN (~ INT32_MAX) | |
314 | -#define INT32_MAX 2147483647 | |
315 | -#define UINT32_MAX 4294967295U | |
316 | - | |
317 | -#undef INT64_MIN | |
318 | -#undef INT64_MAX | |
319 | -#ifdef GL_INT64_T | |
320 | -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 | |
321 | - evaluates the latter incorrectly in preprocessor expressions. */ | |
322 | -# define INT64_MIN (- INTMAX_C (1) << 63) | |
323 | -# define INT64_MAX INTMAX_C (9223372036854775807) | |
324 | -#endif | |
325 | - | |
326 | -#undef UINT64_MAX | |
327 | -#ifdef GL_UINT64_T | |
328 | -# define UINT64_MAX UINTMAX_C (18446744073709551615) | |
329 | -#endif | |
330 | - | |
331 | -/* 7.18.2.2. Limits of minimum-width integer types */ | |
332 | - | |
333 | -/* Here we assume a standard architecture where the hardware integer | |
334 | - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types | |
335 | - are the same as the corresponding N_t types. */ | |
336 | - | |
337 | -#undef INT_LEAST8_MIN | |
338 | -#undef INT_LEAST8_MAX | |
339 | -#undef UINT_LEAST8_MAX | |
340 | -#define INT_LEAST8_MIN INT8_MIN | |
341 | -#define INT_LEAST8_MAX INT8_MAX | |
342 | -#define UINT_LEAST8_MAX UINT8_MAX | |
343 | - | |
344 | -#undef INT_LEAST16_MIN | |
345 | -#undef INT_LEAST16_MAX | |
346 | -#undef UINT_LEAST16_MAX | |
347 | -#define INT_LEAST16_MIN INT16_MIN | |
348 | -#define INT_LEAST16_MAX INT16_MAX | |
349 | -#define UINT_LEAST16_MAX UINT16_MAX | |
350 | - | |
351 | -#undef INT_LEAST32_MIN | |
352 | -#undef INT_LEAST32_MAX | |
353 | -#undef UINT_LEAST32_MAX | |
354 | -#define INT_LEAST32_MIN INT32_MIN | |
355 | -#define INT_LEAST32_MAX INT32_MAX | |
356 | -#define UINT_LEAST32_MAX UINT32_MAX | |
357 | - | |
358 | -#undef INT_LEAST64_MIN | |
359 | -#undef INT_LEAST64_MAX | |
360 | -#ifdef GL_INT64_T | |
361 | -# define INT_LEAST64_MIN INT64_MIN | |
362 | -# define INT_LEAST64_MAX INT64_MAX | |
363 | -#endif | |
364 | - | |
365 | -#undef UINT_LEAST64_MAX | |
366 | -#ifdef GL_UINT64_T | |
367 | -# define UINT_LEAST64_MAX UINT64_MAX | |
368 | -#endif | |
369 | - | |
370 | -/* 7.18.2.3. Limits of fastest minimum-width integer types */ | |
371 | - | |
372 | -/* Here we assume a standard architecture where the hardware integer | |
373 | - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types | |
374 | - are taken from the same list of types. */ | |
375 | - | |
376 | -#undef INT_FAST8_MIN | |
377 | -#undef INT_FAST8_MAX | |
378 | -#undef UINT_FAST8_MAX | |
379 | -#define INT_FAST8_MIN LONG_MIN | |
380 | -#define INT_FAST8_MAX LONG_MAX | |
381 | -#define UINT_FAST8_MAX ULONG_MAX | |
382 | - | |
383 | -#undef INT_FAST16_MIN | |
384 | -#undef INT_FAST16_MAX | |
385 | -#undef UINT_FAST16_MAX | |
386 | -#define INT_FAST16_MIN LONG_MIN | |
387 | -#define INT_FAST16_MAX LONG_MAX | |
388 | -#define UINT_FAST16_MAX ULONG_MAX | |
389 | - | |
390 | -#undef INT_FAST32_MIN | |
391 | -#undef INT_FAST32_MAX | |
392 | -#undef UINT_FAST32_MAX | |
393 | -#define INT_FAST32_MIN LONG_MIN | |
394 | -#define INT_FAST32_MAX LONG_MAX | |
395 | -#define UINT_FAST32_MAX ULONG_MAX | |
396 | - | |
397 | -#undef INT_FAST64_MIN | |
398 | -#undef INT_FAST64_MAX | |
399 | -#ifdef GL_INT64_T | |
400 | -# define INT_FAST64_MIN INT64_MIN | |
401 | -# define INT_FAST64_MAX INT64_MAX | |
402 | -#endif | |
403 | - | |
404 | -#undef UINT_FAST64_MAX | |
405 | -#ifdef GL_UINT64_T | |
406 | -# define UINT_FAST64_MAX UINT64_MAX | |
407 | -#endif | |
408 | - | |
409 | -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ | |
410 | - | |
411 | -#undef INTPTR_MIN | |
412 | -#undef INTPTR_MAX | |
413 | -#undef UINTPTR_MAX | |
414 | -#define INTPTR_MIN LONG_MIN | |
415 | -#define INTPTR_MAX LONG_MAX | |
416 | -#define UINTPTR_MAX ULONG_MAX | |
417 | - | |
418 | -/* 7.18.2.5. Limits of greatest-width integer types */ | |
419 | - | |
420 | -#undef INTMAX_MIN | |
421 | -#undef INTMAX_MAX | |
422 | -#ifdef INT64_MAX | |
423 | -# define INTMAX_MIN INT64_MIN | |
424 | -# define INTMAX_MAX INT64_MAX | |
425 | -#else | |
426 | -# define INTMAX_MIN INT32_MIN | |
427 | -# define INTMAX_MAX INT32_MAX | |
428 | -#endif | |
429 | - | |
430 | -#undef UINTMAX_MAX | |
431 | -#ifdef UINT64_MAX | |
432 | -# define UINTMAX_MAX UINT64_MAX | |
433 | -#else | |
434 | -# define UINTMAX_MAX UINT32_MAX | |
435 | -#endif | |
436 | - | |
437 | -/* 7.18.3. Limits of other integer types */ | |
438 | - | |
439 | -/* ptrdiff_t limits */ | |
440 | -#undef PTRDIFF_MIN | |
441 | -#undef PTRDIFF_MAX | |
442 | -#if @APPLE_UNIVERSAL_BUILD@ | |
443 | -# ifdef _LP64 | |
444 | -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) | |
445 | -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) | |
446 | -# else | |
447 | -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) | |
448 | -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) | |
449 | -# endif | |
450 | -#else | |
451 | -# define PTRDIFF_MIN \ | |
452 | - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) | |
453 | -# define PTRDIFF_MAX \ | |
454 | - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) | |
455 | -#endif | |
456 | - | |
457 | -/* sig_atomic_t limits */ | |
458 | -#undef SIG_ATOMIC_MIN | |
459 | -#undef SIG_ATOMIC_MAX | |
460 | -#define SIG_ATOMIC_MIN \ | |
461 | - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ | |
462 | - 0@SIG_ATOMIC_T_SUFFIX@) | |
463 | -#define SIG_ATOMIC_MAX \ | |
464 | - _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ | |
465 | - 0@SIG_ATOMIC_T_SUFFIX@) | |
466 | - | |
467 | - | |
468 | -/* size_t limit */ | |
469 | -#undef SIZE_MAX | |
470 | -#if @APPLE_UNIVERSAL_BUILD@ | |
471 | -# ifdef _LP64 | |
472 | -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) | |
473 | -# else | |
474 | -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) | |
475 | -# endif | |
476 | -#else | |
477 | -# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) | |
478 | -#endif | |
479 | - | |
480 | -/* wchar_t limits */ | |
481 | -/* Get WCHAR_MIN, WCHAR_MAX. | |
482 | - This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested | |
483 | - includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes | |
484 | - <stdint.h> and assumes its types are already defined. */ | |
485 | -#if ! (defined WCHAR_MIN && defined WCHAR_MAX) | |
486 | -# define _gl_GL_JUST_INCLUDE_SYSTEM_WCHAR_H | |
487 | -# include <wchar.h> | |
488 | -# undef _gl_GL_JUST_INCLUDE_SYSTEM_WCHAR_H | |
489 | -#endif | |
490 | -#undef WCHAR_MIN | |
491 | -#undef WCHAR_MAX | |
492 | -#define WCHAR_MIN \ | |
493 | - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) | |
494 | -#define WCHAR_MAX \ | |
495 | - _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) | |
496 | - | |
497 | -/* wint_t limits */ | |
498 | -#undef WINT_MIN | |
499 | -#undef WINT_MAX | |
500 | -#define WINT_MIN \ | |
501 | - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) | |
502 | -#define WINT_MAX \ | |
503 | - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) | |
504 | - | |
505 | -#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ | |
506 | - | |
507 | -/* 7.18.4. Macros for integer constants */ | |
508 | - | |
509 | -#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS | |
510 | - | |
511 | -/* 7.18.4.1. Macros for minimum-width integer constants */ | |
512 | -/* According to ISO C 99 Technical Corrigendum 1 */ | |
513 | - | |
514 | -/* Here we assume a standard architecture where the hardware integer | |
515 | - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ | |
516 | - | |
517 | -#undef INT8_C | |
518 | -#undef UINT8_C | |
519 | -#define INT8_C(x) x | |
520 | -#define UINT8_C(x) x | |
521 | - | |
522 | -#undef INT16_C | |
523 | -#undef UINT16_C | |
524 | -#define INT16_C(x) x | |
525 | -#define UINT16_C(x) x | |
526 | - | |
527 | -#undef INT32_C | |
528 | -#undef UINT32_C | |
529 | -#define INT32_C(x) x | |
530 | -#define UINT32_C(x) x ## U | |
531 | - | |
532 | -#undef INT64_C | |
533 | -#undef UINT64_C | |
534 | -#if LONG_MAX >> 31 >> 31 == 1 | |
535 | -# define INT64_C(x) x##L | |
536 | -#elif defined _MSC_VER | |
537 | -# define INT64_C(x) x##i64 | |
538 | -#elif @HAVE_LONG_LONG_INT@ | |
539 | -# define INT64_C(x) x##LL | |
540 | -#endif | |
541 | -#if ULONG_MAX >> 31 >> 31 >> 1 == 1 | |
542 | -# define UINT64_C(x) x##UL | |
543 | -#elif defined _MSC_VER | |
544 | -# define UINT64_C(x) x##ui64 | |
545 | -#elif @HAVE_UNSIGNED_LONG_LONG_INT@ | |
546 | -# define UINT64_C(x) x##ULL | |
547 | -#endif | |
548 | - | |
549 | -/* 7.18.4.2. Macros for greatest-width integer constants */ | |
550 | - | |
551 | -#undef INTMAX_C | |
552 | -#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 | |
553 | -# define INTMAX_C(x) x##LL | |
554 | -#elif defined GL_INT64_T | |
555 | -# define INTMAX_C(x) INT64_C(x) | |
556 | -#else | |
557 | -# define INTMAX_C(x) x##L | |
558 | -#endif | |
559 | - | |
560 | -#undef UINTMAX_C | |
561 | -#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 | |
562 | -# define UINTMAX_C(x) x##ULL | |
563 | -#elif defined GL_UINT64_T | |
564 | -# define UINTMAX_C(x) UINT64_C(x) | |
565 | -#else | |
566 | -# define UINTMAX_C(x) x##UL | |
567 | -#endif | |
568 | - | |
569 | -#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ | |
570 | - | |
571 | -#endif /* _gl_GL_STDINT_H */ | |
572 | -#endif /* !defined _gl_GL_STDINT_H && !defined _gl_GL_JUST_INCLUDE_SYSTEM_STDINT_H */ | |
573 | +#include_next <stdint.h> |