modernc.org/cc@v1.0.1/v2/headers/linux_arm/usr/include/limits.h (about) 1 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 4 The GNU C Library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 The GNU C Library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with the GNU C Library; if not, see 16 <http://www.gnu.org/licenses/>. */ 17 18 /* 19 * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> 20 */ 21 22 #ifndef _LIBC_LIMITS_H_ 23 #define _LIBC_LIMITS_H_ 1 24 25 #include <features.h> 26 27 /* Maximum length of any multibyte character in any locale. 28 We define this value here since the gcc header does not define 29 the correct value. */ 30 #define MB_LEN_MAX 16 31 32 /* If we are not using GNU CC we have to define all the symbols ourself. 33 Otherwise use gcc's definitions (see below). */ 34 #if !defined __GNUC__ || __GNUC__ < 2 35 36 /* We only protect from multiple inclusion here, because all the other 37 #include's protect themselves, and in GCC 2 we may #include_next through 38 multiple copies of this file before we get to GCC's. */ 39 #ifndef _LIMITS_H 40 #define _LIMITS_H 1 41 42 #include <bits/wordsize.h> 43 44 /* We don't have #include_next. 45 Define ANSI <limits.h> for standard 32-bit words. */ 46 47 /* These assume 8-bit `char's, 16-bit `short int's, 48 and 32-bit `int's and `long int's. */ 49 50 /* Number of bits in a `char'. */ 51 #define CHAR_BIT 8 52 53 /* Minimum and maximum values a `signed char' can hold. */ 54 #define SCHAR_MIN (-128) 55 #define SCHAR_MAX 127 56 57 /* Maximum value an `unsigned char' can hold. (Minimum is 0.) */ 58 #define UCHAR_MAX 255 59 60 /* Minimum and maximum values a `char' can hold. */ 61 #ifdef __CHAR_UNSIGNED__ 62 #define CHAR_MIN 0 63 #define CHAR_MAX UCHAR_MAX 64 #else 65 #define CHAR_MIN SCHAR_MIN 66 #define CHAR_MAX SCHAR_MAX 67 #endif 68 69 /* Minimum and maximum values a `signed short int' can hold. */ 70 #define SHRT_MIN (-32768) 71 #define SHRT_MAX 32767 72 73 /* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ 74 #define USHRT_MAX 65535 75 76 /* Minimum and maximum values a `signed int' can hold. */ 77 #define INT_MIN (-INT_MAX - 1) 78 #define INT_MAX 2147483647 79 80 /* Maximum value an `unsigned int' can hold. (Minimum is 0.) */ 81 #define UINT_MAX 4294967295U 82 83 /* Minimum and maximum values a `signed long int' can hold. */ 84 #if __WORDSIZE == 64 85 #define LONG_MAX 9223372036854775807L 86 #else 87 #define LONG_MAX 2147483647L 88 #endif 89 #define LONG_MIN (-LONG_MAX - 1L) 90 91 /* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ 92 #if __WORDSIZE == 64 93 #define ULONG_MAX 18446744073709551615UL 94 #else 95 #define ULONG_MAX 4294967295UL 96 #endif 97 98 #ifdef __USE_ISOC99 99 100 /* Minimum and maximum values a `signed long long int' can hold. */ 101 #define LLONG_MAX 9223372036854775807LL 102 #define LLONG_MIN (-LLONG_MAX - 1LL) 103 104 /* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ 105 #define ULLONG_MAX 18446744073709551615ULL 106 107 #endif /* ISO C99 */ 108 109 #endif /* limits.h */ 110 #endif /* GCC 2. */ 111 112 #endif /* !_LIBC_LIMITS_H_ */ 113 114 /* Get the compiler's limits.h, which defines almost all the ISO constants. 115 116 We put this #include_next outside the double inclusion check because 117 it should be possible to include this file more than once and still get 118 the definitions from gcc's header. */ 119 #if defined __GNUC__ && !defined _GCC_LIMITS_H_ 120 /* `_GCC_LIMITS_H_' is what GCC's file defines. */ 121 #include_next <limits.h> 122 #endif 123 124 /* The <limits.h> files in some gcc versions don't define LLONG_MIN, 125 LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for 126 ages are available. */ 127 #if defined __USE_ISOC99 && defined __GNUC__ 128 #ifndef LLONG_MIN 129 #define LLONG_MIN (-LLONG_MAX-1) 130 #endif 131 #ifndef LLONG_MAX 132 #define LLONG_MAX __LONG_LONG_MAX__ 133 #endif 134 #ifndef ULLONG_MAX 135 #define ULLONG_MAX (LLONG_MAX * 2ULL + 1) 136 #endif 137 #endif 138 139 #ifdef __USE_POSIX 140 /* POSIX adds things to <limits.h>. */ 141 #include <bits/posix1_lim.h> 142 #endif 143 144 #ifdef __USE_POSIX2 145 #include <bits/posix2_lim.h> 146 #endif 147 148 #ifdef __USE_XOPEN 149 #include <bits/xopen_lim.h> 150 #endif