HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)
l
limits(5) 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,orbya
#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 sys-
conf(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 sys-
tems, 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
Max length of arguments to exec(2) in bytes,
including environment data
ARG_MAX 5120 +*
Number of bits in a char
CHAR_BIT 8=
Max integer value of a char
CHAR_MAX 127 =
Min integer value of a char
CHAR_MIN -128 =
Max number of simultaneous processes per
user ID
CHILD_MAX 25 +-*
Number of clock ticks per second
CLK_TCK 50 +#
Digits of precision of a double
DBL_DIG 15 +
Max positive value of a double
DBL_MAX 1.7976931348623157e+308
+
Min positive value of a double
DBL_MIN 4.94065645841246544e-324
-
Max file offset in bytes
FCHR_MAX INT_MAX +-*
Digits of precision of a float
FLT_DIG 6+
Max positive value of a float
FLT_MAX 3.40282346638528860e+38
+
Min positive value of a float
FLT_MIN 1.40129846432481707e-45
-
Max decimal value of an int
INT_MAX 2147483647 +
Min decimal value of an int
INT_MIN -2147483648 -
Max number of characters in a single line
LINE_MAX 2048 =
Max number of links to a single file
LINK_MAX 32767 +*
Max number of entries in system lock table
LOCK_MAX 32 +-*
Number of bits in a long
LONG_BIT 32 +
HP-UX 11i Version 2: September 2004 − 1 − Hewlett-Packard Company Section 5−−169