2 |
7u83 |
1 |
#ifndef __HACKED_LIMITS_INCLUDED
|
|
|
2 |
#define __HACKED_LIMITS_INCLUDED
|
|
|
3 |
|
89 |
7u83 |
4 |
/*#include_next <limits.h>*/
|
2 |
7u83 |
5 |
|
89 |
7u83 |
6 |
#define _POSIX_ARG_MAX 4096
|
|
|
7 |
#define _POSIX_LINK_MAX 8
|
|
|
8 |
#define _POSIX_MAX_CANON 255
|
|
|
9 |
#define _POSIX_MAX_INPUT 255
|
|
|
10 |
#define _POSIX_NAME_MAX 14
|
|
|
11 |
#define _POSIX_PIPE_BUF 512
|
|
|
12 |
#define _POSIX_SSIZE_MAX 32767
|
|
|
13 |
#define _POSIX_STREAM_MAX 8
|
|
|
14 |
#define _POSIX_TZNAME_MAX 3
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
/*
|
|
|
18 |
* According to ANSI (section 2.2.4.2), the values below must be usable by
|
|
|
19 |
* #if preprocessing directives. Additionally, the expression must have the
|
|
|
20 |
* same type as would an expression that is an object of the corresponding
|
|
|
21 |
* type converted according to the integral promotions. The subtraction for
|
|
|
22 |
* INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
|
|
23 |
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
|
|
24 |
*/
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
#define __USHRT_MAX 0xffff /* max value for an unsigned short */
|
|
|
30 |
#define __SHRT_MAX 0x7fff /* max value for a short */
|
|
|
31 |
#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */
|
|
|
32 |
|
|
|
33 |
#define __UINT_MAX 0xffffffff /* max value for an unsigned int */
|
|
|
34 |
#define __INT_MAX 0x7fffffff /* max value for an int */
|
|
|
35 |
#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
|
|
|
36 |
|
|
|
37 |
#ifdef __LP64__
|
|
|
38 |
#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */
|
|
|
39 |
#define __LONG_MAX 0x7fffffffffffffff /* max for a long */
|
|
|
40 |
#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */
|
|
|
41 |
#else
|
|
|
42 |
#define __ULONG_MAX 0xffffffffUL
|
|
|
43 |
#define __LONG_MAX 0x7fffffffL
|
|
|
44 |
#define __LONG_MIN (-0x7fffffffL - 1)
|
|
|
45 |
#endif
|
|
|
46 |
|
|
|
47 |
/* max value for an unsigned long long */
|
|
|
48 |
#define __ULLONG_MAX 0xffffffffffffffffULL
|
|
|
49 |
#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
|
|
|
50 |
#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
|
|
|
51 |
|
|
|
52 |
#ifdef __LP64__
|
|
|
53 |
#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */
|
|
|
54 |
#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */
|
|
|
55 |
#define __OFF_MAX __LONG_MAX /* max value for an off_t */
|
|
|
56 |
#define __OFF_MIN __LONG_MIN /* min value for an off_t */
|
|
|
57 |
/* Quads and longs are the same on the amd64. Ensure they stay in sync. */
|
|
|
58 |
#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */
|
|
|
59 |
#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */
|
|
|
60 |
#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */
|
|
|
61 |
#define __LONG_BIT 64
|
|
|
62 |
#else
|
|
|
63 |
#define __SSIZE_MAX __INT_MAX
|
|
|
64 |
#define __SIZE_T_MAX __UINT_MAX
|
|
|
65 |
#define __OFF_MAX __LLONG_MAX
|
|
|
66 |
#define __OFF_MIN __LLONG_MIN
|
|
|
67 |
#define __UQUAD_MAX __ULLONG_MAX
|
|
|
68 |
#define __QUAD_MAX __LLONG_MAX
|
|
|
69 |
#define __QUAD_MIN __LLONG_MIN
|
|
|
70 |
#define __LONG_BIT 32
|
|
|
71 |
#endif
|
|
|
72 |
|
|
|
73 |
#define __WORD_BIT 32
|
|
|
74 |
#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */
|
|
|
75 |
|
|
|
76 |
/* Minimum signal stack size. */
|
|
|
77 |
#define __MINSIGSTKSZ (512 * 4)
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
2 |
7u83 |
81 |
#ifndef NL_ARGMAX
|
|
|
82 |
#define NL_ARGMAX 99
|
|
|
83 |
#endif
|
|
|
84 |
|
|
|
85 |
#ifndef NL_LANGMAX
|
|
|
86 |
#define NL_LANGMAX 31
|
|
|
87 |
#endif
|
|
|
88 |
|
|
|
89 |
#ifndef NL_MSGMAX
|
|
|
90 |
#define NL_MSGMAX 32767
|
|
|
91 |
#endif
|
|
|
92 |
|
|
|
93 |
#ifndef NL_NMAX
|
|
|
94 |
#define NL_NMAX 1
|
|
|
95 |
#endif
|
|
|
96 |
|
|
|
97 |
#ifndef NL_SETMAX
|
|
|
98 |
#define NL_SETMAX 255
|
|
|
99 |
#endif
|
|
|
100 |
|
|
|
101 |
#ifndef NL_TEXTMAX
|
|
|
102 |
#define NL_TEXTMAX 2048
|
|
|
103 |
#endif
|
|
|
104 |
|
|
|
105 |
#ifndef NZERO
|
|
|
106 |
#define NZERO 0
|
|
|
107 |
#endif
|
|
|
108 |
|
|
|
109 |
#ifndef WORD_BIT
|
|
|
110 |
#define WORD_BIT 32
|
|
|
111 |
#endif
|
|
|
112 |
|
|
|
113 |
#ifndef LONG_BIT
|
|
|
114 |
#define LONG_BIT 32
|
|
|
115 |
#endif
|
|
|
116 |
|
89 |
7u83 |
117 |
#define CHAR_BIT 8 /* number of bits in a char */
|
|
|
118 |
#define SCHAR_MAX 0x7f /* max value for a signed char */
|
|
|
119 |
#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
|
|
|
120 |
#define UCHAR_MAX 0xff /* max value for an unsigned char */
|
|
|
121 |
#define MB_LEN_MAX 6 /* 31-bit UTF-8 */
|
|
|
122 |
|
|
|
123 |
#ifdef __CHAR_UNSIGNED__
|
|
|
124 |
#define CHAR_MAX UCHAR_MAX /* max value for a char */
|
|
|
125 |
#define CHAR_MIN 0 /* min value for a char */
|
|
|
126 |
#else
|
|
|
127 |
#define CHAR_MAX SCHAR_MAX
|
|
|
128 |
#define CHAR_MIN SCHAR_MIN
|
2 |
7u83 |
129 |
#endif
|
89 |
7u83 |
130 |
|
|
|
131 |
#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */
|
|
|
132 |
#define SHRT_MAX __SHRT_MAX /* max value for a short */
|
|
|
133 |
#define SHRT_MIN __SHRT_MIN /* min value for a short */
|
|
|
134 |
|
|
|
135 |
#define UINT_MAX __UINT_MAX /* max value for an unsigned int */
|
|
|
136 |
#define INT_MAX __INT_MAX /* max value for an int */
|
|
|
137 |
#define INT_MIN __INT_MIN /* min value for an int */
|
|
|
138 |
|
|
|
139 |
#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */
|
|
|
140 |
#define LONG_MAX __LONG_MAX /* max for a long */
|
|
|
141 |
#define LONG_MIN __LONG_MIN /* min for a long */
|
|
|
142 |
|
|
|
143 |
#define NGROUPS_MAX 1023
|
|
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
#endif
|