Back to index

glibc  2.9
xopen_lim.h
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /*
00020  * Never include this file directly; use <limits.h> instead.
00021  */
00022 
00023 /* Additional definitions from X/Open Portability Guide, Issue 4, Version 2
00024    System Interfaces and Headers, 4.16 <limits.h>
00025 
00026    Please note only the values which are not greater than the minimum
00027    stated in the standard document are listed.  The `sysconf' functions
00028    should be used to obtain the actual value.  */
00029 
00030 #ifndef _XOPEN_LIM_H
00031 #define _XOPEN_LIM_H 1
00032 
00033 #define __need_IOV_MAX
00034 #include <bits/stdio_lim.h>
00035 
00036 /* We do not provide fixed values for
00037 
00038    ARG_MAX    Maximum length of argument to the `exec' function
00039               including environment data.
00040 
00041    ATEXIT_MAX Maximum number of functions that may be registered
00042               with `atexit'.
00043 
00044    CHILD_MAX  Maximum number of simultaneous processes per real
00045               user ID.
00046 
00047    OPEN_MAX   Maximum number of files that one process can have open
00048               at anyone time.
00049 
00050    PAGESIZE
00051    PAGE_SIZE  Size of bytes of a page.
00052 
00053    PASS_MAX   Maximum number of significant bytes in a password.
00054 
00055    We only provide a fixed limit for
00056 
00057    IOV_MAX    Maximum number of `iovec' structures that one process has
00058               available for use with `readv' or writev'.
00059 
00060    if this is indeed fixed by the underlying system.
00061 */
00062 
00063 
00064 /* Maximum number of `iovec' structures that one process has available
00065    for use with `readv' or writev'.  */
00066 #define       _XOPEN_IOV_MAX       _POSIX_UIO_MAXIOV
00067 
00068 
00069 /* Maximum value of `digit' in calls to the `printf' and `scanf'
00070    functions.  We have no limit, so return a reasonable value.  */
00071 #define NL_ARGMAX    _POSIX_ARG_MAX
00072 
00073 /* Maximum number of bytes in a `LANG' name.  We have no limit.  */
00074 #define NL_LANGMAX   _POSIX2_LINE_MAX
00075 
00076 /* Maximum message number.  We have no limit.  */
00077 #define NL_MSGMAX    INT_MAX
00078 
00079 /* Maximum number of bytes in N-to-1 collation mapping.  We have no
00080    limit.  */
00081 #define NL_NMAX             INT_MAX
00082 
00083 /* Maximum set number.  We have no limit.  */
00084 #define NL_SETMAX    INT_MAX
00085 
00086 /* Maximum number of bytes in a message.  We have no limit.  */
00087 #define NL_TEXTMAX   INT_MAX
00088 
00089 /* Default process priority.  */
00090 #define NZERO        20
00091 
00092 
00093 /* Number of bits in a word of type `int'.  */
00094 #ifdef INT_MAX
00095 # if INT_MAX == 32767
00096 #  define WORD_BIT   16
00097 # else
00098 #  if INT_MAX == 2147483647
00099 #   define WORD_BIT  32
00100 #  else
00101 /* Safe assumption.  */
00102 #   define WORD_BIT  64
00103 #  endif
00104 # endif
00105 #elif defined __INT_MAX__
00106 # if __INT_MAX__ == 32767
00107 #  define WORD_BIT   16
00108 # else
00109 #  if __INT_MAX__ == 2147483647
00110 #   define WORD_BIT  32
00111 #  else
00112 /* Safe assumption.  */
00113 #   define WORD_BIT  64
00114 #  endif
00115 # endif
00116 #else
00117 # define WORD_BIT    32
00118 #endif
00119 
00120 /* Number of bits in a word of type `long int'.  */
00121 #ifdef LONG_MAX
00122 # if LONG_MAX == 2147483647
00123 #  define LONG_BIT   32
00124 # else
00125 /* Safe assumption.  */
00126 #  define LONG_BIT   64
00127 # endif
00128 #elif defined __LONG_MAX__
00129 # if __LONG_MAX__ == 2147483647
00130 #  define LONG_BIT   32
00131 # else
00132 /* Safe assumption.  */
00133 #  define LONG_BIT   64
00134 # endif
00135 #else
00136 # include <bits/wordsize.h>
00137 # if __WORDSIZE == 64
00138 #  define LONG_BIT   64
00139 # else
00140 #  define LONG_BIT   32
00141 # endif
00142 #endif
00143 
00144 #endif /* bits/xopen_lim.h */