mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 21:10:07 +00:00
37f802f864
__need_FOPEN_MAX wasn't being used anywhere. __need_IOV_MAX was more complicated; the basic deal is that sys/uio.h wants to define a constant named UIO_MAXIOV and bits/xopen_lim.h wants to define a constant named IOV_MAX, with the same meaning. For no apparent reason this was being handled via bits/stdio_lim.h -- stdio.h is NOT supposed to define IOV_MAX -- and some mess in Makerules. Also, bits/uio.h on Linux was being used as a dumping ground for extension functions. So now we have bits/uio_lim.h, which defines __IOV_MAX. bits/xopen_lim.h and sys/uio.h use that to define their respective constants. We also now have bits/uio-ext.h, which is the official Proper Home for extensions to sys/uio.h. bits/uio.h is removed, and stdio_lim.h doesn't define IOV_MAX at all. * bits/uio_lim.h, sysdeps/unix/sysv/linux/bits/uio_lim.h * bits/uio-ext.h, sysdeps/unix/sysv/linux/bits/uio-ext.h: New file. * bits/uio.h, sysdeps/unix/sysv/linux/bits/uio.h: Delete file. * include/bits/xopen_lim.h: Use bits/uio_lim.h to get the value for IOV_MAX. * misc/Makefile: Install bits/uio-ext.h and bits/uio_lim.h. Don't install bits/uio.h. * misc/sys/uio.h: Don't include bits/uio.h. Do include bits/types/struct_iovec.h and bits/uio_lim.h. Set UIO_MAXIOV based on __IOV_MAX. Under __USE_GNU, also include bits/uio-ext.h. * stdio-common/stdio_lim.h.in: Remove logic for __need_FOPEN_MAX and __need_IOV_MAX. Don't define IOV_MAX at all. * Makerules (stdio_lim.h): Remove logic for setting IOV_MAX. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Include bits/types/struct_iovec.h, not bits/uio.h. Use __ssize_t, not ssize_t, in function prototypes. Don't use hard TAB for double space after period in comments.
149 lines
3.8 KiB
C
149 lines
3.8 KiB
C
/* Copyright (C) 1996-2017 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
/*
|
|
* Never include this file directly; use <limits.h> instead.
|
|
*/
|
|
|
|
/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2
|
|
System Interfaces and Headers, 4.16 <limits.h>
|
|
|
|
Please note only the values which are not greater than the minimum
|
|
stated in the standard document are listed. The `sysconf' functions
|
|
should be used to obtain the actual value. */
|
|
|
|
#ifndef _XOPEN_LIM_H
|
|
#define _XOPEN_LIM_H 1
|
|
|
|
/* We do not provide fixed values for
|
|
|
|
ARG_MAX Maximum length of argument to the `exec' function
|
|
including environment data.
|
|
|
|
ATEXIT_MAX Maximum number of functions that may be registered
|
|
with `atexit'.
|
|
|
|
CHILD_MAX Maximum number of simultaneous processes per real
|
|
user ID.
|
|
|
|
OPEN_MAX Maximum number of files that one process can have open
|
|
at anyone time.
|
|
|
|
PAGESIZE
|
|
PAGE_SIZE Size of bytes of a page.
|
|
|
|
PASS_MAX Maximum number of significant bytes in a password.
|
|
|
|
We only provide a fixed limit for
|
|
|
|
IOV_MAX Maximum number of `iovec' structures that one process has
|
|
available for use with `readv' or writev'.
|
|
|
|
if this is indeed fixed by the underlying system.
|
|
*/
|
|
|
|
|
|
/* Maximum number of `iovec' structures that may be used in a single call
|
|
to `readv', `writev', etc. */
|
|
#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
|
|
|
|
#include <bits/uio_lim.h>
|
|
#ifdef __IOV_MAX
|
|
# define IOV_MAX __IOV_MAX
|
|
#else
|
|
# undef IOV_MAX
|
|
#endif
|
|
|
|
/* Maximum value of `digit' in calls to the `printf' and `scanf'
|
|
functions. We have no limit, so return a reasonable value. */
|
|
#define NL_ARGMAX _POSIX_ARG_MAX
|
|
|
|
/* Maximum number of bytes in a `LANG' name. We have no limit. */
|
|
#define NL_LANGMAX _POSIX2_LINE_MAX
|
|
|
|
/* Maximum message number. We have no limit. */
|
|
#define NL_MSGMAX INT_MAX
|
|
|
|
/* Maximum number of bytes in N-to-1 collation mapping. We have no
|
|
limit. */
|
|
#if defined __USE_GNU || !defined __USE_XOPEN2K8
|
|
# define NL_NMAX INT_MAX
|
|
#endif
|
|
|
|
/* Maximum set number. We have no limit. */
|
|
#define NL_SETMAX INT_MAX
|
|
|
|
/* Maximum number of bytes in a message. We have no limit. */
|
|
#define NL_TEXTMAX INT_MAX
|
|
|
|
/* Default process priority. */
|
|
#define NZERO 20
|
|
|
|
|
|
/* Number of bits in a word of type `int'. */
|
|
#ifdef INT_MAX
|
|
# if INT_MAX == 32767
|
|
# define WORD_BIT 16
|
|
# else
|
|
# if INT_MAX == 2147483647
|
|
# define WORD_BIT 32
|
|
# else
|
|
/* Safe assumption. */
|
|
# define WORD_BIT 64
|
|
# endif
|
|
# endif
|
|
#elif defined __INT_MAX__
|
|
# if __INT_MAX__ == 32767
|
|
# define WORD_BIT 16
|
|
# else
|
|
# if __INT_MAX__ == 2147483647
|
|
# define WORD_BIT 32
|
|
# else
|
|
/* Safe assumption. */
|
|
# define WORD_BIT 64
|
|
# endif
|
|
# endif
|
|
#else
|
|
# define WORD_BIT 32
|
|
#endif
|
|
|
|
/* Number of bits in a word of type `long int'. */
|
|
#ifdef LONG_MAX
|
|
# if LONG_MAX == 2147483647
|
|
# define LONG_BIT 32
|
|
# else
|
|
/* Safe assumption. */
|
|
# define LONG_BIT 64
|
|
# endif
|
|
#elif defined __LONG_MAX__
|
|
# if __LONG_MAX__ == 2147483647
|
|
# define LONG_BIT 32
|
|
# else
|
|
/* Safe assumption. */
|
|
# define LONG_BIT 64
|
|
# endif
|
|
#else
|
|
# include <bits/wordsize.h>
|
|
# if __WORDSIZE == 64
|
|
# define LONG_BIT 64
|
|
# else
|
|
# define LONG_BIT 32
|
|
# endif
|
|
#endif
|
|
|
|
#endif /* bits/xopen_lim.h */
|