initial check-in, version 0.5.0
[musl] / include / limits.h
1 #ifndef _LIMITS_H
2 #define _LIMITS_H
3
4 /* Most limits are system-specific */
5
6 #include <bits/limits.h>
7
8 /* Some universal constants... */
9
10 #define CHAR_BIT 8
11 #define SCHAR_MIN (-128)
12 #define SCHAR_MAX 127
13 #define UCHAR_MAX 255
14 #define CHAR_MIN (-128)
15 #define CHAR_MAX 127
16 #define SSIZE_MAX LONG_MAX
17
18 #define MB_LEN_MAX 4
19 #define TZNAME_MAX 6
20 #define TTY_NAME_MAX 20
21 #define HOST_NAME_MAX 255
22
23 /* Implementation choices... */
24
25 #define PTHREAD_KEYS_MAX  1024
26 #define PTHREAD_STACK_MIN (2*PAGE_SIZE)
27
28 /* Arbitrary numbers... */
29
30 #define BC_BASE_MAX 99
31 #define BC_DIM_MAX 2048
32 #define BC_SCALE_MAX 99
33 #define BC_STRING_MAX 1000
34 #define CHARCLASS_NAME_MAX 14
35 #define COLL_WEIGHTS_MAX 2
36 #define EXPR_NEST_MAX 32
37 #define LINE_MAX 4096
38 #define RE_DUP_MAX 255
39
40 #define NL_ARGMAX 9
41 #define NL_LANGMAX 32
42 #define NL_MSGMAX 32767
43 #define NL_NMAX (MB_LEN_MAX*4)
44 #define NL_SETMAX 255
45 #define NL_TEXTMAX 2048
46
47 /* POSIX/SUS requirements follow. These numbers come directly
48  * from SUS and have nothing to do with the host system. */
49
50 #define _POSIX_AIO_LISTIO_MAX   2
51 #define _POSIX_AIO_MAX          1
52 #define _POSIX_ARG_MAX          4096
53 #define _POSIX_CHILD_MAX        25
54 #define _POSIX_DELAYTIMER_MAX   32
55 #define _POSIX_HOST_NAME_MAX    255
56 #define _POSIX_LINK_MAX         8
57 #define _POSIX_LOGIN_NAME_MAX   9
58 #define _POSIX_MAX_CANON        255
59 #define _POSIX_MAX_INPUT        255
60 #define _POSIX_MQ_OPEN_MAX      8
61 #define _POSIX_MQ_PRIO_MAX      32
62 #define _POSIX_NAME_MAX         14
63 #define _POSIX_NGROUPS_MAX      8
64 #define _POSIX_OPEN_MAX         20
65 #define _POSIX_PATH_MAX         256
66 #define _POSIX_PIPE_BUF         512
67 #define _POSIX_RE_DUP_MAX       255
68 #define _POSIX_RTSIG_MAX        8
69 #define _POSIX_SEM_NSEMS_MAX    256
70 #define _POSIX_SEM_VALUE_MAX    32767
71 #define _POSIX_SIGQUEUE_MAX     32
72 #define _POSIX_SSIZE_MAX        32767
73 #define _POSIX_STREAM_MAX       8
74 #define _POSIX_SS_REPL_MAX      4
75 #define _POSIX_SYMLINK_MAX      255
76 #define _POSIX_SYMLOOP_MAX      8
77 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
78 #define _POSIX_THREAD_KEYS_MAX  128
79 #define _POSIX_THREAD_THREADS_MAX 64
80 #define _POSIX_TIMER_MAX        32
81 #define _POSIX_TRACE_EVENT_NAME_MAX 30
82 #define _POSIX_TRACE_NAME_MAX   8
83 #define _POSIX_TRACE_SYS_MAX    8
84 #define _POSIX_TRACE_USER_EVENT_MAX 32
85 #define _POSIX_TTY_NAME_MAX     9
86 #define _POSIX_TZNAME_MAX       6
87 #define _POSIX2_BC_BASE_MAX     99
88 #define _POSIX2_BC_DIM_MAX      2048
89 #define _POSIX2_BC_SCALE_MAX    99
90 #define _POSIX2_BC_STRING_MAX   1000
91 #define _POSIX2_CHARCLASS_NAME_MAX 14
92 #define _POSIX2_COLL_WEIGHTS_MAX 2
93 #define _POSIX2_EXPR_NEST_MAX   32
94 #define _POSIX2_LINE_MAX        2048
95 #define _POSIX2_RE_DUP_MAX      255
96
97 #define _XOPEN_IOV_MAX          16
98 #define _XOPEN_NAME_MAX         255
99 #define _XOPEN_PATH_MAX         1024
100
101 #endif