xopen_lim.h 4.0 KB

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