4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2013 Gary Mills
24 *
25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 /* Copyright (c) 1988 AT&T */
30 /* All Rights Reserved */
31
32
33 #ifndef _LIMITS_H
34 #define _LIMITS_H
35
36 #include <sys/feature_tests.h>
37 #include <sys/isa_defs.h>
38 #include <iso/limits_iso.h>
39
40 /*
41 * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
42 * committee's working draft for the revision of the current ISO C standard,
43 * ISO/IEC 9899:1990 Programming language - C. These are not currently
239
240 #define IOV_MAX _XOPEN_IOV_MAX
241
242 #if defined(__EXTENSIONS__) || \
243 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
244
245 #define FCHR_MAX 1048576 /* max size of a file in bytes */
246 #define PID_MAX 999999 /* max value for a process ID */
247
248 /*
249 * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
250 * related text states:
251 *
252 * A definition of one of the values from Table 2-5 shall be omitted from the
253 * <limits.h> on specific implementations where the corresponding value is
254 * equal to or greater than the stated minimum, but where the value can vary
255 * depending on the file to which it is applied. The actual value supported for
256 * a specific pathname shall be provided by the pathconf() (5.7.1) function.
257 *
258 * This is clear that any machine supporting multiple file system types
259 * and/or a network can not include this define, regardless of protection
260 * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
261 *
262 * #define NAME_MAX 14
263 */
264
265 #define CHILD_MAX 25 /* max # of processes per user id */
266 #ifndef OPEN_MAX
267 #define OPEN_MAX 256 /* max # of files a process can have open */
268 #endif
269
270 #define PIPE_MAX 5120 /* max # bytes written to a pipe in a write */
271
272 #define STD_BLK 1024 /* # bytes in a physical I/O block */
273 #define UID_MAX 2147483647 /* max value for a user or group ID */
274 #define USI_MAX 4294967295 /* max decimal value of an "unsigned" */
275 #define SYSPID_MAX 1 /* max pid of system processes */
276
277 #ifndef SYS_NMLN /* also defined in sys/utsname.h */
278 #define SYS_NMLN 257 /* 4.0 size of utsname elements */
279 #endif
280
281 #ifndef CLK_TCK
282
283 #if !defined(_CLOCK_T) || __cplusplus >= 199711L
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2013 Gary Mills
24 * Copyright 2017 RackTop Systems.
25 *
26 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
28 */
29
30 /* Copyright (c) 1988 AT&T */
31 /* All Rights Reserved */
32
33
34 #ifndef _LIMITS_H
35 #define _LIMITS_H
36
37 #include <sys/feature_tests.h>
38 #include <sys/isa_defs.h>
39 #include <iso/limits_iso.h>
40
41 /*
42 * Include fixed width type limits as proposed by the ISO/JTC1/SC22/WG14 C
43 * committee's working draft for the revision of the current ISO C standard,
44 * ISO/IEC 9899:1990 Programming language - C. These are not currently
240
241 #define IOV_MAX _XOPEN_IOV_MAX
242
243 #if defined(__EXTENSIONS__) || \
244 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
245
246 #define FCHR_MAX 1048576 /* max size of a file in bytes */
247 #define PID_MAX 999999 /* max value for a process ID */
248
249 /*
250 * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
251 * related text states:
252 *
253 * A definition of one of the values from Table 2-5 shall be omitted from the
254 * <limits.h> on specific implementations where the corresponding value is
255 * equal to or greater than the stated minimum, but where the value can vary
256 * depending on the file to which it is applied. The actual value supported for
257 * a specific pathname shall be provided by the pathconf() (5.7.1) function.
258 *
259 * This is clear that any machine supporting multiple file system types
260 * and/or a network should not include this define, regardless of protection
261 * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags. We chose to ignore that
262 * and provide it anyway for compatibility with other platforms that don't
263 * follow the spec as precisely as they should. Its usage is discouraged.
264 */
265 #define NAME_MAX 255
266
267 #define CHILD_MAX 25 /* max # of processes per user id */
268 #ifndef OPEN_MAX
269 #define OPEN_MAX 256 /* max # of files a process can have open */
270 #endif
271
272 #define PIPE_MAX 5120 /* max # bytes written to a pipe in a write */
273
274 #define STD_BLK 1024 /* # bytes in a physical I/O block */
275 #define UID_MAX 2147483647 /* max value for a user or group ID */
276 #define USI_MAX 4294967295 /* max decimal value of an "unsigned" */
277 #define SYSPID_MAX 1 /* max pid of system processes */
278
279 #ifndef SYS_NMLN /* also defined in sys/utsname.h */
280 #define SYS_NMLN 257 /* 4.0 size of utsname elements */
281 #endif
282
283 #ifndef CLK_TCK
284
285 #if !defined(_CLOCK_T) || __cplusplus >= 199711L
|