Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > L

limits(5)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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 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.

ConstantDescriptionHP-UX ValueSym
ARG_MAXMax length of arguments to exec(2) in bytes, including environment data5120+*
CHAR_BITNumber of bits in a char8=
CHAR_MAXMax integer value of a char127=
CHAR_MINMin integer value of a char-128=
CHILD_MAXMax number of simultaneous processes per user ID25+-*
CLK_TCKNumber of clock ticks per second50+#
DBL_DIGDigits of precision of a double15+
DBL_MAXMax positive value of a double1.7976931348623157e+308+
DBL_MINMin positive value of a double4.94065645841246544e-324-
FCHR_MAXMax file offset in bytesINT_MAX+-*
FLT_DIGDigits of precision of a float6+
FLT_MAXMax positive value of a float3.40282346638528860e+38+
FLT_MINMin positive value of a float1.40129846432481707e-45-
INT_MAXMax decimal value of an int2147483647+
INT_MINMin decimal value of an int-2147483648-
LINE_MAXMax number of characters in a single line2048=
LINK_MAXMax number of links to a single file32767+*
LOCK_MAXMax number of entries in system lock table32+-*
LONG_BITNumber of bits in a long32+
LONG_MAXMax decimal value of a long2147483647+
LONG_MINMin decimal value of a long-2147483648-
MAX_CANONMax number of bytes in terminal canonical input line512+*
MAX_CHARMax number of bytes in terminal input queueMAX_INPUT=*
MAX_INPUTMax number of bytes in terminal input queue512+*
NAME_MAXMax number of bytes in a path name component14+*
NL_ARGMAXMax value of "digits" in calls to the NLS printf(3S) and scanf(3S) functions9=
NL_MSGMAXMax message number in an NLS message catalog32767+
NL_SETMAXMax set number in an NLS message catalog255+
NL_TEXTMAXMax number of bytes in an NLS message string8192+
NGROUPS_MAXMax number of supplementary groups per process20++
OPEN_MAXMax number of files a process can have open60+*
PASS_MAXMax number of chars in a password8+
PATH_MAXMax number of characters in a path name excluding the null terminator1023+*
PID_MAXMax value for a process ID30000+
PIPE_BUFMax number of bytes atomic in write to a pipe8192+*
PIPE_MAXMax number of bytes writable to a pipe in one writeINT_MAX+
PROC_MAXMax number of simultaneous processes on system84+-*
SCHAR_MAXMax integer value of a signed char127=
SCHAR_MINMin integer value of a signed char-128=
SHRT_MAXMax decimal value of a short32767+
SHRT_MINMin decimal value of a short-32768-
STD_BLKNumber of bytes in a physical I/O block512+
SYSPID_MAXMax process ID of system processes4+-*
SYS_NMLNLength of strings returned by uname(2)8+*
SYS_OPENMax number of files open on system120+-*
TMP_MAXMax number of unique names generated by tmpnam(3S)17576+
UCHAR_MAXMax integer value of an unsigned char255=
UID_MAXSmallest unattainable value for a user or group ID2147483647+
UINT_MAXMax decimal value of an unsigned int4294967295+
ULONG_MAXMax decimal value of an unsigned long4294967295+
USHRT_MAXMax decimal value of an unsigned short65535+
USI_MAXMax decimal value of an unsigned intUINT_MAX=*
WORD_BITNumber of bits in a "word" (int)32+

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.

STANDARDS CONFORMANCE

<limits.h>: AES, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, POSIX.2, ANSI C

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.