hjl / source-git / glibc

Forked from source-git/glibc 3 years ago
Clone

Blame include/bits/xopen_lim.h

Packit 6c4009
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * Never include this file directly; use <limits.h> instead.
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2
Packit 6c4009
   System Interfaces and Headers, 4.16 <limits.h>
Packit 6c4009
Packit 6c4009
   Please note only the values which are not greater than the minimum
Packit 6c4009
   stated in the standard document are listed.  The `sysconf' functions
Packit 6c4009
   should be used to obtain the actual value.  */
Packit 6c4009
Packit 6c4009
#ifndef _XOPEN_LIM_H
Packit 6c4009
#define _XOPEN_LIM_H	1
Packit 6c4009
Packit 6c4009
/* We do not provide fixed values for
Packit 6c4009
Packit 6c4009
   ARG_MAX	Maximum length of argument to the `exec' function
Packit 6c4009
		including environment data.
Packit 6c4009
Packit 6c4009
   ATEXIT_MAX	Maximum number of functions that may be registered
Packit 6c4009
		with `atexit'.
Packit 6c4009
Packit 6c4009
   CHILD_MAX	Maximum number of simultaneous processes per real
Packit 6c4009
		user ID.
Packit 6c4009
Packit 6c4009
   OPEN_MAX	Maximum number of files that one process can have open
Packit 6c4009
		at anyone time.
Packit 6c4009
Packit 6c4009
   PAGESIZE
Packit 6c4009
   PAGE_SIZE	Size of bytes of a page.
Packit 6c4009
Packit 6c4009
   PASS_MAX	Maximum number of significant bytes in a password.
Packit 6c4009
Packit 6c4009
   We only provide a fixed limit for
Packit 6c4009
Packit 6c4009
   IOV_MAX	Maximum number of `iovec' structures that one process has
Packit 6c4009
		available for use with `readv' or writev'.
Packit 6c4009
Packit 6c4009
   if this is indeed fixed by the underlying system.
Packit 6c4009
*/
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Maximum number of `iovec' structures that may be used in a single call
Packit 6c4009
   to `readv', `writev', etc.  */
Packit 6c4009
#define	_XOPEN_IOV_MAX	_POSIX_UIO_MAXIOV
Packit 6c4009
Packit 6c4009
#include <bits/uio_lim.h>
Packit 6c4009
#ifdef __IOV_MAX
Packit 6c4009
# define IOV_MAX __IOV_MAX
Packit 6c4009
#else
Packit 6c4009
# undef IOV_MAX
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Maximum value of `digit' in calls to the `printf' and `scanf'
Packit 6c4009
   functions.  We have no limit, so return a reasonable value.  */
Packit 6c4009
#define NL_ARGMAX	_POSIX_ARG_MAX
Packit 6c4009
Packit 6c4009
/* Maximum number of bytes in a `LANG' name.  We have no limit.  */
Packit 6c4009
#define NL_LANGMAX	_POSIX2_LINE_MAX
Packit 6c4009
Packit 6c4009
/* Maximum message number.  We have no limit.  */
Packit 6c4009
#define NL_MSGMAX	INT_MAX
Packit 6c4009
Packit 6c4009
/* Maximum number of bytes in N-to-1 collation mapping.  We have no
Packit 6c4009
   limit.  */
Packit 6c4009
#if defined __USE_GNU || !defined __USE_XOPEN2K8
Packit 6c4009
# define NL_NMAX	INT_MAX
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Maximum set number.  We have no limit.  */
Packit 6c4009
#define NL_SETMAX	INT_MAX
Packit 6c4009
Packit 6c4009
/* Maximum number of bytes in a message.  We have no limit.  */
Packit 6c4009
#define NL_TEXTMAX	INT_MAX
Packit 6c4009
Packit 6c4009
/* Default process priority.  */
Packit 6c4009
#define NZERO		20
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Number of bits in a word of type `int'.  */
Packit 6c4009
#ifdef INT_MAX
Packit 6c4009
# if INT_MAX == 32767
Packit 6c4009
#  define WORD_BIT	16
Packit 6c4009
# else
Packit 6c4009
#  if INT_MAX == 2147483647
Packit 6c4009
#   define WORD_BIT	32
Packit 6c4009
#  else
Packit 6c4009
/* Safe assumption.  */
Packit 6c4009
#   define WORD_BIT	64
Packit 6c4009
#  endif
Packit 6c4009
# endif
Packit 6c4009
#elif defined __INT_MAX__
Packit 6c4009
# if __INT_MAX__ == 32767
Packit 6c4009
#  define WORD_BIT	16
Packit 6c4009
# else
Packit 6c4009
#  if __INT_MAX__ == 2147483647
Packit 6c4009
#   define WORD_BIT	32
Packit 6c4009
#  else
Packit 6c4009
/* Safe assumption.  */
Packit 6c4009
#   define WORD_BIT	64
Packit 6c4009
#  endif
Packit 6c4009
# endif
Packit 6c4009
#else
Packit 6c4009
# define WORD_BIT	32
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* Number of bits in a word of type `long int'.  */
Packit 6c4009
#ifdef LONG_MAX
Packit 6c4009
# if LONG_MAX == 2147483647
Packit 6c4009
#  define LONG_BIT	32
Packit 6c4009
# else
Packit 6c4009
/* Safe assumption.  */
Packit 6c4009
#  define LONG_BIT	64
Packit 6c4009
# endif
Packit 6c4009
#elif defined __LONG_MAX__
Packit 6c4009
# if __LONG_MAX__ == 2147483647
Packit 6c4009
#  define LONG_BIT	32
Packit 6c4009
# else
Packit 6c4009
/* Safe assumption.  */
Packit 6c4009
#  define LONG_BIT	64
Packit 6c4009
# endif
Packit 6c4009
#else
Packit 6c4009
# include <bits/wordsize.h>
Packit 6c4009
# if __WORDSIZE == 64
Packit 6c4009
#  define LONG_BIT	64
Packit 6c4009
# else
Packit 6c4009
#  define LONG_BIT	32
Packit 6c4009
# endif
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
#endif /* bits/xopen_lim.h */