1 /* getconf.h -- replacement definitions for ones the system doesn't provide. */
6 /* Some systems do not define these; use POSIX.2 minimum recommended values. */
7 #ifndef _POSIX2_COLL_WEIGHTS_MAX
8 # define _POSIX2_COLL_WEIGHTS_MAX 2
11 /* If we're on a posix system, but the system doesn't define the necessary
12 constants, use posix.1 minimum values. */
13 #if defined (_POSIX_VERSION)
15 #ifndef _POSIX_ARG_MAX
16 # define _POSIX_ARG_MAX 4096
18 #ifndef _POSIX_CHILD_MAX
19 # define _POSIX_CHILD_MAX 6
21 #ifndef _POSIX_LINK_MAX
22 # define _POSIX_LINK_MAX 8
24 #ifndef _POSIX_MAX_CANON
25 # define _POSIX_MAX_CANON 255
27 #ifndef _POSIX_MAX_INPUT
28 # define _POSIX_MAX_INPUT 255
30 #ifndef _POSIX_NAME_MAX
31 # define _POSIX_NAME_MAX 14
33 #ifndef _POSIX_NGROUPS_MAX
34 # define _POSIX_NGROUPS_MAX 0
36 #ifndef _POSIX_OPEN_MAX
37 # define _POSIX_OPEN_MAX 16
39 #ifndef _POSIX_PATH_MAX
40 # define _POSIX_PATH_MAX 255
42 #ifndef _POSIX_PIPE_BUF
43 # define _POSIX_PIPE_BUF 512
45 #ifndef _POSIX_SSIZE_MAX
46 # define _POSIX_SSIZE_MAX 32767
48 #ifndef _POSIX_STREAM_MAX
49 # define _POSIX_STREAM_MAX 8
51 #ifndef _POSIX_TZNAME_MAX
52 # define _POSIX_TZNAME_MAX 3
55 #ifndef _POSIX2_BC_BASE_MAX
56 # define _POSIX2_BC_BASE_MAX 99
58 #ifndef _POSIX2_BC_DIM_MAX
59 # define _POSIX2_BC_DIM_MAX 2048
61 #ifndef _POSIX2_BC_SCALE_MAX
62 # define _POSIX2_BC_SCALE_MAX 99
64 #ifndef _POSIX2_BC_STRING_MAX
65 # define _POSIX2_BC_STRING_MAX 1000
67 #ifndef _POSIX2_EQUIV_CLASS_MAX
68 # define _POSIX2_EQUIV_CLASS_MAX 2
70 #ifndef _POSIX2_EXPR_NEST_MAX
71 # define _POSIX2_EXPR_NEST_MAX 32
73 #ifndef _POSIX2_LINE_MAX
74 # define _POSIX2_LINE_MAX 2048
76 #ifndef _POSIX2_RE_DUP_MAX
77 # define _POSIX2_RE_DUP_MAX 255
80 /* configurable system variables */
81 #if !defined (HAVE_SYSCONF)
84 # define _SC_ARG_MAX 1
85 # define _SC_CHILD_MAX 2
86 # define _SC_CLK_TCK 3
87 # define _SC_NGROUPS_MAX 4
88 # define _SC_OPEN_MAX 5
89 # define _SC_JOB_CONTROL 6
90 # define _SC_SAVED_IDS 7
91 # define _SC_VERSION 8
92 # define _SC_BC_BASE_MAX 9
93 # define _SC_BC_DIM_MAX 10
94 # define _SC_BC_SCALE_MAX 11
95 # define _SC_BC_STRING_MAX 12
96 # define _SC_COLL_WEIGHTS_MAX 13
97 # define _SC_EXPR_NEST_MAX 14
98 # define _SC_LINE_MAX 15
99 # define _SC_RE_DUP_MAX 16
101 # define _SC_2_VERSION 17
102 # define _SC_2_C_BIND 18
103 # define _SC_2_C_DEV 19
104 # define _SC_2_CHAR_TERM 20
105 # define _SC_2_FORT_DEV 21
106 # define _SC_2_FORT_RUN 22
107 # define _SC_2_LOCALEDEF 23
108 # define _SC_2_SW_DEV 24
109 # define _SC_2_UPE 25
112 # define _SC_STREAM_MAX 26
113 # define _SC_TZNAME_MAX 27
114 #endif /* !_SC_ARG_MAX */
116 #endif /* !HAVE_SYSCONF */
118 /* configurable pathname variables */
119 #if !defined (HAVE_PATHCONF)
122 #define _PC_LINK_MAX 1
123 #define _PC_MAX_CANON 2
124 #define _PC_MAX_INPUT 3
125 #define _PC_NAME_MAX 4
126 #define _PC_PATH_MAX 5
127 #define _PC_PIPE_BUF 6
128 #define _PC_CHOWN_RESTRICTED 7
129 #define _PC_NO_TRUNC 8
130 #define _PC_VDISABLE 9
131 #endif /* !_PC_LINK_MAX */
133 #endif /* !HAVE_PATHCONF */
135 #endif /* _POSIX_VERSION */
141 /* ANSI/ISO C, POSIX.1-200x, XPG 4.2 (and later) C language type limits.
142 Defined only if the system include files don't. Assume a 32-bit
143 environment with signed 8-bit characters. */
149 # define CHAR_MAX 127
152 # define CHAR_MIN -128
156 # define INT_BIT (sizeof (int) * CHAR_BIT)
159 # define INT_MAX 2147483647
162 # define INT_MIN (-2147483647-1)
166 # define LONG_BIT (sizeof (long int) * CHAR_BIT)
169 # define LONG_MAX 2147483647L
172 # define LONG_MIN (-2147483647L-1L)
176 # define SCHAR_MAX CHAR_MAX
179 # define SCHAR_MIN CHAR_MIN
183 # define SHRT_MAX 32767
186 # define SHRT_MIN (-32768)
190 # define UCHAR_MAX 255
193 # define UINT_MAX 4294967295U
196 # define ULONG_MAX 4294967295UL
199 # define UCHAR_MAX 65535
202 /* assume size_t is `unsigned int'; ssize_t is `int' */
204 # define SIZE_MAX UINT_MAX
207 # define SSIZE_MAX INT_MAX
211 # define WORD_BIT (sizeof (int) * CHAR_BIT)
214 #endif /* _GETCONF_H */