Copyright 1989 AT&T. Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <limits.h>
The <limits.h> header defines various symbolic names. Different categories of names are described below.
The names represent various limits on resources that the implementation imposes on applications. Symbolic constant names beginning with _POSIX can be found in unistd.h(3HEAD).
Applications should not assume any particular value for a limit. An application wishing to avail itself of the full amount of a resource available on an implementation can make use of the value given in limits.h on that particular implementation by using the symbolic names listed below. Many of the listed limits are not invariant, and at runtime, the value of the limit might differ from those given in this header, for the following reasons:
The limit is pathname-dependent.
The limit differs between the compile and runtime machines.
For these reasons, an application can use the fpathconf(2), pathconf(2), and sysconf(3C) functions to determine the actual value of a limit at runtime.
Maximum number of I/O operations in a single list I/O call supported by the implementation.
Maximum number of outstanding asynchronous I/O operations supported by the implementation.
The maximum amount by which a process can decrease its asynchronous I/O priority level from its own scheduling priority.
Maximum length of argument to the exec(2) functions including environment data.
Maximum number of functions that can be registered with atexit(3C).
Maximum number of simultaneous processes per real user ID.
Number of clock ticks per second returned by the times(2) function.
Maximum number of timer expiration overruns.
Maximum length of a host name (not including the terminating null) as returned from the gethostname(3C) function.
Maximum number of iovec structures that one process has available for use with read(2) or write(2).
Maximum length of a login name.
The maximum number of open message queue descriptors a process is allowed to hold.
Maximum length of a login name.
The maximum number of open message queue descriptors a process is allowed to hold.
The maximum number of message priorities supported by the implementation.
Maximum number of files that one process can have open at any one time.
Size in bytes of a page.
Equivalent to PAGESIZE. If either PAGESIZE or PAGE_SIZE is defined, the other is defined with the same value.
The maximum number of significant bytes in a password, not including the terminating null.
Maximum number of attempts made to destroy a thread's thread-specific data values on thread exit.
Maximum number of data keys that can be created by a process.
Minimum size in bytes of thread stack storage.
Maximum number of threads that can be created per process.
The number of repeated occurrences of a BRE permitted by the regexec(3C) and regcomp(3C) functions when using the interval notation {\e(m,n\e}.
Maximum number of realtime signals reserved for application use in this implementation.
Maximum number of semaphores that a process can have.
The maximum value a semaphore can have.
Maximum number of queued signals that a process can send and have pending at the receiver(s) at any time.
The maximum number of replenishment operations that may be simultaneously pending for a particular sporadic server scheduler.
The number of streams that one process can have open at one time. If defined, it has the same value as FOPEN_MAX.
Maximum number of symbolic links that can be reliably traversed in the resolution of a pathname in the absence of a loop.
Maximum number of timers per process supported by the implementation.
Maximum length of the trace event name.
Maximum length of the trace generation version string or of the trace stream name.
Maximum number of trace streams that may simultaneously exist in the system.
Maximum number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefined user trace event POSIX_TRACE_UNNAMED_USER_EVENT.
Maximum length of terminal device name.
Maximum number of bytes supported for the name of a timezone (not of the TZ variable).
The values in the following list can be constants within an implementation or can vary from one pathname to another. For example, file systems or directories can have different characteristics. The value supported for a specific pathname is provided by the pathconf(2) function. FILESIZEBITS
Minimum number of bits needed to represent, as a signed integer value, the maximum size of a regular file allowed in the specified directory.
Maximum number of links to a single file.
Maximum number of bytes in a terminal canonical input line.
Minimum number of bytes for which space is available in a terminal input queue; therefore, the maximum number of bytes a conforming application may require to be typed as input before reading them.
Maximum number of bytes in a filename (not including terminating null).
Maximum number of bytes in a pathname, including the terminating null character.
Maximum number of bytes that is guaranteed to be atomic when writing to a pipe.
Minimum number of bytes of storage actually allocated for any portion of a file.
Recommended increment for file transfer sizes between the POSIX_REC_MIN_XFER_SIZE and POSIX_REC_MAX_XFER_SIZE values.
Maximum recommended file transfer size.
Minimum recommended file transfer size.
Recommended file transfer buffer alignment.
Maximum number of bytes in a symbolic link.
The magnitude limitations in the following list are fixed by specific implementations. An application should assume that the value supplied by <limits.h> in a specific implementation is the minimum that pertains whenever the application is run under that implementation. A specific instance of a specific implementation can increase the value relative to that supplied by <limits.h> for that implementation. The actual value supported by a specific instance is provided by the sysconf(3C) function. BC_BASE_MAX
Maximum obase values allowed by the bc(1) utility.
Maximum number of elements permitted in an array by the bc utility.
Maximum scale value allowed by the bc utility.
Maximum length of a string constant accepted by the bc utility.
Maximum number of bytes in a character class name.
Maximum number of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file.
Maximum number of expressions that can be nested within parentheses by the expr(1) utility.
Maximum number of expressions that can be nested within parentheses by the expr utility.
Unless otherwise noted, the maximum length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailing <newline>.
Maximum number of simultaneous supplementary group IDs per process.
Maximum number of repeated occurrences of a regular expression permitted when using the interval notation \e{m,n\e}.
The symbolic constants in the following list are symbolic names for the most restrictive value for certain features on an implementation supporting the POSIX Timers option. _POSIX_CLOCKRES_MIN
The resolution of the CLOCK_REALTIME clock, in nanoseconds.
The symbolic constants in the following list are symbolic names for the most restrictive value for certain features on an implementation conforming to various POSIX and Single Unix Specification requirements. See standards(7). _POSIX_AIO_LISTIO_MAX
The number of I/O operations that can be specified in a list I/O call.
The number of outstanding asynchronous I/O operations.
Maximum length of argument to the exec(2) functions including environment data.
Maximum number of simultaneous processes per real user ID.
The number of timer expiration overruns.
Maximum length of a host name (not including the terminating null) as returned from the gethostname(3C) function.
Maximum number of links to a single file.
The size of the storage required for a login name, in bytes, including the terminating null.
Maximum number of bytes in a terminal canonical input queue.
Maximum number of bytes allowed in a terminal input queue.
The number of message queues that can be open for a single process.
The maximum number of message priorities supported by the implementation.
Maximum number of bytes in a filename (not including terminating null).
Maximum number of simultaneous supplementary group IDs per process.
Maximum number of files that one process can have open at any one time.
Maximum number of bytes in a pathname.
Maximum number of bytes that is guaranteed to be atomic when writing to a pipe.
The number of repeated occurrences of a BRE permitted by the regexec() and regcomp() functions when using the interval notation {\e(m,n\e}
The number of realtime signal numbers reserved for application use.
The number of semaphores that a process can have.
The maximum value a semaphore can have.
The number of queued signals that a process can send and have pending at the receiver(s) at any time.
The value that can be stored in an object of type ssize_t.
The number of streams that one process can have open at one time.
The number of replenishment operations that can be simultaneously pending for a particular sporadic server scheduler.
The number of bytes in a symbolic link.
The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop.
The number of attempts made to destroy a thread's thread-specific data values on thread exit.
The number of data keys per process.
The number of threads per process.
The per-process number of timers.
The length in bytes of a trace event name.
The length in bytes of a trace generation version string or a trace stream name.
The number of trace streams that can simultaneously exist in the system.
The number of user trace event type identifiers that may simultaneously exist in a traced process, including the predefined user trace event POSIX_TRACE_UNNAMED_USER_EVENT.
The size of the storage required for a terminal device name, in bytes, including the terminating null.
Maximum number of bytes supported for the name of a timezone (not of the TZ variable).
Maximum obase values allowed by the bc utility.
Maximum number of elements permitted in an array by the bc utility.
Maximum scale value allowed by the bc utility.
Maximum length of a string constant accepted by the bc utility.
Maximum number of bytes in a character class name.
Maximum number of weights that can be assigned to an entry of the LC_COLLATE order keyword in the locale definition file.
Maximum number of expressions that can be nested within parentheses by the expr utility.
Unless otherwise noted, the maximum length, in bytes, of a utility's input line (either standard input or another file), when the utility is described as processing text files. The length includes room for the trailing <newline>.
Maximum number of repeated occurrences of a regular expression permitted when using the interval notation \e{m,n\e}.
Maximum number of iovec structures that one process has available for use with read(2) or write(2).
Maximum number of bytes in a filename (not including the terminating null).
Maximum number of bytes in a pathname.
The values in the following lists shall be defined in <limits.h> and are constant expressions suitable for use in #if preprocessing directives. Moreover, except for CHAR_BIT, DBL_DIG, DBL_MAX, FLT_DIG, FLT_MAX, LONG_BIT, WORD_BIT, and MB_LEN_MAX, the symbolic names are defined as expressions of the correct type.
If the value of an object of type char is treated as a signed integer when used in an expression, the value of CHAR_MIN is the same as that of SCHAR_MIN and the value of CHAR_MAX is the same as that of SCHAR_MAX. Otherwise, the value of CHAR_MIN is 0 and the value of CHAR_MAX is the same as that of UCHAR_MAX. CHAR_BIT
Number of bits in a type char.
Maximum value of type char.
Minimum value of type char.
Digits of precision of type double.
Maximum decimal value of a double.
Minimum decimal value of a double.
Digits of precision of type float.
Maximum decimal value of a float.
Minimum decimal value of a float.
Minimum value of type int.
Maximum value of an int.
Minimum value of type long long.
Maximum value of type long long.
Number of bits in a long.
Minimum value of type long.
Maximum value of a long.
Maximum number of bytes in a character, for any supported locale.
Minimum value of type signed char.
Maximum value of type signed char.
Minimum value of type short.
Maximum value of type short.
Maximum value of an object of type ssize_t.
Minimum number of unique filename generated by tmpnam(3C). Maximum number of times an application can call tmpnam() reliably.
Maximum value of type unsigned char.
Maximum value of type unsigned.
Maximum value of type unsigned long long.
Maximum value of type unsigned long.
Maximum value for a type unsigned short.
Number of bits in a word or type int.
The following constants are defined in <limits.h>. CHARCLASS_NAME_MAX
Maximum number of bytes in a character class name.
The maximum number of bytes supported in a user's login name.
Maximum value of digit in calls to the printf(3C) and scanf(3C) functions.
Maximum number of bytes in a LANG name.
Maximum message number.
Maximum number of bytes in an N-to-1 collation mapping.
Maximum set number.
Maximum number of bytes in a message string.
Default process priority.
fpathconf (2), pathconf (2), sysconf (3C), standards (7)