File: /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/limits.h

1     /* This administrivia gets added to the beginning of limits.h
2        if the system has its own version of limits.h.  */
3     
4     /* We use _GCC_LIMITS_H_ because we want this not to match
5        any macros that the system's limits.h uses for its own purposes.  */
6     #ifndef _GCC_LIMITS_H_  /* Terminated in limity.h.  */
7     #define _GCC_LIMITS_H_
8     
9     #ifndef _LIBC_LIMITS_H_
10     /* Use "..." so that we find syslimits.h only in this same directory.  */
11     #include "syslimits.h"
12     #endif
13     #ifndef _LIMITS_H___
14     #ifndef _MACH_MACHLIMITS_H_
15     
16     /* _MACH_MACHLIMITS_H_ is used on OSF/1.  */
17     #define _LIMITS_H___
18     #define _MACH_MACHLIMITS_H_
19     
20     /* Number of bits in a `char'.  */
21     #undef CHAR_BIT
22     #define CHAR_BIT 8
23     
24     /* Maximum length of a multibyte character.  */
25     #ifndef MB_LEN_MAX
26     #define MB_LEN_MAX 1
27     #endif
28     
29     /* Minimum and maximum values a `signed char' can hold.  */
30     #undef SCHAR_MIN
31     #define SCHAR_MIN (-128)
32     #undef SCHAR_MAX
33     #define SCHAR_MAX 127
34     
35     /* Maximum value an `unsigned char' can hold.  (Minimum is 0).  */
36     #undef UCHAR_MAX
37     #define UCHAR_MAX 255
38     
39     /* Minimum and maximum values a `char' can hold.  */
40     #ifdef __CHAR_UNSIGNED__
41     #undef CHAR_MIN
42     #define CHAR_MIN 0
43     #undef CHAR_MAX
44     #define CHAR_MAX 255
45     #else
46     #undef CHAR_MIN
47     #define CHAR_MIN (-128)
48     #undef CHAR_MAX
49     #define CHAR_MAX 127
50     #endif
51     
52     /* Minimum and maximum values a `signed short int' can hold.  */
53     #undef SHRT_MIN
54     /* For the sake of 16 bit hosts, we may not use -32768 */
55     #define SHRT_MIN (-32767-1)
56     #undef SHRT_MAX
57     #define SHRT_MAX 32767
58     
59     /* Maximum value an `unsigned short int' can hold.  (Minimum is 0).  */
60     #undef USHRT_MAX
61     #define USHRT_MAX 65535
62     
63     /* Minimum and maximum values a `signed int' can hold.  */
64     #ifndef __INT_MAX__
65     #define __INT_MAX__ 2147483647
66     #endif
67     #undef INT_MIN
68     #define INT_MIN (-INT_MAX-1)
69     #undef INT_MAX
70     #define INT_MAX __INT_MAX__
71     
72     /* Maximum value an `unsigned int' can hold.  (Minimum is 0).  */
73     #undef UINT_MAX
74     #define UINT_MAX (INT_MAX * 2U + 1)
75     
76     /* Minimum and maximum values a `signed long int' can hold.
77        (Same as `int').  */
78     #ifndef __LONG_MAX__
79     #if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
80     #define __LONG_MAX__ 9223372036854775807L
81     #else
82     #define __LONG_MAX__ 2147483647L
83     #endif /* __alpha__ || sparc64 */
84     #endif
85     #undef LONG_MIN
86     #define LONG_MIN (-LONG_MAX-1)
87     #undef LONG_MAX
88     #define LONG_MAX __LONG_MAX__
89     
90     /* Maximum value an `unsigned long int' can hold.  (Minimum is 0).  */
91     #undef ULONG_MAX
92     #define ULONG_MAX (LONG_MAX * 2UL + 1)
93     
94     #ifndef __LONG_LONG_MAX__
95     #define __LONG_LONG_MAX__ 9223372036854775807LL
96     #endif
97     
98     #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
99     /* Minimum and maximum values a `signed long long int' can hold.  */
100     #undef LLONG_MIN
101     #define LLONG_MIN (-LLONG_MAX-1)
102     #undef LLONG_MAX
103     #define LLONG_MAX __LONG_LONG_MAX__
104     
105     /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
106     #undef ULLONG_MAX
107     #define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
108     #endif
109     
110     #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
111     /* Minimum and maximum values a `signed long long int' can hold.  */
112     #undef LONG_LONG_MIN
113     #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
114     #undef LONG_LONG_MAX
115     #define LONG_LONG_MAX __LONG_LONG_MAX__
116     
117     /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
118     #undef ULONG_LONG_MAX
119     #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
120     #endif
121     
122     #endif /* _MACH_MACHLIMITS_H_ */
123     #endif /* _LIMITS_H___ */
124     /* This administrivia gets added to the end of limits.h
125        if the system has its own version of limits.h.  */
126     
127     #else /* not _GCC_LIMITS_H_ */
128     
129     #ifdef _GCC_NEXT_LIMITS_H
130      #include_next <limits.h>		/* recurse down to the real one */
131     #endif
132     
133     #endif /* not _GCC_LIMITS_H_ */
134