posix1_lim.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /* Copyright (C) 1991-1993,96,98,2000-2003,2004 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. /*
  16. * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h>
  17. *
  18. * Never include this file directly; use <limits.h> instead.
  19. */
  20. #ifndef _BITS_POSIX1_LIM_H
  21. #define _BITS_POSIX1_LIM_H 1
  22. /* These are the standard-mandated minimum values. */
  23. /* Minimum number of operations in one list I/O call. */
  24. #define _POSIX_AIO_LISTIO_MAX 2
  25. /* Minimal number of outstanding asynchronous I/O operations. */
  26. #define _POSIX_AIO_MAX 1
  27. /* Maximum length of arguments to `execve', including environment. */
  28. #define _POSIX_ARG_MAX 4096
  29. /* Maximum simultaneous processes per real user ID. */
  30. #ifdef __USE_XOPEN2K
  31. # define _POSIX_CHILD_MAX 25
  32. #else
  33. # define _POSIX_CHILD_MAX 6
  34. #endif
  35. /* Minimal number of timer expiration overruns. */
  36. #define _POSIX_DELAYTIMER_MAX 32
  37. /* Maximum length of a host name (not including the terminating null)
  38. as returned from the GETHOSTNAME function. */
  39. #define _POSIX_HOST_NAME_MAX 255
  40. /* Maximum link count of a file. */
  41. #define _POSIX_LINK_MAX 8
  42. /* Maximum length of login name. */
  43. #define _POSIX_LOGIN_NAME_MAX 9
  44. /* Number of bytes in a terminal canonical input queue. */
  45. #define _POSIX_MAX_CANON 255
  46. /* Number of bytes for which space will be
  47. available in a terminal input queue. */
  48. #define _POSIX_MAX_INPUT 255
  49. /* Maximum number of message queues open for a process. */
  50. #define _POSIX_MQ_OPEN_MAX 8
  51. /* Maximum number of supported message priorities. */
  52. #define _POSIX_MQ_PRIO_MAX 32
  53. /* Number of bytes in a filename. */
  54. #define _POSIX_NAME_MAX 14
  55. /* Number of simultaneous supplementary group IDs per process. */
  56. #ifdef __USE_XOPEN2K
  57. # define _POSIX_NGROUPS_MAX 8
  58. #else
  59. # define _POSIX_NGROUPS_MAX 0
  60. #endif
  61. /* Number of files one process can have open at once. */
  62. #ifdef __USE_XOPEN2K
  63. # define _POSIX_OPEN_MAX 20
  64. #else
  65. # define _POSIX_OPEN_MAX 16
  66. #endif
  67. #if !defined __USE_XOPEN2K || defined __USE_GNU
  68. /* Number of descriptors that a process may examine with `pselect' or
  69. `select'. */
  70. # define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
  71. #endif
  72. /* Number of bytes in a pathname. */
  73. #define _POSIX_PATH_MAX 256
  74. /* Number of bytes than can be written atomically to a pipe. */
  75. #define _POSIX_PIPE_BUF 512
  76. /* The number of repeated occurrences of a BRE permitted by the
  77. REGEXEC and REGCOMP functions when using the interval notation. */
  78. #define _POSIX_RE_DUP_MAX 255
  79. /* Minimal number of realtime signals reserved for the application. */
  80. #define _POSIX_RTSIG_MAX 8
  81. /* Number of semaphores a process can have. */
  82. #define _POSIX_SEM_NSEMS_MAX 256
  83. /* Maximal value of a semaphore. */
  84. #define _POSIX_SEM_VALUE_MAX 32767
  85. /* Number of pending realtime signals. */
  86. #define _POSIX_SIGQUEUE_MAX 32
  87. /* Largest value of a `ssize_t'. */
  88. #define _POSIX_SSIZE_MAX 32767
  89. /* Number of streams a process can have open at once. */
  90. #define _POSIX_STREAM_MAX 8
  91. /* The number of bytes in a symbolic link. */
  92. #define _POSIX_SYMLINK_MAX 255
  93. /* The number of symbolic links that can be traversed in the
  94. resolution of a pathname in the absence of a loop. */
  95. #define _POSIX_SYMLOOP_MAX 8
  96. /* Number of timer for a process. */
  97. #define _POSIX_TIMER_MAX 32
  98. /* Maximum number of characters in a tty name. */
  99. #define _POSIX_TTY_NAME_MAX 9
  100. /* Maximum length of a timezone name (element of `tzname'). */
  101. #define _POSIX_TZNAME_MAX 6
  102. #if !defined __USE_XOPEN2K || defined __USE_GNU
  103. /* Maximum number of connections that can be queued on a socket. */
  104. # define _POSIX_QLIMIT 1
  105. /* Maximum number of bytes that can be buffered on a socket for send
  106. or receive. */
  107. # define _POSIX_HIWAT _POSIX_PIPE_BUF
  108. /* Maximum number of elements in an `iovec' array. */
  109. # define _POSIX_UIO_MAXIOV 16
  110. #endif
  111. /* Maximum clock resolution in nanoseconds. */
  112. #define _POSIX_CLOCKRES_MIN 20000000
  113. /* Get the implementation-specific values for the above. */
  114. #include <bits/local_lim.h>
  115. #ifndef SSIZE_MAX
  116. # define SSIZE_MAX LONG_MAX
  117. #endif
  118. /* This value is a guaranteed minimum maximum.
  119. The current maximum can be got from `sysconf'. */
  120. #ifndef NGROUPS_MAX
  121. # define NGROUPS_MAX 8
  122. #endif
  123. #endif /* bits/posix1_lim.h */