limits(5)
NAME
limits − implementation-specific constants
SYNOPSIS
#include <limits.h>
DESCRIPTION
The following symbols are defined in <limits.h> and are used throughout the descriptive text of this manual. The column headed HP-UX Value lists the values that application writers should assume for portability across all HP-UX systems.
Symbols after values are interpreted as follows:
+ Actual limit might be greater than specified value on certain HP-UX systems.
− Actual limit might be less than the specified value on certain HP-UX systems.
= Actual limit is always equal to the specified value and does not vary across HP-UX systems.
∗ The name of this limit is defined only if the preprocessor macro _XPG2 is defined, either by the compilation flag −D_XPG2, or by a #define directive in the source before <limits.h> is included in the source.
# The value defined for this limit might not be a compile-time constant. The value defined always evaluates to an integer expression at run time.
Some of these limits vary with system configuration, and can be determined dynamically by using sysconf(2). Others can vary according to file system or device associated with a specific file, and can be determined with pathconf(2). Others are obsolescent because they are redundant with other limits or not useful in portable applications. They are provided only for importability of applications from other systems, to support applications that comply with the X/Open Portability Guide, Issue 2, and for backward compatibility with earlier versions of HP-UX. The _XPG2 flag should not be defined in new applications.
By including the <limits.h> file in the compilation an application can test the appropriate limits to determine whether it can operate on a particular system, or it might even alter its behavior to match the system to increase its portability across a varying range of limit settings and systems.
| Constant | Description | HP-UX Value |
| ARG_MAX | Max length of arguments to exec(2) in bytes, including environment data | 5120 +* |
| CHAR_BIT | Number of bits in a char | 8 = |
| CHAR_MAX | Max integer value of a char | 127 = |
| CHAR_MIN | Min integer value of a char | −128 = |
| CHILD_MAX | Max number of simultaneous processes per user ID | 25 +−* |
| CLK_TCK | Number of clock ticks per second | 50 +# |
| DBL_DIG | Digits of precision of a double | 16 + |
| DBL_MAX | Max positive value of a double | 1.7976931348623157e+308 + |
| DBL_MIN | Min positive value of a double | 4.94065645841246544e−324 − |
| FCHR_MAX | Max file offset in bytes | INT_MAX +−* |
| FLT_DIG | Digits of precision of a float | 6 + |
| FLT_MAX | Max positive value of a float | 3.40282346638528860e+38 + |
| FLT_MIN | Min positive value of a float | 1.40129846432481707e−45 − |
| INT_MAX | Max decimal value of an int | 2147483647 + |
| INT_MIN | Min decimal value of an int | −2147483648 − |
| LINE_MAX | Max number of characters in a single line | 2048 = |
| LINK_MAX | Max number of links to a single file | 32767 +* |
| LOCK_MAX | Max number of entries in system lock table | 32 +−* |
| LONG_BIT | Number of bits in a long | 32 + |
| LONG_MAX | Max decimal value of a long | 2147483647 + |
| LONG_MIN | Min decimal value of a long | −2147483648 − |
| MAX_CANON | Max number of bytes in terminal canonincal input line | 512 +* |
| MAX_CHAR | Max number of bytes in terminal input queue | MAX_INPUT =* |
| MAX_INPUT | Max number of bytes in terminal input queue | 512 +* |
| NAME_MAX | Max number of bytes in a path name component | 14 +* |
| NL_ARGMAX | Max value of "digits" in calls to the NLS printf(3S) and scanf(3S) functions | 9 = |
| NL_MSGMAX | Max message number in an NLS message catalog | 32767 + |
| NL_SETMAX | Max set number in an NLS message catalog | 255 + |
| NL_TEXTMAX | Max number of bytes in an NLS message string | 8192 + |
| NGROUPS_MAX | Max number of supplementary groups per process | 20 + |
| OPEN_MAX | Max number of files a process can have open | 60 +* |
| PASS_MAX | Max number of chars in a password | 8 + |
| PATH_MAX | Max number of characters in a path name excluding the null terminator | 1023 +* |
| PID_MAX | Max value for a process ID | 30000 + |
| PIPE_BUF | Max number of bytes atomic in write to a pipe | 8192 +* |
| PIPE_MAX | Max number of bytes writable to a pipe in one write | INT_MAX + |
| PROC_MAX | Max number of simultaneous processes on system | 84 +−* |
| SCHAR_MAX | Max integer value of a signed char | 127 = |
| SCHAR_MIN | Min integer value of a signed char | -128 = |
| SHRT_MAX | Max decimal value of a short | 32767 + |
| SHRT_MIN | Min decimal value of a short | −32768 − |
| STD_BLK | Number of bytes in a physical I/O block | 512 + |
| SYSPID_MAX | Max process ID of system processes | 4 +−* |
| SYS_NMLN | Length of strings returned by uname(2) | 8 +* |
| SYS_OPEN | Max number of files open on system | 120 +−* |
| TMP_MAX | Max number of unique names generated by tmpnam(3S) | 17576 + |
| UCHAR_MAX | Max integer value of an unsigned char | 255 = |
| UID_MAX | Smallest unattainable value for a user or group ID | 60000 + |
| UINT_MAX | Max decimal value of an unsigned int | 4294967295 + |
| ULONG_MAX | Max decimal value of an unsigned long | 4294967295 + |
| USHRT_MAX | Max decimal value of an unsigned short | 65535 + |
| USI_MAX | Max decimal value of an unsigned int | UINT_MAX =* |
| WORD_BIT | Number of bits in a "word" (int) | 32 + |
EXAMPLES
UID_MAX has an HP-UX value of 60000 + , which means that on all HP-UX systems the smallest unattainable value for a user or group ID is at least 60000. A particular system might be capable of supporting more than 60000 user or group IDs, in which case its <limits.h> file sets UID_MAX to a higher value; however, any application assuming such a higher value is not guaranteed to be portable to all HP-UX systems.
AUTHOR
limits was developed by HP.
SEE ALSO
exec(2), fcntl(2), fork(2), getgroups(2), link(2), lockf(2), open(2), pathconf(2), sysconf(2), uname(2), write(2), printf(3S), scanf(3S), tmpnam(3S), passwd(4), values(5), termio(7).
Series 300/400 and 700
config(1M).
Series 800
uxgen(1M).
STANDARDS CONFORMANCE
<limits.h>: AES, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, POSIX.2, ANSI C
Hewlett-Packard Company — HP-UX Release 9.10: April 1995