Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ limits.h(4) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pathconf, fpathconf

sysconf



LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



-------------------------------------------------------------------------------
limits.h



PURPOSE

Defines implementation specific constants.

SYNOPSIS

#include <limits.h>

DESCRIPTION

This header file defines different categories of names which represent various
limits on resources imposed by the system on applications.

For maximum portability, an application should not require more resources than
the quantity listed in the "Minimum Acceptable Value" column.  An application
can have the full amount of a resource available on an implementation by making
use of the value given in limits.h on that particular system, using the
symbolic names listed in the first column of the table.

Because the value of a limit on a particular system may differ from those
listed in this header file, an application may use the pathconf and sysconf
functions to determine the actual value of a limit at run-time.




























Processed November 7, 1990       LIMITS.H(4,F)                                1





LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



The following constants are defined in limits.h:

+------------+------------------------+---------------+
| CHAR_BIT   | Number of bits in a    | 8             |
|            | char                   |               |
+------------+------------------------+---------------+
| CHAR_MIN   | Min integer value of a | 0             |
|            | char                   |               |
+------------+------------------------+---------------+
| CHAR_MAX   | Max integer value of a | +255          |
|            | char                   |               |
+------------+------------------------+---------------+
| UCHAR_MAX  | Max value of an        | +255          |
|            | unsigned char          |               |
+------------+------------------------+---------------+
| SCHAR_MIN  | Min value of a signed  | -128          |
|            | char                   |               |
+------------+------------------------+---------------+
| SCHAR_MAX  | Max value of a signed  | +127          |
|            | char                   |               |
+------------+------------------------+---------------+
| INT_MIN    | Min decimal value of   | -2147483648   |
|            | an int                 |               |
+------------+------------------------+---------------+
| INT_MAX    | Max decimal value of   | +2147483647   |
|            | an int                 |               |
+------------+------------------------+---------------+
| UINT_MAX   | Max value of an        | +4294967295   |
|            | unsigned int           |               |
+------------+------------------------+---------------+
| LONG_MIN   | Min decimal value of a | -2147483648   |
|            | long                   |               |
+------------+------------------------+---------------+
| LONG_MAX   | Max decimal value of a | +2147483647   |
|            | long                   |               |
+------------+------------------------+---------------+
| ULONG_MAX  | Max value of an        | +4294967295   |
|            | unsigned long int      |               |
+------------+------------------------+---------------+
| SHRT_MIN   | Min decimal value of a | -32768        |
|            | short                  |               |
+------------+------------------------+---------------+
| SHRT_MAX   | Max decimal value of a | +32767        |
|            | short                  |               |
+------------+------------------------+---------------+
| USHRT_MAX  | Max value for an       |               |
|            | unsigned short         |               |
+------------+------------------------+---------------+
|            | int                    | +65535        |
+------------+------------------------+---------------+





Processed November 7, 1990       LIMITS.H(4,F)                                2





LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



pathconf specific constants:

+-----------+---------------------------+---------+
|LINK_MAX   | Max number of links to a  | 32767   |
|           | single file               |         |
+-----------+---------------------------+---------+
|MAX_INPUT  | Max number of bytes       |         |
|           | allowed in a              |         |
+-----------+---------------------------+---------+
|           | terminal input queue      | 255     |
+-----------+---------------------------+---------+
|MAX_CANON  | Max number of bytes in a  |         |
|           | terminal                  |         |
+-----------+---------------------------+---------+
|           | canonical input line      | 255     |
+-----------+---------------------------+---------+
|NAME_MAX   | Max number of characters  |         |
|           | in a filename             |         |
+-----------+---------------------------+---------+
|           | (not including            | 255     |
|           | terminating null)         |         |
+-----------+---------------------------+---------+
|PATH_MAX   | Max number of characters  |         |
|           | in a pathname             |         |
+-----------+---------------------------+---------+
|           | (not including            | 1023    |
|           | terminating null)         |         |
+-----------+---------------------------+---------+
|PIPE_BUF   | Max number of bytes that  |         |
|           | is guaranteed             |         |
+-----------+---------------------------+---------+
|           | to be atomic when writing | 40960   |
|           | to a pipe                 |         |
+-----------+---------------------------+---------+





















Processed November 7, 1990       LIMITS.H(4,F)                                3





LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



sysconf specific constants:

+-------------+-----------------------------+------+
|NGROUPS_MAX  | Max number of simultaneous  |      |
|             | supplemen-                  |      |
+-------------+-----------------------------+------+
|             | tary group IDs per process  | 32   |
+-------------+-----------------------------+------+
|OPEN_MAX     | Max number of files that    |      |
|             | one process                 |      |
+-------------+-----------------------------+------+
|             | can have open at any one    | 200  |
|             | time                        |      |
+-------------+-----------------------------+------+
|ARG_MAX      | Max length of argument to   |      |
|             | the exec                    |      |
+-------------+-----------------------------+------+
|             | functions including         | 16384|
|             | environment data            |      |
+-------------+-----------------------------+------+
|CHILD_MAX    | Max number of processes per | 40   |
|             | user ID                     |      |
+-------------+-----------------------------+------+
































Processed November 7, 1990       LIMITS.H(4,F)                                4





LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



POSIX Limit Values:

+------------------+-----------------------+------+
|_POSIX_ARG_MAX    | The length of the     |      |
|                  | argument strings for  |      |
|                  | the exec functions    |      |
+------------------+-----------------------+------+
|                  | in bytes, including   |      |
|                  | environment           |      |
+------------------+-----------------------+------+
|                  | data                  | 4096 |
+------------------+-----------------------+------+
|_POSIX_CHILD_MAX  | The number of         |      |
|                  | simultaneous          |      |
+------------------+-----------------------+------+
|                  | processes per real    | 6    |
|                  | user ID               |      |
+------------------+-----------------------+------+
|_POSIX_LINK_MAX   | The value of a file's |      |
|                  | link                  |      |
+------------------+-----------------------+------+
|                  | count                 | 8    |
+------------------+-----------------------+------+
|_POSIX_MAX_CANON  | The number of bytes   |      |
|                  | in a                  |      |
+------------------+-----------------------+------+
|                  | terminal canonical    | 255  |
|                  | input queue           |      |
+------------------+-----------------------+------+
|_POSIX_MAX_INPUT  | The number of bytes   |      |
|                  | for which             |      |
+------------------+-----------------------+------+
|                  | space will be         |      |
|                  | available in          |      |
+------------------+-----------------------+------+
|                  | a terminal output     | 255  |
|                  | queue                 |      |
+------------------+-----------------------+------+
|_POSIX_NAME_MAX   | The number of bytes   |      |
|                  | in a                  |      |
+------------------+-----------------------+------+
|                  | filename              | 14   |
+------------------+-----------------------+------+
|_POSIX_NGROUPS_MAX| The number of         |      |
|                  | simultaneous          |      |
+------------------+-----------------------+------+
|                  | supplementary group   |      |
|                  | IDs per               |      |
+------------------+-----------------------+------+
|                  | process               | 0    |
+------------------+-----------------------+------+




Processed November 7, 1990       LIMITS.H(4,F)                                5





LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



+------------------+-----------------------+------+
|_POSIX_OPEN_MAX   | The number of files   |      |
|                  | that one              |      |
+------------------+-----------------------+------+
|                  | process can have open |      |
|                  | at                    |      |
+------------------+-----------------------+------+
|                  | one time              | 16   |
+------------------+-----------------------+------+
|_POSIX_PATH_MAX   | The number of bytes   |      |
|                  | in                    |      |
+------------------+-----------------------+------+
|                  | a pathname            | 255  |
+------------------+-----------------------+------+
|_POSIX_PIPE_BUF   | The number of bytes   |      |
|                  | that                  |      |
+------------------+-----------------------+------+
|                  | can be written        |      |
|                  | atomically            |      |
+------------------+-----------------------+------+
|                  | when writing to a     | 512  |
|                  | pipe                  |      |
+------------------+-----------------------+------+

Multibyte character specific constant:

+---------+------------------------------+------+
|MB_LEN_MA|_Max number of bytes in a     |      |
|         | multibyte                    |      |
+---------+------------------------------+------+
|         | character for ANY character  |      |
|         | code                         |      |
+---------+------------------------------+------+
|         | set                          | 4    |
+---------+------------------------------+------+




















Processed November 7, 1990       LIMITS.H(4,F)                                6





LIMITS.H(4,F)               AIX Technical Reference               LIMITS.H(4,F)



Defines for message catalog usage:

+---------+------------------------------+------+
|NL_ARGMAX| Max value of 'digit' in      |      |
|         | calls to                     |      |
+---------+------------------------------+------+
|         | the printf and scanf         | 9    |
|         | subroutines                  |      |
+---------+------------------------------+------+
|NL_MSGMAX| Max message number           | 65535|
+---------+------------------------------+------+
|NL_SETMAX| Max set number               | 65535|
+---------+------------------------------+------+
|NL_TEXTMA| Max number of bytes in a     |      |
|         | message                      |      |
+---------+------------------------------+------+
|         | string                       | 4096 |
+---------+------------------------------+------+


FILE

/usr/include/limits.h

RELATED INFORMATION

In this book:  "pathconf, fpathconf," and  "sysconf."




























Processed November 7, 1990       LIMITS.H(4,F)                                7



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026