xopen_lim.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. We have no limit, so return a reasonable value. */
  49. #define NL_ARGMAX _POSIX_ARG_MAX
  50. /* Maximum number of bytes in a `LANG' name. We have no limit. */
  51. #define NL_LANGMAX _POSIX2_LINE_MAX
  52. /* Maximum message number. We have no limit. */
  53. #define NL_MSGMAX INT_MAX
  54. /* Maximum number of bytes in N-to-1 collation mapping. We have no
  55. limit. */
  56. #define NL_NMAX INT_MAX
  57. /* Maximum set number. We have no limit. */
  58. #define NL_SETMAX INT_MAX
  59. /* Maximum number of bytes in a message. We have no limit. */
  60. #define NL_TEXTMAX INT_MAX
  61. /* Default process priority. */
  62. #define NZERO 20
  63. /* Number of bits in a word of type `int'. */
  64. #ifdef INT_MAX
  65. # if INT_MAX == 32767
  66. # define WORD_BIT 16
  67. # else
  68. # if INT_MAX == 2147483647
  69. # define WORD_BIT 32
  70. # else
  71. /* Safe assumption. */
  72. # define WORD_BIT 64
  73. # endif
  74. # endif
  75. #elif defined __INT_MAX__
  76. # if __INT_MAX__ == 32767
  77. # define WORD_BIT 16
  78. # else
  79. # if __INT_MAX__ == 2147483647
  80. # define WORD_BIT 32
  81. # else
  82. /* Safe assumption. */
  83. # define WORD_BIT 64
  84. # endif
  85. # endif
  86. #else
  87. # define WORD_BIT 32
  88. #endif
  89. /* Number of bits in a word of type `long int'. */
  90. #ifdef LONG_MAX
  91. # if LONG_MAX == 2147483647
  92. # define LONG_BIT 32
  93. # else
  94. /* Safe assumption. */
  95. # define LONG_BIT 64
  96. # endif
  97. #elif defined __LONG_MAX__
  98. # if __LONG_MAX__ == 2147483647
  99. # define LONG_BIT 32
  100. # else
  101. /* Safe assumption. */
  102. # define LONG_BIT 64
  103. # endif
  104. #else
  105. # include <bits/wordsize.h>
  106. # if __WORDSIZE == 64
  107. # define LONG_BIT 64
  108. # else
  109. # define LONG_BIT 32
  110. # endif
  111. #endif
  112. #endif /* bits/xopen_lim.h */