]> git.ipfire.org Git - thirdparty/glibc.git/blame - include/bits/xopen_lim.h
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / include / bits / xopen_lim.h
CommitLineData
04277e02 1/* Copyright (C) 1996-2019 Free Software Foundation, Inc.
2c6fe0bd
UD
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
41bdb6e2
AJ
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.
2c6fe0bd
UD
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
41bdb6e2 12 Lesser General Public License for more details.
2c6fe0bd 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6 15 License along with the GNU C Library; if not, see
5a82c748 16 <https://www.gnu.org/licenses/>. */
2c6fe0bd 17
5107cf1d
UD
18/*
19 * Never include this file directly; use <limits.h> instead.
20 */
21
2c6fe0bd
UD
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
2c6fe0bd
UD
30#define _XOPEN_LIM_H 1
31
32/* We do not provide fixed values for
33
34 ARG_MAX Maximum length of argument to the `exec' function
35 including environment data.
36
37 ATEXIT_MAX Maximum number of functions that may be registered
38 with `atexit'.
39
40 CHILD_MAX Maximum number of simultaneous processes per real
41 user ID.
42
43 OPEN_MAX Maximum number of files that one process can have open
44 at anyone time.
45
46 PAGESIZE
47 PAGE_SIZE Size of bytes of a page.
48
49 PASS_MAX Maximum number of significant bytes in a password.
2c6fe0bd 50
ab58d620 51 We only provide a fixed limit for
2c6fe0bd 52
ab58d620
UD
53 IOV_MAX Maximum number of `iovec' structures that one process has
54 available for use with `readv' or writev'.
55
56 if this is indeed fixed by the underlying system.
57*/
2c6fe0bd
UD
58
59
37f802f8
ZW
60/* Maximum number of `iovec' structures that may be used in a single call
61 to `readv', `writev', etc. */
2c6fe0bd
UD
62#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
63
37f802f8
ZW
64#include <bits/uio_lim.h>
65#ifdef __IOV_MAX
66# define IOV_MAX __IOV_MAX
67#else
68# undef IOV_MAX
69#endif
2c6fe0bd
UD
70
71/* Maximum value of `digit' in calls to the `printf' and `scanf'
72 functions. We have no limit, so return a reasonable value. */
73#define NL_ARGMAX _POSIX_ARG_MAX
74
75/* Maximum number of bytes in a `LANG' name. We have no limit. */
76#define NL_LANGMAX _POSIX2_LINE_MAX
77
78/* Maximum message number. We have no limit. */
79#define NL_MSGMAX INT_MAX
80
81/* Maximum number of bytes in N-to-1 collation mapping. We have no
82 limit. */
eb64b6d4
JM
83#if defined __USE_GNU || !defined __USE_XOPEN2K8
84# define NL_NMAX INT_MAX
85#endif
2c6fe0bd
UD
86
87/* Maximum set number. We have no limit. */
88#define NL_SETMAX INT_MAX
89
90/* Maximum number of bytes in a message. We have no limit. */
91#define NL_TEXTMAX INT_MAX
92
93/* Default process priority. */
94#define NZERO 20
95
219aa9e9
UD
96
97/* Number of bits in a word of type `int'. */
ceb579a3
UD
98#ifdef INT_MAX
99# if INT_MAX == 32767
100# define WORD_BIT 16
101# else
102# if INT_MAX == 2147483647
103# define WORD_BIT 32
104# else
105/* Safe assumption. */
106# define WORD_BIT 64
107# endif
108# endif
109#elif defined __INT_MAX__
110# if __INT_MAX__ == 32767
111# define WORD_BIT 16
219aa9e9 112# else
ceb579a3
UD
113# if __INT_MAX__ == 2147483647
114# define WORD_BIT 32
115# else
219aa9e9 116/* Safe assumption. */
ceb579a3
UD
117# define WORD_BIT 64
118# endif
219aa9e9 119# endif
ceb579a3
UD
120#else
121# define WORD_BIT 32
219aa9e9
UD
122#endif
123
124/* Number of bits in a word of type `long int'. */
ceb579a3
UD
125#ifdef LONG_MAX
126# if LONG_MAX == 2147483647
127# define LONG_BIT 32
128# else
219aa9e9 129/* Safe assumption. */
ceb579a3
UD
130# define LONG_BIT 64
131# endif
132#elif defined __LONG_MAX__
133# if __LONG_MAX__ == 2147483647
134# define LONG_BIT 32
135# else
136/* Safe assumption. */
137# define LONG_BIT 64
138# endif
139#else
140# include <bits/wordsize.h>
141# if __WORDSIZE == 64
142# define LONG_BIT 64
143# else
144# define LONG_BIT 32
145# endif
219aa9e9
UD
146#endif
147
5107cf1d 148#endif /* bits/xopen_lim.h */