1limits.h(0P)               POSIX Programmer's Manual              limits.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       limits.h — implementation-defined constants
13

SYNOPSIS

15       #include <limits.h>
16

DESCRIPTION

18       Some of the functionality described on this reference page extends  the
19       ISO C  standard. Applications shall define the appropriate feature test
20       macro (see the System Interfaces volume of POSIX.1‐2017,  Section  2.2,
21       The  Compilation Environment) to enable the visibility of these symbols
22       in this header.
23
24       Many  of  the  symbols   listed   here   are   not   defined   by   the
25       ISO/IEC 9899:1999  standard.  Such  symbols are not shown as CX shaded,
26       except under the heading ``Numerical Limits''.
27
28       The <limits.h> header shall define macros and  symbolic  constants  for
29       various  limits.   Different  categories of limits are described below,
30       representing  various  limits  on  resources  that  the  implementation
31       imposes  on applications.  All macros and symbolic constants defined in
32       this header shall be suitable for use in #if preprocessing directives.
33
34       Implementations may choose any appropriate value for each  limit,  pro‐
35       vided  it  is  not  more restrictive than the Minimum Acceptable Values
36       listed below. Symbolic constant names  beginning  with  _POSIX  may  be
37       found in <unistd.h>.
38
39       Applications  should  not  assume  any particular value for a limit. To
40       achieve maximum portability, an application  should  not  require  more
41       resource than the Minimum Acceptable Value quantity. However, an appli‐
42       cation wishing to avail itself of the full amount of a resource  avail‐
43       able on an implementation may make use of the value given in <limits.h>
44       on that particular implementation, by using  the  macros  and  symbolic
45       constants  listed  below. It should be noted, however, that many of the
46       listed limits are not invariant, and at runtime, the value of the limit
47       may differ from those given in this header, for the following reasons:
48
49        *  The limit is pathname-dependent.
50
51        *  The limit differs between the compile and runtime machines.
52
53       For  these reasons, an application may use the fpathconf(), pathconf(),
54       and sysconf() functions to determine the actual value  of  a  limit  at
55       runtime.
56
57       The items in the list ending in _MIN give the most negative values that
58       the mathematical types are guaranteed to be  capable  of  representing.
59       Numbers  of  a more negative value may be supported on some implementa‐
60       tions, as indicated by the <limits.h> header on the implementation, but
61       applications  requiring  such numbers are not guaranteed to be portable
62       to all implementations. For positive constants  ending  in  _MIN,  this
63       indicates the minimum acceptable value.
64
65   Runtime Invariant Values (Possibly Indeterminate)
66       A  definition  of  one  of the symbolic constants in the following list
67       shall be omitted from <limits.h> on specific implementations where  the
68       corresponding value is equal to or greater than the stated minimum, but
69       is unspecified.
70
71       This indetermination might depend on the  amount  of  available  memory
72       space  on  a specific instance of a specific implementation. The actual
73       value supported by  a  specific  instance  shall  be  provided  by  the
74       sysconf() function.
75
76       {AIO_LISTIO_MAX}
77             Maximum  number  of I/O operations in a single list I/O call sup‐
78             ported by the implementation.
79             Minimum Acceptable Value: {_POSIX_AIO_LISTIO_MAX}
80
81       {AIO_MAX}
82             Maximum number of outstanding asynchronous  I/O  operations  sup‐
83             ported by the implementation.
84             Minimum Acceptable Value: {_POSIX_AIO_MAX}
85
86       {AIO_PRIO_DELTA_MAX}
87             The  maximum amount by which a process can decrease its asynchro‐
88             nous I/O priority level from its own scheduling priority.
89             Minimum Acceptable Value: 0
90
91       {ARG_MAX}
92             Maximum length of argument to the exec functions including  envi‐
93             ronment data.
94             Minimum Acceptable Value: {_POSIX_ARG_MAX}
95
96       {ATEXIT_MAX}
97             Maximum number of functions that may be registered with atexit().
98             Minimum Acceptable Value: 32
99
100       {CHILD_MAX}
101             Maximum number of simultaneous processes per real user ID.
102             Minimum Acceptable Value: {_POSIX_CHILD_MAX}
103
104       {DELAYTIMER_MAX}
105             Maximum number of timer expiration overruns.
106             Minimum Acceptable Value: {_POSIX_DELAYTIMER_MAX}
107
108       {HOST_NAME_MAX}
109             Maximum  length  of  a  host  name (not including the terminating
110             null) as returned from the gethostname() function.
111             Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}
112
113       {IOV_MAX}
114             Maximum number of iovec structures that one process has available
115             for use with readv() or writev().
116             Minimum Acceptable Value: {_XOPEN_IOV_MAX}
117
118       {LOGIN_NAME_MAX}
119             Maximum length of a login name.
120             Minimum Acceptable Value: {_POSIX_LOGIN_NAME_MAX}
121
122       {MQ_OPEN_MAX}
123             The  maximum  number  of open message queue descriptors a process
124             may hold.
125             Minimum Acceptable Value: {_POSIX_MQ_OPEN_MAX}
126
127       {MQ_PRIO_MAX}
128             The maximum number of message priorities supported by the  imple‐
129             mentation.
130             Minimum Acceptable Value: {_POSIX_MQ_PRIO_MAX}
131
132       {OPEN_MAX}
133             A  value  one  greater than the maximum value that the system may
134             assign to a newly-created file descriptor.
135             Minimum Acceptable Value: {_POSIX_OPEN_MAX}
136
137       {PAGESIZE}
138             Size in bytes of a page.
139             Minimum Acceptable Value: 1
140
141       {PAGE_SIZE}
142             Equivalent to {PAGESIZE}.  If either {PAGESIZE} or {PAGE_SIZE} is
143             defined, the other is defined with the same value.
144
145       {PTHREAD_DESTRUCTOR_ITERATIONS}
146             Maximum number of attempts made to destroy a thread's thread-spe‐
147             cific data values on thread exit.
148             Minimum Acceptable Value: {_POSIX_THREAD_DESTRUCTOR_ITERATIONS}
149
150       {PTHREAD_KEYS_MAX}
151             Maximum number of data keys that can be created by a process.
152             Minimum Acceptable Value: {_POSIX_THREAD_KEYS_MAX}
153
154       {PTHREAD_STACK_MIN}
155             Minimum size in bytes of thread stack storage.
156             Minimum Acceptable Value: 0
157
158       {PTHREAD_THREADS_MAX}
159             Maximum number of threads that can be created per process.
160             Minimum Acceptable Value: {_POSIX_THREAD_THREADS_MAX}
161
162       {RTSIG_MAX}
163             Maximum number of realtime signals reserved for  application  use
164             in this implementation.
165             Minimum Acceptable Value: {_POSIX_RTSIG_MAX}
166
167       {SEM_NSEMS_MAX}
168             Maximum number of semaphores that a process may have.
169             Minimum Acceptable Value: {_POSIX_SEM_NSEMS_MAX}
170
171       {SEM_VALUE_MAX}
172             The maximum value a semaphore may have.
173             Minimum Acceptable Value: {_POSIX_SEM_VALUE_MAX}
174
175       {SIGQUEUE_MAX}
176             Maximum number of queued signals that a process may send and have
177             pending at the receiver(s) at any time.
178             Minimum Acceptable Value: {_POSIX_SIGQUEUE_MAX}
179
180       {SS_REPL_MAX}
181             The maximum number of replenishment operations that may be simul‐
182             taneously pending for a particular sporadic server scheduler.
183             Minimum Acceptable Value: {_POSIX_SS_REPL_MAX}
184
185       {STREAM_MAX}
186             Maximum  number  of streams that one process can have open at one
187             time.  If defined, it has the  same  value  as  {FOPEN_MAX}  (see
188             <stdio.h>).
189             Minimum Acceptable Value: {_POSIX_STREAM_MAX}
190
191       {SYMLOOP_MAX}
192             Maximum  number  of symbolic links that can be reliably traversed
193             in the resolution of a pathname in the absence of a loop.
194             Minimum Acceptable Value: {_POSIX_SYMLOOP_MAX}
195
196       {TIMER_MAX}
197             Maximum number of timers per process supported by the implementa‐
198             tion.
199             Minimum Acceptable Value: {_POSIX_TIMER_MAX}
200
201       {TRACE_EVENT_NAME_MAX}
202             Maximum  length of the trace event name (not including the termi‐
203             nating null).
204             Minimum Acceptable Value: {_POSIX_TRACE_EVENT_NAME_MAX}
205
206       {TRACE_NAME_MAX}
207             Maximum length of the trace generation version string or  of  the
208             trace stream name (not including the terminating null).
209             Minimum Acceptable Value: {_POSIX_TRACE_NAME_MAX}
210
211       {TRACE_SYS_MAX}
212             Maximum  number of trace streams that may simultaneously exist in
213             the system.
214             Minimum Acceptable Value: {_POSIX_TRACE_SYS_MAX}
215
216       {TRACE_USER_EVENT_MAX}
217             Maximum number of user trace  event  type  identifiers  that  may
218             simultaneously  exist  in  a traced process, including the prede‐
219             fined user trace event POSIX_TRACE_UNNAMED_USER_EVENT.
220             Minimum Acceptable Value: {_POSIX_TRACE_USER_EVENT_MAX}
221
222       {TTY_NAME_MAX}
223             Maximum length of terminal device name.
224             Minimum Acceptable Value: {_POSIX_TTY_NAME_MAX}
225
226       {TZNAME_MAX}
227             Maximum number of bytes supported for the name of a timezone (not
228             of the TZ variable).
229             Minimum Acceptable Value: {_POSIX_TZNAME_MAX}
230
231       Note:     The length given by {TZNAME_MAX} does not include the quoting
232                 characters mentioned in Section 8.3, Other Environment  Vari‐
233                 ables.
234
235   Pathname Variable Values
236       The values in the following list may be constants within an implementa‐
237       tion or may vary from one pathname to another. For example,  file  sys‐
238       tems or directories may have different characteristics.
239
240       A  definition  of  one  of the symbolic constants in the following list
241       shall be omitted from the <limits.h> header on specific implementations
242       where  the  corresponding  value is equal to or greater than the stated
243       minimum, but where the value can vary depending on the file to which it
244       is applied. The actual value supported for a specific pathname shall be
245       provided by the pathconf() function.
246
247       {FILESIZEBITS}
248             Minimum number of bits needed to represent, as a  signed  integer
249             value,  the  maximum size of a regular file allowed in the speci‐
250             fied directory.
251             Minimum Acceptable Value: 32
252
253       {LINK_MAX}
254             Maximum number of links to a single file.
255             Minimum Acceptable Value: {_POSIX_LINK_MAX}
256
257       {MAX_CANON}
258             Maximum number of bytes in a terminal canonical input line.
259             Minimum Acceptable Value: {_POSIX_MAX_CANON}
260
261       {MAX_INPUT}
262             Minimum number of bytes for which space is available in a  termi‐
263             nal  input  queue;  therefore, the maximum number of bytes a con‐
264             forming application may require to be typed as input before read‐
265             ing them.
266             Minimum Acceptable Value: {_POSIX_MAX_INPUT}
267
268       {NAME_MAX}
269             Maximum  number  of bytes in a filename (not including the termi‐
270             nating null of a filename string).
271             Minimum Acceptable Value: {_POSIX_NAME_MAX}
272             Minimum Acceptable Value: {_XOPEN_NAME_MAX}
273
274       {PATH_MAX}
275             Maximum number of bytes the implementation will store as a  path‐
276             name in a user-supplied buffer of unspecified size, including the
277             terminating null character.  Minimum  number  the  implementation
278             will accept as the maximum number of bytes in a pathname.
279             Minimum Acceptable Value: {_POSIX_PATH_MAX}
280             Minimum Acceptable Value: {_XOPEN_PATH_MAX}
281
282       {PIPE_BUF}
283             Maximum  number  of  bytes  that  is guaranteed to be atomic when
284             writing to a pipe.
285             Minimum Acceptable Value: {_POSIX_PIPE_BUF}
286
287       {POSIX_ALLOC_SIZE_MIN}
288             Minimum number of bytes of storage  actually  allocated  for  any
289             portion of a file.
290             Minimum Acceptable Value: Not specified.
291
292       {POSIX_REC_INCR_XFER_SIZE}
293             Recommended   increment  for  file  transfer  sizes  between  the
294             {POSIX_REC_MIN_XFER_SIZE} and {POSIX_REC_MAX_XFER_SIZE} values.
295             Minimum Acceptable Value: Not specified.
296
297       {POSIX_REC_MAX_XFER_SIZE}
298             Maximum recommended file transfer size.
299             Minimum Acceptable Value: Not specified.
300
301       {POSIX_REC_MIN_XFER_SIZE}
302             Minimum recommended file transfer size.
303             Minimum Acceptable Value: Not specified.
304
305       {POSIX_REC_XFER_ALIGN}
306             Recommended file transfer buffer alignment.
307             Minimum Acceptable Value: Not specified.
308
309       {SYMLINK_MAX}
310             Maximum number of bytes in a symbolic link.
311             Minimum Acceptable Value: {_POSIX_SYMLINK_MAX}
312
313   Runtime Increasable Values
314       The magnitude limitations in the following list shall be fixed by  spe‐
315       cific  implementations.  An application should assume that the value of
316       the symbolic constant defined by <limits.h> in a  specific  implementa‐
317       tion is the minimum that pertains whenever the application is run under
318       that implementation. A specific instance of a  specific  implementation
319       may increase the value relative to that supplied by <limits.h> for that
320       implementation. The actual value supported by a specific instance shall
321       be provided by the sysconf() function.
322
323       {BC_BASE_MAX}
324             Maximum obase values allowed by the bc utility.
325             Minimum Acceptable Value: {_POSIX2_BC_BASE_MAX}
326
327       {BC_DIM_MAX}
328             Maximum  number of elements permitted in an array by the bc util‐
329             ity.
330             Minimum Acceptable Value: {_POSIX2_BC_DIM_MAX}
331
332       {BC_SCALE_MAX}
333             Maximum scale value allowed by the bc utility.
334             Minimum Acceptable Value: {_POSIX2_BC_SCALE_MAX}
335
336       {BC_STRING_MAX}
337             Maximum length of a string constant accepted by the bc utility.
338             Minimum Acceptable Value: {_POSIX2_BC_STRING_MAX}
339
340       {CHARCLASS_NAME_MAX}
341             Maximum number of bytes in a character class name.
342             Minimum Acceptable Value: {_POSIX2_CHARCLASS_NAME_MAX}
343
344       {COLL_WEIGHTS_MAX}
345             Maximum number of weights that can be assigned to an entry of the
346             LC_COLLATE order keyword in the locale definition file; see Chap‐
347             ter 7, Locale.
348             Minimum Acceptable Value: {_POSIX2_COLL_WEIGHTS_MAX}
349
350       {EXPR_NEST_MAX}
351             Maximum number of expressions that can be nested within parenthe‐
352             ses by the expr utility.
353             Minimum Acceptable Value: {_POSIX2_EXPR_NEST_MAX}
354
355       {LINE_MAX}
356             Unless  otherwise noted, the maximum length, in bytes, of a util‐
357             ity's input line (either standard input or  another  file),  when
358             the  utility  is  described  as processing text files. The length
359             includes room for the trailing <newline>.
360             Minimum Acceptable Value: {_POSIX2_LINE_MAX}
361
362       {NGROUPS_MAX}
363             Maximum  number  of  simultaneous  supplementary  group  IDs  per
364             process.
365             Minimum Acceptable Value: {_POSIX_NGROUPS_MAX}
366
367       {RE_DUP_MAX}
368             Maximum  number  of repeated occurrences of a BRE or ERE interval
369             expression; see Section 9.3.6, BREs Matching Multiple  Characters
370             and Section 9.4.6, EREs Matching Multiple Characters.
371             Minimum Acceptable Value: {_POSIX_RE_DUP_MAX}
372
373   Maximum Values
374       The  <limits.h>  header  shall  define the following symbolic constants
375       with the values shown. These are the most restrictive values  for  cer‐
376       tain  features  on an implementation. A conforming implementation shall
377       provide values no larger than these values.  A  conforming  application
378       must not require a smaller value for correct operation.
379
380       {_POSIX_CLOCKRES_MIN}
381             The resolution of the CLOCK_REALTIME clock, in nanoseconds.
382             Value: 20 000 000
383
384             If the Monotonic Clock option is supported, the resolution of the
385             CLOCK_MONOTONIC  clock,  in  nanoseconds,   is   represented   by
386             {_POSIX_CLOCKRES_MIN}.
387
388   Minimum Values
389       The  <limits.h>  header  shall  define the following symbolic constants
390       with the values shown. These are the most restrictive values  for  cer‐
391       tain  features  on  an  implementation  conforming  to  this  volume of
392       POSIX.1‐2017. Related symbolic constants are defined elsewhere in  this
393       volume  of  POSIX.1‐2017  which  reflect  the actual implementation and
394       which need not be as restrictive. For each of these limits, a  conform‐
395       ing  implementation  shall provide a value at least this large or shall
396       have no limit. A strictly conforming application  must  not  require  a
397       larger value for correct operation.
398
399       {_POSIX_AIO_LISTIO_MAX}
400             The  number of I/O operations that can be specified in a list I/O
401             call.
402             Value: 2
403
404       {_POSIX_AIO_MAX}
405             The number of outstanding asynchronous I/O operations.
406             Value: 1
407
408       {_POSIX_ARG_MAX}
409             Maximum length of argument to the exec functions including  envi‐
410             ronment data.
411             Value: 4 096
412
413       {_POSIX_CHILD_MAX}
414             Maximum number of simultaneous processes per real user ID.
415             Value: 25
416
417       {_POSIX_DELAYTIMER_MAX}
418             The number of timer expiration overruns.
419             Value: 32
420
421       {_POSIX_HOST_NAME_MAX}
422             Maximum  length  of  a  host  name (not including the terminating
423             null) as returned from the gethostname() function.
424             Value: 255
425
426       {_POSIX_LINK_MAX}
427             Maximum number of links to a single file.
428             Value: 8
429
430       {_POSIX_LOGIN_NAME_MAX}
431             The size of the storage required  for  a  login  name,  in  bytes
432             (including the terminating null).
433             Value: 9
434
435       {_POSIX_MAX_CANON}
436             Maximum number of bytes in a terminal canonical input queue.
437             Value: 255
438
439       {_POSIX_MAX_INPUT}
440             Maximum number of bytes allowed in a terminal input queue.
441             Value: 255
442
443       {_POSIX_MQ_OPEN_MAX}
444             The  number  of  message  queues  that  can  be open for a single
445             process.
446             Value: 8
447
448       {_POSIX_MQ_PRIO_MAX}
449             The maximum number of message priorities supported by the  imple‐
450             mentation.
451             Value: 32
452
453       {_POSIX_NAME_MAX}
454             Maximum  number  of bytes in a filename (not including the termi‐
455             nating null of a filename string).
456             Value: 14
457
458       {_POSIX_NGROUPS_MAX}
459             Maximum  number  of  simultaneous  supplementary  group  IDs  per
460             process.
461             Value: 8
462
463       {_POSIX_OPEN_MAX}
464             A  value  one  greater than the maximum value that the system may
465             assign to a newly-created file descriptor.
466             Value: 20
467
468       {_POSIX_PATH_MAX}
469             Minimum number the implementation will accept as the maximum num‐
470             ber of bytes in a pathname.
471             Value: 256
472
473       {_POSIX_PIPE_BUF}
474             Maximum  number  of  bytes  that  is guaranteed to be atomic when
475             writing to a pipe.
476             Value: 512
477
478       {_POSIX_RE_DUP_MAX}
479             Maximum number of repeated occurrences of a BRE or  ERE  interval
480             expression;  see Section 9.3.6, BREs Matching Multiple Characters
481             and Section 9.4.6, EREs Matching Multiple Characters.
482             Value: 255
483
484       {_POSIX_RTSIG_MAX}
485             The number of realtime signal numbers  reserved  for  application
486             use.
487             Value: 8
488
489       {_POSIX_SEM_NSEMS_MAX}
490             The number of semaphores that a process may have.
491             Value: 256
492
493       {_POSIX_SEM_VALUE_MAX}
494             The maximum value a semaphore may have.
495             Value: 32 767
496
497       {_POSIX_SIGQUEUE_MAX}
498             The  number  of  queued  signals that a process may send and have
499             pending at the receiver(s) at any time.
500             Value: 32
501
502       {_POSIX_SSIZE_MAX}
503             The value that can be stored in an object of type ssize_t.
504             Value: 32 767
505
506       {_POSIX_SS_REPL_MAX}
507             The number of replenishment operations that may be simultaneously
508             pending for a particular sporadic server scheduler.
509             Value: 4
510
511       {_POSIX_STREAM_MAX}
512             The number of streams that one process can have open at one time.
513             Value: 8
514
515       {_POSIX_SYMLINK_MAX}
516             The number of bytes in a symbolic link.
517             Value: 255
518
519       {_POSIX_SYMLOOP_MAX}
520             The number of symbolic links that can be traversed in the resolu‐
521             tion of a pathname in the absence of a loop.
522             Value: 8
523
524       {_POSIX_THREAD_DESTRUCTOR_ITERATIONS}
525             The number of attempts made to destroy a thread's thread-specific
526             data values on thread exit.
527             Value: 4
528
529       {_POSIX_THREAD_KEYS_MAX}
530             The number of data keys per process.
531             Value: 128
532
533       {_POSIX_THREAD_THREADS_MAX}
534             The number of threads per process.
535             Value: 64
536
537       {_POSIX_TIMER_MAX}
538             The per-process number of timers.
539             Value: 32
540
541       {_POSIX_TRACE_EVENT_NAME_MAX}
542             The length in bytes of a trace event name (not including the ter‐
543             minating null).
544             Value: 30
545
546       {_POSIX_TRACE_NAME_MAX}
547             The length in bytes of a trace generation  version  string  or  a
548             trace stream name (not including the terminating null).
549             Value: 8
550
551       {_POSIX_TRACE_SYS_MAX}
552             The  number of trace streams that may simultaneously exist in the
553             system.
554             Value: 8
555
556       {_POSIX_TRACE_USER_EVENT_MAX}
557             The number of user trace event type identifiers that may simulta‐
558             neously  exist in a traced process, including the predefined user
559             trace event POSIX_TRACE_UNNAMED_USER_EVENT.
560             Value: 32
561
562       {_POSIX_TTY_NAME_MAX}
563             The size of the storage required for a terminal device  name,  in
564             bytes (including the terminating null).
565             Value: 9
566
567       {_POSIX_TZNAME_MAX}
568             Maximum number of bytes supported for the name of a timezone (not
569             of the TZ variable).
570             Value: 6
571
572             Note:     The  length  given  by  {_POSIX_TZNAME_MAX}  does   not
573                       include  the  quoting  characters  mentioned in Section
574                       8.3, Other Environment Variables.
575
576       {_POSIX2_BC_BASE_MAX}
577             Maximum obase values allowed by the bc utility.
578             Value: 99
579
580       {_POSIX2_BC_DIM_MAX}
581             Maximum number of elements permitted in an array by the bc  util‐
582             ity.
583             Value: 2 048
584
585       {_POSIX2_BC_SCALE_MAX}
586             Maximum scale value allowed by the bc utility.
587             Value: 99
588
589       {_POSIX2_BC_STRING_MAX}
590             Maximum length of a string constant accepted by the bc utility.
591             Value: 1 000
592
593       {_POSIX2_CHARCLASS_NAME_MAX}
594             Maximum number of bytes in a character class name.
595             Value: 14
596
597       {_POSIX2_COLL_WEIGHTS_MAX}
598             Maximum number of weights that can be assigned to an entry of the
599             LC_COLLATE order keyword in the locale definition file; see Chap‐
600             ter 7, Locale.
601             Value: 2
602
603       {_POSIX2_EXPR_NEST_MAX}
604             Maximum number of expressions that can be nested within parenthe‐
605             ses by the expr utility.
606             Value: 32
607
608       {_POSIX2_LINE_MAX}
609             Unless otherwise noted, the maximum length, in bytes, of a  util‐
610             ity's  input  line  (either standard input or another file), when
611             the utility is described as processing  text  files.  The  length
612             includes room for the trailing <newline>.
613             Value: 2 048
614
615       {_POSIX2_RE_DUP_MAX}
616             Maximum  number  of repeated occurrences of a BRE or ERE interval
617             expression; see Section 9.3.6, BREs Matching Multiple  Characters
618             and Section 9.4.6, EREs Matching Multiple Characters.
619             Value: 255
620
621       {_XOPEN_IOV_MAX}
622             Maximum number of iovec structures that one process has available
623             for use with readv() or writev().
624             Value: 16
625
626       {_XOPEN_NAME_MAX}
627             Maximum number of bytes in a filename (not including  the  termi‐
628             nating null of a filename string).
629             Value: 255
630
631       {_XOPEN_PATH_MAX}
632             Minimum number the implementation will accept as the maximum num‐
633             ber of bytes in a pathname.
634             Value: 1024
635
636   Numerical Limits
637       The <limits.h> header shall define the following macros and, except for
638       {CHAR_BIT},  {LONG_BIT},  {MB_LEN_MAX},  and  {WORD_BIT}, they shall be
639       replaced by expressions that have the same type as would an  expression
640       that  is an object of the corresponding type converted according to the
641       integer promotions.
642
643       If the value of an object of type char is treated as a  signed  integer
644       when used in an expression, the value of {CHAR_MIN} is the same as that
645       of {SCHAR_MIN} and the value of {CHAR_MAX}  is  the  same  as  that  of
646       {SCHAR_MAX}.   Otherwise, the value of {CHAR_MIN} is 0 and the value of
647       {CHAR_MAX} is the same as that of {UCHAR_MAX}.
648
649       {CHAR_BIT}
650             Number of bits in a type char.
651             Value: 8
652
653       {CHAR_MAX}
654             Maximum value for an object of type char.
655             Value: {UCHAR_MAX} or {SCHAR_MAX}
656
657       {CHAR_MIN}
658             Minimum value for an object of type char.
659             Value: {SCHAR_MIN} or 0
660
661       {INT_MAX}
662             Maximum value for an object of type int.
663             Minimum Acceptable Value: 2 147 483 647
664
665       {INT_MIN}
666             Minimum value for an object of type int.
667             Maximum Acceptable Value: -2 147 483 647
668
669       {LLONG_MAX}
670             Maximum value for an object of type long long.
671             Minimum Acceptable Value: +9223372036854775807
672
673       {LLONG_MIN}
674             Minimum value for an object of type long long.
675             Maximum Acceptable Value: -9223372036854775807
676
677       {LONG_BIT}
678             Number of bits in an object of type long.
679             Minimum Acceptable Value: 32
680
681       {LONG_MAX}
682             Maximum value for an object of type long.
683             Minimum Acceptable Value: +2 147 483 647
684
685       {LONG_MIN}
686             Minimum value for an object of type long.
687             Maximum Acceptable Value: -2 147 483 647
688
689       {MB_LEN_MAX}
690             Maximum number of bytes in a character, for any supported locale.
691             Minimum Acceptable Value: 1
692
693       {SCHAR_MAX}
694             Maximum value for an object of type signed char.
695             Value: +127
696
697       {SCHAR_MIN}
698             Minimum value for an object of type signed char.
699             Value: -128
700
701       {SHRT_MAX}
702             Maximum value for an object of type short.
703             Minimum Acceptable Value: +32 767
704
705       {SHRT_MIN}
706             Minimum value for an object of type short.
707             Maximum Acceptable Value: -32 767
708
709       {SSIZE_MAX}
710             Maximum value for an object of type ssize_t.
711             Minimum Acceptable Value: {_POSIX_SSIZE_MAX}
712
713       {UCHAR_MAX}
714             Maximum value for an object of type unsigned char.
715             Value: 255
716
717       {UINT_MAX}
718             Maximum value for an object of type unsigned.
719             Minimum Acceptable Value: 4 294 967 295
720
721       {ULLONG_MAX}
722             Maximum value for an object of type unsigned long long.
723             Minimum Acceptable Value: 18446744073709551615
724
725       {ULONG_MAX}
726             Maximum value for an object of type unsigned long.
727             Minimum Acceptable Value: 4 294 967 295
728
729       {USHRT_MAX}
730             Maximum value for an object of type unsigned short.
731             Minimum Acceptable Value: 65 535
732
733       {WORD_BIT}
734             Number of bits in an object of type int.
735             Minimum Acceptable Value: 32
736
737   Other Invariant Values
738       The <limits.h> header shall define the following symbolic constants:
739
740       {NL_ARGMAX}
741             Maximum value of n in conversion specifications using  the  "%n$"
742             sequence  in  calls to the printf() and scanf() families of func‐
743             tions.
744             Minimum Acceptable Value: 9
745
746       {NL_LANGMAX}
747             Maximum number of bytes in a LANG name.
748             Minimum Acceptable Value: 14
749
750       {NL_MSGMAX}
751             Maximum message number.
752             Minimum Acceptable Value: 32 767
753
754       {NL_SETMAX}
755             Maximum set number.
756             Minimum Acceptable Value: 255
757
758       {NL_TEXTMAX}
759             Maximum number of bytes in a message string.
760             Minimum Acceptable Value: {_POSIX2_LINE_MAX}
761
762       {NZERO}
763             Default process priority.
764             Minimum Acceptable Value: 20
765
766       The following sections are informative.
767

APPLICATION USAGE

769       None.
770

RATIONALE

772       A request was made to reduce the value of  {_POSIX_LINK_MAX}  from  the
773       value  of  8  specified  for  it in the POSIX.1‐1990 standard to 2. The
774       standard developers decided to deny this request for several reasons:
775
776        *  They wanted to avoid making any changes to the standard that  could
777           break  conforming applications, and the requested change could have
778           that effect.
779
780        *  The use of multiple hard links to a file cannot always be  replaced
781           with use of symbolic links. Symbolic links are semantically differ‐
782           ent from hard links in that they associate a pathname with  another
783           pathname  rather than a pathname with a file. This has implications
784           for access control, file permanence, and transparency.
785
786        *  The original standard developers had considered the issue of allow‐
787           ing for implementations that did not in general support hard links,
788           and decided that this would reduce consensus on the standard.
789
790       Systems that support historical versions of the development  option  of
791       the  ISO POSIX‐2  standard  retain  the name {_POSIX2_RE_DUP_MAX} as an
792       alias for {_POSIX_RE_DUP_MAX}.
793
794       {PATH_MAX}
795             IEEE PASC Interpretation 1003.1 #15 addressed  the  inconsistency
796             in  the standard with the definition of pathname and the descrip‐
797             tion of {PATH_MAX}, allowing application developers  to  allocate
798             either  {PATH_MAX}  or  {PATH_MAX}+1 bytes. The inconsistency has
799             been removed  by  correction  to  the  {PATH_MAX}  definition  to
800             include  the  null character. With this change, applications that
801             previously allocated {PATH_MAX} bytes will continue to succeed.
802
803       {SYMLINK_MAX}
804             This symbol refers to space for data that is stored in  the  file
805             system,  as  opposed  to {PATH_MAX} which is the length of a name
806             that can be passed to a function. In  some  existing  implementa‐
807             tions,  the  pathnames pointed to by symbolic links are stored in
808             the inodes of the links, so it is  important  that  {SYMLINK_MAX}
809             not be constrained to be as large as {PATH_MAX}.
810

FUTURE DIRECTIONS

812       None.
813

SEE ALSO

815       Chapter 7, Locale, <stdio.h>, <unistd.h>
816
817       The System Interfaces volume of POSIX.1‐2017, Section 2.2, The Compila‐
818       tion Environment, fpathconf(), sysconf()
819
821       Portions of this text are reprinted and reproduced in  electronic  form
822       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
823       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
824       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
825       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
826       event of any discrepancy between this version and the original IEEE and
827       The Open Group Standard, the original IEEE and The Open Group  Standard
828       is  the  referee document. The original Standard can be obtained online
829       at http://www.opengroup.org/unix/online.html .
830
831       Any typographical or formatting errors that appear  in  this  page  are
832       most likely to have been introduced during the conversion of the source
833       files to man page format. To report such errors,  see  https://www.ker
834       nel.org/doc/man-pages/reporting_bugs.html .
835
836
837
838IEEE/The Open Group                  2017                         limits.h(0P)
Impressum