1 /* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 4 The GNU C Library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 The GNU C Library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with the GNU C Library; if not, see 16 <http://www.gnu.org/licenses/>. */ 17 18 /* 19 * Never include this file directly; use <limits.h> instead. 20 */ 21 22 /* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 23 System Interfaces and Headers, 4.16 <limits.h> 24 25 Please note only the values which are not greater than the minimum 26 stated in the standard document are listed. The `sysconf' functions 27 should be used to obtain the actual value. */ 28 29 #ifndef _XOPEN_LIM_H 30 #define _XOPEN_LIM_H 1 31 32 #define __need_IOV_MAX 33 #include <bits/stdio_lim.h> 34 35 /* We do not provide fixed values for 36 37 ARG_MAX Maximum length of argument to the `exec' function 38 including environment data. 39 40 ATEXIT_MAX Maximum number of functions that may be registered 41 with `atexit'. 42 43 CHILD_MAX Maximum number of simultaneous processes per real 44 user ID. 45 46 OPEN_MAX Maximum number of files that one process can have open 47 at anyone time. 48 49 PAGESIZE 50 PAGE_SIZE Size of bytes of a page. 51 52 PASS_MAX Maximum number of significant bytes in a password. 53 54 We only provide a fixed limit for 55 56 IOV_MAX Maximum number of `iovec' structures that one process has 57 available for use with `readv' or writev'. 58 59 if this is indeed fixed by the underlying system. 60 */ 61 62 63 /* Maximum number of `iovec' structures that one process has available 64 for use with `readv' or writev'. */ 65 #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV 66 67 68 /* Maximum value of `digit' in calls to the `printf' and `scanf' 69 functions. Posix dictates this should be a minimum of 9 */ 70 #if !defined(__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__) || (__UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ <= 1) 71 #undef NL_ARGMAX 72 #elif __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ < 9 73 #define NL_ARGMAX 9 74 #else 75 #define NL_ARGMAX __UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS__ 76 #endif 77 78 /* Maximum number of bytes in a `LANG' name. We have no limit. */ 79 #define NL_LANGMAX _POSIX2_LINE_MAX 80 81 /* Maximum message number. We have no limit. */ 82 #define NL_MSGMAX INT_MAX 83 84 /* Maximum number of bytes in N-to-1 collation mapping. We have no 85 limit. */ 86 #define NL_NMAX INT_MAX 87 88 /* Maximum set number. We have no limit. */ 89 #define NL_SETMAX INT_MAX 90 91 /* Maximum number of bytes in a message. We have no limit. */ 92 #define NL_TEXTMAX INT_MAX 93 94 /* Default process priority. */ 95 #define NZERO 20 96 97 98 /* Number of bits in a word of type `int'. */ 99 #ifdef INT_MAX 100 # if INT_MAX == 32767 101 # define WORD_BIT 16 102 # else 103 # if INT_MAX == 2147483647 104 # define WORD_BIT 32 105 # else 106 /* Safe assumption. */ 107 # define WORD_BIT 64 108 # endif 109 # endif 110 #elif defined __INT_MAX__ 111 # if __INT_MAX__ == 32767 112 # define WORD_BIT 16 113 # else 114 # if __INT_MAX__ == 2147483647 115 # define WORD_BIT 32 116 # else 117 /* Safe assumption. */ 118 # define WORD_BIT 64 119 # endif 120 # endif 121 #else 122 # define WORD_BIT 32 123 #endif 124 125 /* Number of bits in a word of type `long int'. */ 126 #ifdef LONG_MAX 127 # if LONG_MAX == 2147483647 128 # define LONG_BIT 32 129 # else 130 /* Safe assumption. */ 131 # define LONG_BIT 64 132 # endif 133 #elif defined __LONG_MAX__ 134 # if __LONG_MAX__ == 2147483647 135 # define LONG_BIT 32 136 # else 137 /* Safe assumption. */ 138 # define LONG_BIT 64 139 # endif 140 #else 141 # include <bits/wordsize.h> 142 # if __WORDSIZE == 64 143 # define LONG_BIT 64 144 # else 145 # define LONG_BIT 32 146 # endif 147 #endif 148 149 #endif /* bits/xopen_lim.h */ 150