1 | /* Copyright (C) 1991-2016 Free Software Foundation, Inc. |
2 | This file is part of the GNU C Library. |
3 | |
4 | The GNU C Library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either |
7 | version 2.1 of the License, or (at your option) any later version. |
8 | |
9 | The GNU C Library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Lesser General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU Lesser General Public |
15 | License along with the GNU C Library; if not, see |
16 | <http://www.gnu.org/licenses/>. */ |
17 | |
18 | /* |
19 | * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> |
20 | * |
21 | * Never include this file directly; use <limits.h> instead. |
22 | */ |
23 | |
24 | #ifndef _BITS_POSIX1_LIM_H |
25 | #define _BITS_POSIX1_LIM_H 1 |
26 | |
27 | |
28 | /* These are the standard-mandated minimum values. */ |
29 | |
30 | /* Minimum number of operations in one list I/O call. */ |
31 | #define _POSIX_AIO_LISTIO_MAX 2 |
32 | |
33 | /* Minimal number of outstanding asynchronous I/O operations. */ |
34 | #define _POSIX_AIO_MAX 1 |
35 | |
36 | /* Maximum length of arguments to `execve', including environment. */ |
37 | #define _POSIX_ARG_MAX 4096 |
38 | |
39 | /* Maximum simultaneous processes per real user ID. */ |
40 | #ifdef __USE_XOPEN2K |
41 | # define _POSIX_CHILD_MAX 25 |
42 | #else |
43 | # define _POSIX_CHILD_MAX 6 |
44 | #endif |
45 | |
46 | /* Minimal number of timer expiration overruns. */ |
47 | #define _POSIX_DELAYTIMER_MAX 32 |
48 | |
49 | /* Maximum length of a host name (not including the terminating null) |
50 | as returned from the GETHOSTNAME function. */ |
51 | #define _POSIX_HOST_NAME_MAX 255 |
52 | |
53 | /* Maximum link count of a file. */ |
54 | #define _POSIX_LINK_MAX 8 |
55 | |
56 | /* Maximum length of login name. */ |
57 | #define _POSIX_LOGIN_NAME_MAX 9 |
58 | |
59 | /* Number of bytes in a terminal canonical input queue. */ |
60 | #define _POSIX_MAX_CANON 255 |
61 | |
62 | /* Number of bytes for which space will be |
63 | available in a terminal input queue. */ |
64 | #define _POSIX_MAX_INPUT 255 |
65 | |
66 | /* Maximum number of message queues open for a process. */ |
67 | #define _POSIX_MQ_OPEN_MAX 8 |
68 | |
69 | /* Maximum number of supported message priorities. */ |
70 | #define _POSIX_MQ_PRIO_MAX 32 |
71 | |
72 | /* Number of bytes in a filename. */ |
73 | #define _POSIX_NAME_MAX 14 |
74 | |
75 | /* Number of simultaneous supplementary group IDs per process. */ |
76 | #ifdef __USE_XOPEN2K |
77 | # define _POSIX_NGROUPS_MAX 8 |
78 | #else |
79 | # define _POSIX_NGROUPS_MAX 0 |
80 | #endif |
81 | |
82 | /* Number of files one process can have open at once. */ |
83 | #ifdef __USE_XOPEN2K |
84 | # define _POSIX_OPEN_MAX 20 |
85 | #else |
86 | # define _POSIX_OPEN_MAX 16 |
87 | #endif |
88 | |
89 | #if !defined __USE_XOPEN2K || defined __USE_GNU |
90 | /* Number of descriptors that a process may examine with `pselect' or |
91 | `select'. */ |
92 | # define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX |
93 | #endif |
94 | |
95 | /* Number of bytes in a pathname. */ |
96 | #define _POSIX_PATH_MAX 256 |
97 | |
98 | /* Number of bytes than can be written atomically to a pipe. */ |
99 | #define _POSIX_PIPE_BUF 512 |
100 | |
101 | /* The number of repeated occurrences of a BRE permitted by the |
102 | REGEXEC and REGCOMP functions when using the interval notation. */ |
103 | #define _POSIX_RE_DUP_MAX 255 |
104 | |
105 | /* Minimal number of realtime signals reserved for the application. */ |
106 | #define _POSIX_RTSIG_MAX 8 |
107 | |
108 | /* Number of semaphores a process can have. */ |
109 | #define _POSIX_SEM_NSEMS_MAX 256 |
110 | |
111 | /* Maximal value of a semaphore. */ |
112 | #define _POSIX_SEM_VALUE_MAX 32767 |
113 | |
114 | /* Number of pending realtime signals. */ |
115 | #define _POSIX_SIGQUEUE_MAX 32 |
116 | |
117 | /* Largest value of a `ssize_t'. */ |
118 | #define _POSIX_SSIZE_MAX 32767 |
119 | |
120 | /* Number of streams a process can have open at once. */ |
121 | #define _POSIX_STREAM_MAX 8 |
122 | |
123 | /* The number of bytes in a symbolic link. */ |
124 | #define _POSIX_SYMLINK_MAX 255 |
125 | |
126 | /* The number of symbolic links that can be traversed in the |
127 | resolution of a pathname in the absence of a loop. */ |
128 | #define _POSIX_SYMLOOP_MAX 8 |
129 | |
130 | /* Number of timer for a process. */ |
131 | #define _POSIX_TIMER_MAX 32 |
132 | |
133 | /* Maximum number of characters in a tty name. */ |
134 | #define _POSIX_TTY_NAME_MAX 9 |
135 | |
136 | /* Maximum length of a timezone name (element of `tzname'). */ |
137 | #ifdef __USE_XOPEN2K |
138 | # define _POSIX_TZNAME_MAX 6 |
139 | #else |
140 | # define _POSIX_TZNAME_MAX 3 |
141 | #endif |
142 | |
143 | #if !defined __USE_XOPEN2K || defined __USE_GNU |
144 | /* Maximum number of connections that can be queued on a socket. */ |
145 | # define _POSIX_QLIMIT 1 |
146 | |
147 | /* Maximum number of bytes that can be buffered on a socket for send |
148 | or receive. */ |
149 | # define _POSIX_HIWAT _POSIX_PIPE_BUF |
150 | |
151 | /* Maximum number of elements in an `iovec' array. */ |
152 | # define _POSIX_UIO_MAXIOV 16 |
153 | #endif |
154 | |
155 | /* Maximum clock resolution in nanoseconds. */ |
156 | #define _POSIX_CLOCKRES_MIN 20000000 |
157 | |
158 | |
159 | /* Get the implementation-specific values for the above. */ |
160 | #include <bits/local_lim.h> |
161 | |
162 | |
163 | #ifndef SSIZE_MAX |
164 | # define SSIZE_MAX LONG_MAX |
165 | #endif |
166 | |
167 | |
168 | /* This value is a guaranteed minimum maximum. |
169 | The current maximum can be got from `sysconf'. */ |
170 | |
171 | #ifndef NGROUPS_MAX |
172 | # define NGROUPS_MAX 8 |
173 | #endif |
174 | |
175 | #endif /* bits/posix1_lim.h */ |
176 | |