]>
git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/include/limits.h
6 /* Most limits are system-specific */
8 #include <bits/limits.h>
10 /* Support signed or unsigned plain-char */
16 #define CHAR_MIN (-128)
20 /* Some universal constants... */
23 #define SCHAR_MIN (-128)
26 #define SHRT_MIN (-1-0x7fff)
27 #define SHRT_MAX 0x7fff
28 #define USHRT_MAX 0xffff
29 #define INT_MIN (-1-0x7fffffff)
30 #define INT_MAX 0x7fffffff
31 #define UINT_MAX 0xffffffffU
32 #define LONG_MIN (-LONG_MAX-1)
33 #define ULONG_MAX (2UL*LONG_MAX+1)
34 #define LLONG_MIN (-LLONG_MAX-1)
35 #define ULLONG_MAX (2ULL*LLONG_MAX+1)
39 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
40 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
42 #ifdef __wasilibc_unmodified_upstream /* WASI has no pipes */
45 #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 /* Implementation choices... */
60 #if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT)
61 #define PTHREAD_KEYS_MAX 128
62 #define PTHREAD_STACK_MIN 2048
63 #define PTHREAD_DESTRUCTOR_ITERATIONS 4
65 #ifdef __wasilibc_unmodified_upstream /* WASI has no semaphores */
66 #define SEM_VALUE_MAX 0x7fffffff
67 #define SEM_NSEMS_MAX 256
69 #define DELAYTIMER_MAX 0x7fffffff
70 #ifdef __wasilibc_unmodified_upstream /* WASI has no mq */
71 #define MQ_PRIO_MAX 32768
73 #ifdef __wasilibc_unmodified_upstream /* WASI has no usernames */
74 #define LOGIN_NAME_MAX 256
77 /* Arbitrary numbers... */
79 #ifdef __wasilibc_unmodified_upstream /* WASI has no shell commands */
80 #define BC_BASE_MAX 99
81 #define BC_DIM_MAX 2048
82 #define BC_SCALE_MAX 99
83 #define BC_STRING_MAX 1000
85 #define CHARCLASS_NAME_MAX 14
86 #define COLL_WEIGHTS_MAX 2
87 #ifdef __wasilibc_unmodified_upstream /* WASI has no shell commands */
88 #define EXPR_NEST_MAX 32
91 #define RE_DUP_MAX 255
94 #define NL_MSGMAX 32767
96 #define NL_TEXTMAX 2048
100 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
103 #define PAGE_SIZE PAGESIZE
106 #define NL_LANGMAX 32
110 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
111 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
117 /* POSIX/SUS requirements follow. These numbers come directly
118 * from SUS and have nothing to do with the host system. */
120 #define _POSIX_AIO_LISTIO_MAX 2
121 #define _POSIX_AIO_MAX 1
122 #define _POSIX_ARG_MAX 4096
123 #define _POSIX_CHILD_MAX 25
124 #define _POSIX_CLOCKRES_MIN 20000000
125 #define _POSIX_DELAYTIMER_MAX 32
126 #define _POSIX_HOST_NAME_MAX 255
127 #define _POSIX_LINK_MAX 8
128 #define _POSIX_LOGIN_NAME_MAX 9
129 #define _POSIX_MAX_CANON 255
130 #define _POSIX_MAX_INPUT 255
131 #define _POSIX_MQ_OPEN_MAX 8
132 #define _POSIX_MQ_PRIO_MAX 32
133 #define _POSIX_NAME_MAX 14
134 #define _POSIX_NGROUPS_MAX 8
135 #define _POSIX_OPEN_MAX 20
136 #define _POSIX_PATH_MAX 256
137 #define _POSIX_PIPE_BUF 512
138 #define _POSIX_RE_DUP_MAX 255
139 #define _POSIX_RTSIG_MAX 8
140 #define _POSIX_SEM_NSEMS_MAX 256
141 #define _POSIX_SEM_VALUE_MAX 32767
142 #define _POSIX_SIGQUEUE_MAX 32
143 #define _POSIX_SSIZE_MAX 32767
144 #define _POSIX_STREAM_MAX 8
145 #define _POSIX_SS_REPL_MAX 4
146 #define _POSIX_SYMLINK_MAX 255
147 #define _POSIX_SYMLOOP_MAX 8
148 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
149 #define _POSIX_THREAD_KEYS_MAX 128
150 #define _POSIX_THREAD_THREADS_MAX 64
151 #define _POSIX_TIMER_MAX 32
152 #define _POSIX_TRACE_EVENT_NAME_MAX 30
153 #define _POSIX_TRACE_NAME_MAX 8
154 #define _POSIX_TRACE_SYS_MAX 8
155 #define _POSIX_TRACE_USER_EVENT_MAX 32
156 #define _POSIX_TTY_NAME_MAX 9
157 #define _POSIX_TZNAME_MAX 6
158 #define _POSIX2_BC_BASE_MAX 99
159 #define _POSIX2_BC_DIM_MAX 2048
160 #define _POSIX2_BC_SCALE_MAX 99
161 #define _POSIX2_BC_STRING_MAX 1000
162 #define _POSIX2_CHARCLASS_NAME_MAX 14
163 #define _POSIX2_COLL_WEIGHTS_MAX 2
164 #define _POSIX2_EXPR_NEST_MAX 32
165 #define _POSIX2_LINE_MAX 2048
166 #define _POSIX2_RE_DUP_MAX 255
168 #define _XOPEN_IOV_MAX 16
169 #define _XOPEN_NAME_MAX 255
170 #define _XOPEN_PATH_MAX 1024