xopen_lim.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* Copyright (C) 1996, 1997, 1999, 2001 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, see
  13. <http://www.gnu.org/licenses/>. */
  14. /*
  15. * Never include this file directly; use <limits.h> instead.
  16. */
  17. /* Additional definitions from X/Open Portability Guide, Issue 4, Version 2
  18. System Interfaces and Headers, 4.16 <limits.h>
  19. Please note only the values which are not greater than the minimum
  20. stated in the standard document are listed. The `sysconf' functions
  21. should be used to obtain the actual value. */
  22. #ifndef _XOPEN_LIM_H
  23. #define _XOPEN_LIM_H 1
  24. #define __need_IOV_MAX
  25. #include <bits/stdio_lim.h>
  26. /* We do not provide fixed values for
  27. ARG_MAX Maximum length of argument to the `exec' function
  28. including environment data.
  29. ATEXIT_MAX Maximum number of functions that may be registered
  30. with `atexit'.
  31. CHILD_MAX Maximum number of simultaneous processes per real
  32. user ID.
  33. OPEN_MAX Maximum number of files that one process can have open
  34. at anyone time.
  35. PAGESIZE
  36. PAGE_SIZE Size of bytes of a page.
  37. PASS_MAX Maximum number of significant bytes in a password.
  38. We only provide a fixed limit for
  39. IOV_MAX Maximum number of `iovec' structures that one process has
  40. available for use with `readv' or writev'.
  41. if this is indeed fixed by the underlying system.
  42. */
  43. /* Maximum number of `iovec' structures that one process has available
  44. for use with `readv' or writev'. */
  45. #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
  46. /* Maximum value of `digit' in calls to the `printf' and `scanf'
  47. functions. Posix dictates this should be a minimum of 9 */
  48. #if !defined(__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__) || (__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ <= 1)
  49. #undef NL_ARGMAX
  50. #elif __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ < 9
  51. #define NL_ARGMAX 9
  52. #else
  53. #define NL_ARGMAX __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__
  54. #endif
  55. /* Maximum number of bytes in a `LANG' name. We have no limit. */
  56. #define NL_LANGMAX _POSIX2_LINE_MAX
  57. /* Maximum message number. We have no limit. */
  58. #define NL_MSGMAX INT_MAX
  59. /* Maximum number of bytes in N-to-1 collation mapping. We have no
  60. limit. */
  61. #define NL_NMAX INT_MAX
  62. /* Maximum set number. We have no limit. */
  63. #define NL_SETMAX INT_MAX
  64. /* Maximum number of bytes in a message. We have no limit. */
  65. #define NL_TEXTMAX INT_MAX
  66. /* Default process priority. */
  67. #define NZERO 20
  68. /* Number of bits in a word of type `int'. */
  69. #ifdef INT_MAX
  70. # if INT_MAX == 32767
  71. # define WORD_BIT 16
  72. # else
  73. # if INT_MAX == 2147483647
  74. # define WORD_BIT 32
  75. # else
  76. /* Safe assumption. */
  77. # define WORD_BIT 64
  78. # endif
  79. # endif
  80. #elif defined __INT_MAX__
  81. # if __INT_MAX__ == 32767
  82. # define WORD_BIT 16
  83. # else
  84. # if __INT_MAX__ == 2147483647
  85. # define WORD_BIT 32
  86. # else
  87. /* Safe assumption. */
  88. # define WORD_BIT 64
  89. # endif
  90. # endif
  91. #else
  92. # define WORD_BIT 32
  93. #endif
  94. /* Number of bits in a word of type `long int'. */
  95. #ifdef LONG_MAX
  96. # if LONG_MAX == 2147483647
  97. # define LONG_BIT 32
  98. # else
  99. /* Safe assumption. */
  100. # define LONG_BIT 64
  101. # endif
  102. #elif defined __LONG_MAX__
  103. # if __LONG_MAX__ == 2147483647
  104. # define LONG_BIT 32
  105. # else
  106. /* Safe assumption. */
  107. # define LONG_BIT 64
  108. # endif
  109. #else
  110. # include <bits/wordsize.h>
  111. # if __WORDSIZE == 64
  112. # define LONG_BIT 64
  113. # else
  114. # define LONG_BIT 32
  115. # endif
  116. #endif
  117. #endif /* bits/xopen_lim.h */