fix misplaced indention in sys/procfs.h
[musl.git] / include / limits.h
blobf9805a1e15964995ffc47e830a66e60b255e728e
1 #ifndef _LIMITS_H
2 #define _LIMITS_H
4 #include <features.h>
6 /* Most limits are system-specific */
8 #include <bits/limits.h>
10 /* Support signed or unsigned plain-char */
12 #if '\0'-1 > 0
13 #define CHAR_MIN 0
14 #define CHAR_MAX 255
15 #else
16 #define CHAR_MIN (-128)
17 #define CHAR_MAX 127
18 #endif
20 /* Some universal constants... */
22 #define CHAR_BIT 8
23 #define SCHAR_MIN (-128)
24 #define SCHAR_MAX 127
25 #define UCHAR_MAX 255
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)
37 #define MB_LEN_MAX 4
39 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
40 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
42 #define PIPE_BUF 4096
43 #ifdef PAGE_SIZE
44 #define PAGESIZE PAGE_SIZE
45 #endif
46 #define FILESIZEBITS 64
47 #define NAME_MAX 255
48 #define SYMLINK_MAX 255
49 #define PATH_MAX 4096
50 #define NZERO 20
51 #define NGROUPS_MAX 32
52 #define ARG_MAX 131072
53 #define IOV_MAX 1024
54 #define SYMLOOP_MAX 40
55 #define WORD_BIT 32
56 #define SSIZE_MAX LONG_MAX
57 #define TZNAME_MAX 6
58 #define TTY_NAME_MAX 32
59 #define HOST_NAME_MAX 255
61 /* Implementation choices... */
63 #define PTHREAD_KEYS_MAX 128
64 #define PTHREAD_STACK_MIN 2048
65 #define PTHREAD_DESTRUCTOR_ITERATIONS 4
66 #define SEM_VALUE_MAX 0x7fffffff
67 #define SEM_NSEMS_MAX 256
68 #define DELAYTIMER_MAX 0x7fffffff
69 #define MQ_PRIO_MAX 32768
70 #define LOGIN_NAME_MAX 256
72 /* Arbitrary numbers... */
74 #define BC_BASE_MAX 99
75 #define BC_DIM_MAX 2048
76 #define BC_SCALE_MAX 99
77 #define BC_STRING_MAX 1000
78 #define CHARCLASS_NAME_MAX 14
79 #define COLL_WEIGHTS_MAX 2
80 #define EXPR_NEST_MAX 32
81 #define LINE_MAX 4096
82 #define RE_DUP_MAX 255
84 #define NL_ARGMAX 9
85 #define NL_LANGMAX 32
86 #define NL_MSGMAX 32767
87 #define NL_SETMAX 255
88 #define NL_TEXTMAX 2048
90 #endif
92 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
93 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
95 #define NL_NMAX 16
97 #endif
99 /* POSIX/SUS requirements follow. These numbers come directly
100 * from SUS and have nothing to do with the host system. */
102 #define _POSIX_AIO_LISTIO_MAX 2
103 #define _POSIX_AIO_MAX 1
104 #define _POSIX_ARG_MAX 4096
105 #define _POSIX_CHILD_MAX 25
106 #define _POSIX_CLOCKRES_MIN 20000000
107 #define _POSIX_DELAYTIMER_MAX 32
108 #define _POSIX_HOST_NAME_MAX 255
109 #define _POSIX_LINK_MAX 8
110 #define _POSIX_LOGIN_NAME_MAX 9
111 #define _POSIX_MAX_CANON 255
112 #define _POSIX_MAX_INPUT 255
113 #define _POSIX_MQ_OPEN_MAX 8
114 #define _POSIX_MQ_PRIO_MAX 32
115 #define _POSIX_NAME_MAX 14
116 #define _POSIX_NGROUPS_MAX 8
117 #define _POSIX_OPEN_MAX 20
118 #define _POSIX_PATH_MAX 256
119 #define _POSIX_PIPE_BUF 512
120 #define _POSIX_RE_DUP_MAX 255
121 #define _POSIX_RTSIG_MAX 8
122 #define _POSIX_SEM_NSEMS_MAX 256
123 #define _POSIX_SEM_VALUE_MAX 32767
124 #define _POSIX_SIGQUEUE_MAX 32
125 #define _POSIX_SSIZE_MAX 32767
126 #define _POSIX_STREAM_MAX 8
127 #define _POSIX_SS_REPL_MAX 4
128 #define _POSIX_SYMLINK_MAX 255
129 #define _POSIX_SYMLOOP_MAX 8
130 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
131 #define _POSIX_THREAD_KEYS_MAX 128
132 #define _POSIX_THREAD_THREADS_MAX 64
133 #define _POSIX_TIMER_MAX 32
134 #define _POSIX_TRACE_EVENT_NAME_MAX 30
135 #define _POSIX_TRACE_NAME_MAX 8
136 #define _POSIX_TRACE_SYS_MAX 8
137 #define _POSIX_TRACE_USER_EVENT_MAX 32
138 #define _POSIX_TTY_NAME_MAX 9
139 #define _POSIX_TZNAME_MAX 6
140 #define _POSIX2_BC_BASE_MAX 99
141 #define _POSIX2_BC_DIM_MAX 2048
142 #define _POSIX2_BC_SCALE_MAX 99
143 #define _POSIX2_BC_STRING_MAX 1000
144 #define _POSIX2_CHARCLASS_NAME_MAX 14
145 #define _POSIX2_COLL_WEIGHTS_MAX 2
146 #define _POSIX2_EXPR_NEST_MAX 32
147 #define _POSIX2_LINE_MAX 2048
148 #define _POSIX2_RE_DUP_MAX 255
150 #define _XOPEN_IOV_MAX 16
151 #define _XOPEN_NAME_MAX 255
152 #define _XOPEN_PATH_MAX 1024
154 #endif