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