LIMITS(4) SysV LIMITS(4)
NAME
limits - header file for implementation-specific constants
SYNOPSIS
#include <limits.h>
DESCRIPTION
The header file limits.h is a list of magnitude limitations imposed by a
specific implementation of the operating system. All values are
specified in decimal.
The following values are defined when compiling using the -A ansi (strict
ANSI) option of the C compiler (see cc(1):
Constant Value Meaning
CHAR_BIT 8 number of bits in a
"char"
CHAR_MAX 127 max integer value
of a "char"
CHAR_MIN -128 min integer value
of a "char"
INT_MAX 2147483647 max decimal value
of an "int"
INT_MIN -2147483648 min decimal value
of an "int"
LONG_MAX 2147483647 max decimal value
of a "long"
LONG_MIN -2147483648 min decimal value
of a "long"
MB_LEN_MAX 4 max number of bytes
in a multibyte
character
SCHAR_MAX 127 max integer value
of a short "char"
SCHAR_MIN -128 min integer value
of a short "char"
SHRT_MAX 32767 max decimal value
of a "short"
SHRT_MIN -32768 min decimal value
of a "short"
UCHAR_MAX 255 max integer value
of an unsigned
"char"
UINT_MAX 4294967295 max decimal value
of an unsigned
"int"
ULONG_MAX 4294967295 max decimal value
of an unsigned
"long"
USHRT_MAX 65535 max decimal value
of an unsigned
"short"
Additionally, the following values are defined when compiling with the
-A xansi (extended ANSI) option of the C compiler (see cc(1), or if
_APOLLO_SOURCE is defined:
Constant Value Meaning
ARG_MAX 10240 max length of
arguments to exec
CHILD_MAX 1016 max number of
processes per user
id
CLK_TCK 60 number of clock
ticks per second
DBL_DIG 15 number digits of
precision for a
double
DBL_MAX 1.79769313486231571E+308 max value of a
double
DBL_MIN 2.2250738585072014E-308 min value of a
double
FCHR_MAX UINT_MAX max size of a file
in bytes
FLT_DIG 6 number digits of
precision for a
float
FLT_MAX 3.40282347E+38 max value of a
float
FLT_MIN 1.17549435E-38 min value of a
float
HUGE_VAL 3.40282347E+38 largest possible
floating point
number (FLT_MAX)
LINK_MAX 65535 max number of links
to a single file
LONG_BIT 32 number of bits in a
"long"
MAX_CANON _POSIX_MAX_CANON see
_POSIX_MAX_CANON
MAX_INPUT _POSIX_MAX_INPUT see
_POSIX_MAX_INPUT
NAME_MAX 255 max number of
characters in a
filename
NGROUPS_MAX 0 max number
simultaneous
supplementary group
ids per process
(runtime
increasable value,
use sysconf(3))
NZERO 20 default process
priority (nice
value)
OPEN_MAX 128 max number of files
a process can have
open
PATH_MAX 1023 max number of
characters in a
pathname
PID_MAX 30000 max value for a
process ID
PIPE_BUF 5120 max number bytes
atomic in write to
a pipe
PIPE_MAX 5120 max number bytes
written to a pipe
in a write
STD_BLK 1024 number bytes in a
physical I/O block
SYS_NMLN 9 number of chars in
uname-returned
strings
TMP_MAX 17576 max number of
unique names
generated by
tmpnam().
UID_MAX 65535 max value for a
user or group ID
USI_MAX UINT_MAX max decimal value
of an "unsigned"
WORD_BIT 32 number of bits in a
"word" or int
_POSIX_ARG_MAX 4096 max length of args
to exec in posix
env
_POSIX_CHILD_MAX 6 max number
processes/user id
in posix env
_POSIX_LINK_MAX 8 max number links to
a file in posix env
_POSIX_MAX_CANON 255 max number of bytes
in a terminal
canonical (cooked
mode) input line in
posix env
_POSIX_MAX_INPUT 255 min number of bytes
for which space is
available in a
terminal input
queue; therefore,
the max number of
bytes an
application can
require before
reading them
_POSIX_NAME_MAX 14 max number of
characters in a
filename in posix
env
_POSIX_NGROUPS_MAX 0 max number
simultaneous
supplementary group
ids per process in
posix env (runtime
increasable value,
use sysconf(3))
_POSIX_OPEN_MAX 16 max number of files
a process can have
open in posix env
_POSIX_PATH_MAX 255 max number of
characters in a
pathname in posix
env
_POSIX_PIPE_BUF 512 max number bytes
written to a pipe
in a write in posix
env
NOTES
Some values, previously included in limits.h, or currently defined in
limits.h only when using -A xansi, are defined in math.h, float.h, or
time.h for ANSI C compliance.
FILES
/usr/include/limits.h
SEE ALSO
cc(1), float(4), math(4), time(4).