1/* Copyright (C) 1991-2018 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#include <bits/wordsize.h>
28
29/* These are the standard-mandated minimum values. */
30
31/* Minimum number of operations in one list I/O call. */
32#define _POSIX_AIO_LISTIO_MAX 2
33
34/* Minimal number of outstanding asynchronous I/O operations. */
35#define _POSIX_AIO_MAX 1
36
37/* Maximum length of arguments to `execve', including environment. */
38#define _POSIX_ARG_MAX 4096
39
40/* Maximum simultaneous processes per real user ID. */
41#ifdef __USE_XOPEN2K
42# define _POSIX_CHILD_MAX 25
43#else
44# define _POSIX_CHILD_MAX 6
45#endif
46
47/* Minimal number of timer expiration overruns. */
48#define _POSIX_DELAYTIMER_MAX 32
49
50/* Maximum length of a host name (not including the terminating null)
51 as returned from the GETHOSTNAME function. */
52#define _POSIX_HOST_NAME_MAX 255
53
54/* Maximum link count of a file. */
55#define _POSIX_LINK_MAX 8
56
57/* Maximum length of login name. */
58#define _POSIX_LOGIN_NAME_MAX 9
59
60/* Number of bytes in a terminal canonical input queue. */
61#define _POSIX_MAX_CANON 255
62
63/* Number of bytes for which space will be
64 available in a terminal input queue. */
65#define _POSIX_MAX_INPUT 255
66
67/* Maximum number of message queues open for a process. */
68#define _POSIX_MQ_OPEN_MAX 8
69
70/* Maximum number of supported message priorities. */
71#define _POSIX_MQ_PRIO_MAX 32
72
73/* Number of bytes in a filename. */
74#define _POSIX_NAME_MAX 14
75
76/* Number of simultaneous supplementary group IDs per process. */
77#ifdef __USE_XOPEN2K
78# define _POSIX_NGROUPS_MAX 8
79#else
80# define _POSIX_NGROUPS_MAX 0
81#endif
82
83/* Number of files one process can have open at once. */
84#ifdef __USE_XOPEN2K
85# define _POSIX_OPEN_MAX 20
86#else
87# define _POSIX_OPEN_MAX 16
88#endif
89
90#if !defined __USE_XOPEN2K || defined __USE_GNU
91/* Number of descriptors that a process may examine with `pselect' or
92 `select'. */
93# define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
94#endif
95
96/* Number of bytes in a pathname. */
97#define _POSIX_PATH_MAX 256
98
99/* Number of bytes than can be written atomically to a pipe. */
100#define _POSIX_PIPE_BUF 512
101
102/* The number of repeated occurrences of a BRE permitted by the
103 REGEXEC and REGCOMP functions when using the interval notation. */
104#define _POSIX_RE_DUP_MAX 255
105
106/* Minimal number of realtime signals reserved for the application. */
107#define _POSIX_RTSIG_MAX 8
108
109/* Number of semaphores a process can have. */
110#define _POSIX_SEM_NSEMS_MAX 256
111
112/* Maximal value of a semaphore. */
113#define _POSIX_SEM_VALUE_MAX 32767
114
115/* Number of pending realtime signals. */
116#define _POSIX_SIGQUEUE_MAX 32
117
118/* Largest value of a `ssize_t'. */
119#define _POSIX_SSIZE_MAX 32767
120
121/* Number of streams a process can have open at once. */
122#define _POSIX_STREAM_MAX 8
123
124/* The number of bytes in a symbolic link. */
125#define _POSIX_SYMLINK_MAX 255
126
127/* The number of symbolic links that can be traversed in the
128 resolution of a pathname in the absence of a loop. */
129#define _POSIX_SYMLOOP_MAX 8
130
131/* Number of timer for a process. */
132#define _POSIX_TIMER_MAX 32
133
134/* Maximum number of characters in a tty name. */
135#define _POSIX_TTY_NAME_MAX 9
136
137/* Maximum length of a timezone name (element of `tzname'). */
138#ifdef __USE_XOPEN2K
139# define _POSIX_TZNAME_MAX 6
140#else
141# define _POSIX_TZNAME_MAX 3
142#endif
143
144#if !defined __USE_XOPEN2K || defined __USE_GNU
145/* Maximum number of connections that can be queued on a socket. */
146# define _POSIX_QLIMIT 1
147
148/* Maximum number of bytes that can be buffered on a socket for send
149 or receive. */
150# define _POSIX_HIWAT _POSIX_PIPE_BUF
151
152/* Maximum number of elements in an `iovec' array. */
153# define _POSIX_UIO_MAXIOV 16
154#endif
155
156/* Maximum clock resolution in nanoseconds. */
157#define _POSIX_CLOCKRES_MIN 20000000
158
159
160/* Get the implementation-specific values for the above. */
161#include <bits/local_lim.h>
162
163
164#ifndef SSIZE_MAX
165/* ssize_t is not formally required to be the signed type
166 corresponding to size_t, but it is for all configurations supported
167 by glibc. */
168# if __WORDSIZE == 64 || __WORDSIZE32_SIZE_ULONG
169# define SSIZE_MAX LONG_MAX
170# else
171# define SSIZE_MAX INT_MAX
172# endif
173#endif
174
175
176/* This value is a guaranteed minimum maximum.
177 The current maximum can be got from `sysconf'. */
178
179#ifndef NGROUPS_MAX
180# define NGROUPS_MAX 8
181#endif
182
183#endif /* bits/posix1_lim.h */
184