2N/A/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc. 2N/A Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. 2N/A This file is part of gnulib. 2N/A This program is free software; you can redistribute it and/or modify 2N/A it under the terms of the GNU General Public License as published by 2N/A the Free Software Foundation; either version 3, or (at your option) 2N/A This program is distributed in the hope that it will be useful, 2N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A GNU General Public License for more details. 2N/A You should have received a copy of the GNU General Public License 2N/A along with this program; if not, write to the Free Software Foundation, 2N/A Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 2N/A/* When including a system file that in turn includes <inttypes.h>, 2N/A/* Get those types that are already defined in other system include 2N/A files, so that we can "#define int8_t signed char" below without 2N/A worrying about a later system include file containing a "typedef 2N/A signed char int8_t;" that will get messed up by our macro. Our 2N/A macros should all be consistent with the system versions, except 2N/A for the "fast" types and macros, which we recommend against using 2N/A in public interfaces due to compiler differences. */ 2N/A /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users 2N/A with "This header file is to be used only for c99 mode compilations" 2N/A /* Other systems may have an incomplete or buggy <stdint.h>. 2N/A in <inttypes.h> would reinclude us, skipping our contents because 2N/A _GL_STDINT_H is defined. 2N/A The include_next requires a split double-inclusion guard. */ 2N/A relies on the system <stdint.h> definitions, so include 2N/A/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ 2N/A int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. 2N/A the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ 2N/A int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is 2N/A/* Minimum and maximum values for a integer type under the usual assumption. 2N/A Return an unspecified value if BITS == 0, adding a check to pacify 2N/A :
/* The expression for the unsigned case. The subtraction of (signed) \ 2N/A is a nop in the unsigned case and avoids "signed integer overflow" \ 2N/A warnings in the signed case. */ \
2N/A/* 7.18.1.1. Exact-width integer types */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits. */ 2N/A/* Do not undefine int64_t if gnulib is not being used with 64-bit 2N/A types, since otherwise it breaks platforms like Tandem/NSK. */ 2N/A/* 7.18.1.2. Minimum-width integer types */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types 2N/A are the same as the corresponding N_t types. */ 2N/A/* 7.18.1.3. Fastest minimum-width integer types */ 2N/A/* Note: Other <stdint.h> substitutes may define these types differently. 2N/A It is not recommended to use these types in public header files. */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types 2N/A are taken from the same list of types. Assume that 'long int' 2N/A is fast enough for all narrower integers. */ 2N/A/* 7.18.1.4. Integer types capable of holding object pointers */ 2N/A/* 7.18.1.5. Greatest-width integer types */ 2N/A/* Note: These types are compiler dependent. It may be unwise to use them in 2N/A public header files. */ 2N/A/* Verify that intmax_t and uintmax_t have the same size. Too much code 2N/A breaks if this is not the case. If this check fails, the reason is likely 2N/A to be found in the autoconf macros. */ 2N/A/* 7.18.2. Limits of specified-width integer types */ 2N/A/* 7.18.2.1. Limits of exact-width integer types */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits. */ 2N/A/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 2N/A evaluates the latter incorrectly in preprocessor expressions. */ 2N/A/* 7.18.2.2. Limits of minimum-width integer types */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types 2N/A are the same as the corresponding N_t types. */ 2N/A/* 7.18.2.3. Limits of fastest minimum-width integer types */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types 2N/A are taken from the same list of types. */ 2N/A/* 7.18.2.4. Limits of integer types capable of holding object pointers */ 2N/A/* 7.18.2.5. Limits of greatest-width integer types */ 2N/A/* 7.18.3. Limits of other integer types */ 2N/A/* ptrdiff_t limits */ 2N/A/* sig_atomic_t limits */ 2N/A/* Get WCHAR_MIN, WCHAR_MAX. 2N/A This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested 2N/A <stdint.h> and assumes its types are already defined. */ 2N/A#
endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ 2N/A/* 7.18.4. Macros for integer constants */ 2N/A/* 7.18.4.1. Macros for minimum-width integer constants */ 2N/A/* According to ISO C 99 Technical Corrigendum 1 */ 2N/A/* Here we assume a standard architecture where the hardware integer 2N/A types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ 2N/A/* 7.18.4.2. Macros for greatest-width integer constants */ 2N/A#
endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ 2N/A#
endif /* _GL_STDINT_H */ 2N/A#
endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */