NAME
limits — implementation-specific constants
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 greater than value specified in
<limits.h>
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.
EXAMPLES
UID_MAX
has an HP-UX value of
2147483647 +,
which means that on all HP-UX
systems the smallest unattainable value for a user or group ID
is at least 2147483647.
A particular system might be capable of supporting
more than 2147483647 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.
NGROUPS_MAX
has an HP-UX value of
20 ++,
which means that on all HP-UX
systems the smallest maximum number of supplementary groups per process
is at least 20.
A particular system might be capable of supporting
more than 20 supplementary groups per process,
in which case
sysconf(_SC_NGROUPS_MAX)
will return a larger value than that specified in
<limits.h>;
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).
STANDARDS CONFORMANCE
<limits.h>: AES, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, POSIX.2, ANSI C