6 #include <bits/alltypes.h> /* __LONG_MAX */
8 /* Support signed or unsigned plain-char */
14 #define CHAR_MIN (-128)
19 #define SCHAR_MIN (-128)
22 #define SHRT_MIN (-1-0x7fff)
23 #define SHRT_MAX 0x7fff
24 #define USHRT_MAX 0xffff
25 #define INT_MIN (-1-0x7fffffff)
26 #define INT_MAX 0x7fffffff
27 #define UINT_MAX 0xffffffffU
28 #define LONG_MIN (-LONG_MAX-1)
29 #define LONG_MAX __LONG_MAX
30 #define ULONG_MAX (2UL*LONG_MAX+1)
31 #define LLONG_MIN (-LLONG_MAX-1)
32 #define LLONG_MAX 0x7fffffffffffffffLL
33 #define ULLONG_MAX (2ULL*LLONG_MAX+1)
37 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
38 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
40 #include <bits/limits.h>
43 #define FILESIZEBITS 64
48 #define NGROUPS_MAX 32
49 #define ARG_MAX 131072
51 #define SYMLOOP_MAX 40
53 #define SSIZE_MAX LONG_MAX
55 #define TTY_NAME_MAX 32
56 #define HOST_NAME_MAX 255
58 #if LONG_MAX == 0x7fffffffL
64 /* Implementation choices... */
66 #define PTHREAD_KEYS_MAX 128
67 #define PTHREAD_STACK_MIN 2048
68 #define PTHREAD_DESTRUCTOR_ITERATIONS 4
69 #define SEM_VALUE_MAX 0x7fffffff
70 #define SEM_NSEMS_MAX 256
71 #define DELAYTIMER_MAX 0x7fffffff
72 #define MQ_PRIO_MAX 32768
73 #define LOGIN_NAME_MAX 256
75 /* Arbitrary numbers... */
77 #define BC_BASE_MAX 99
78 #define BC_DIM_MAX 2048
79 #define BC_SCALE_MAX 99
80 #define BC_STRING_MAX 1000
81 #define CHARCLASS_NAME_MAX 14
82 #define COLL_WEIGHTS_MAX 2
83 #define EXPR_NEST_MAX 32
85 #define RE_DUP_MAX 255
88 #define NL_MSGMAX 32767
90 #define NL_TEXTMAX 2048
94 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
97 #define PAGE_SIZE PAGESIZE
100 #define NL_LANGMAX 32
104 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
105 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
111 /* POSIX/SUS requirements follow. These numbers come directly
112 * from SUS and have nothing to do with the host system. */
114 #define _POSIX_AIO_LISTIO_MAX 2
115 #define _POSIX_AIO_MAX 1
116 #define _POSIX_ARG_MAX 4096
117 #define _POSIX_CHILD_MAX 25
118 #define _POSIX_CLOCKRES_MIN 20000000
119 #define _POSIX_DELAYTIMER_MAX 32
120 #define _POSIX_HOST_NAME_MAX 255
121 #define _POSIX_LINK_MAX 8
122 #define _POSIX_LOGIN_NAME_MAX 9
123 #define _POSIX_MAX_CANON 255
124 #define _POSIX_MAX_INPUT 255
125 #define _POSIX_MQ_OPEN_MAX 8
126 #define _POSIX_MQ_PRIO_MAX 32
127 #define _POSIX_NAME_MAX 14
128 #define _POSIX_NGROUPS_MAX 8
129 #define _POSIX_OPEN_MAX 20
130 #define _POSIX_PATH_MAX 256
131 #define _POSIX_PIPE_BUF 512
132 #define _POSIX_RE_DUP_MAX 255
133 #define _POSIX_RTSIG_MAX 8
134 #define _POSIX_SEM_NSEMS_MAX 256
135 #define _POSIX_SEM_VALUE_MAX 32767
136 #define _POSIX_SIGQUEUE_MAX 32
137 #define _POSIX_SSIZE_MAX 32767
138 #define _POSIX_STREAM_MAX 8
139 #define _POSIX_SS_REPL_MAX 4
140 #define _POSIX_SYMLINK_MAX 255
141 #define _POSIX_SYMLOOP_MAX 8
142 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
143 #define _POSIX_THREAD_KEYS_MAX 128
144 #define _POSIX_THREAD_THREADS_MAX 64
145 #define _POSIX_TIMER_MAX 32
146 #define _POSIX_TRACE_EVENT_NAME_MAX 30
147 #define _POSIX_TRACE_NAME_MAX 8
148 #define _POSIX_TRACE_SYS_MAX 8
149 #define _POSIX_TRACE_USER_EVENT_MAX 32
150 #define _POSIX_TTY_NAME_MAX 9
151 #define _POSIX_TZNAME_MAX 6
152 #define _POSIX2_BC_BASE_MAX 99
153 #define _POSIX2_BC_DIM_MAX 2048
154 #define _POSIX2_BC_SCALE_MAX 99
155 #define _POSIX2_BC_STRING_MAX 1000
156 #define _POSIX2_CHARCLASS_NAME_MAX 14
157 #define _POSIX2_COLL_WEIGHTS_MAX 2
158 #define _POSIX2_EXPR_NEST_MAX 32
159 #define _POSIX2_LINE_MAX 2048
160 #define _POSIX2_RE_DUP_MAX 255
162 #define _XOPEN_IOV_MAX 16
163 #define _XOPEN_NAME_MAX 255
164 #define _XOPEN_PATH_MAX 1024