-
Notifications
You must be signed in to change notification settings - Fork 26
/
esconfig.h
348 lines (300 loc) · 8.78 KB
/
esconfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
/* config.h -- es(1) configuration parameters ($Revision: 1.1.1.1 $) */
/*
* Compile time options
*
* These options are best set on the command line in the Makefile.
* If the machine you use requires a different set of defaults than
* is provided, please send mail to
*
* Paul Haahr <[email protected]>
* Byron Rakitzis <[email protected]>
*
* If you decide to add things to this file, add them before the
* defaults and make sure that they can be overriden by command
* line definitions. (That is, remember to do the #ifndef dance.)
*
*
* ASSERTIONS
* if this is on, asserts will be checked, raising errors on
* actual assertion failure.
*
* BSD_LIMITS
* if this is on, the limit builtin (ala csh) is included.
*
* BUILTIN_TIME
* if this is on, the time builtin is included. by default, it is
* on, but feel free to turn it off. see also USE_WAIT3.
*
* HAVE_DEV_FD
* turn this on if your system supports /dev/fd for >{} and <{}
*
* DEVFD_PATH
* (used only if DEVFD is on.) a format string for print() to
* a file path for opening file descriptor n.
*
* GCALWAYS
* if this is on, the a collection is done after every allocation.
* this stress-tests the garbage collector. any missed Ref()
* declarations should cause a crash or assertion failure very
* quickly in this mode.
*
* GCDEBUG
* when this is on, the garbage collector is run in such a way
* that just about any coding error will lead to an almost
* immediate crash. it is equivalent to all 3 of GCALWAYS,
* GCPROTECT, and GCVERBOSE
*
* GCINFO
* a terse version of GCVERBOSE, which prints a short message
* for every collection.
*
* GCPROTECT
* makes the garbage collector disable access to pages
* that are in old space, making unforwarded references
* crasht the interpreter. requires os/mmu support for
* enabling and disabling access to pages.
*
* GCVERBOSE
* if this is on, it is possible to run the garbage collector
* in a mode where it explains what it is doing at all times.
* implied by GCDEBUG.
*
* GETGROUPS_USES_GID_T
* define this as true if getgroups() takes a gid_t* as its
* second argument. while POSIX.1 says it does, on many
* systems, gid_t is a short while getgroups() takes an int*.
*
* HAS_LSTAT
* define this as true if your system has lstat(2). the default
* is on. (it's been reported that SCO does not have lstat, but
* is this true even for recent versions?)
*
* INITIAL_PATH
* this is the default value for $path (and $PATH) when the shell
* starts up. it is replaced by one from the environment if it
* exists.
*
* KERNEL_POUNDBANG
* this value should be true when the builtin version of execve(2)
* understands #! headers. if false, es provides a builtin for
* running #! files. the default is true; are there any real
* systems still out there that don't support it?
*
* JOB_PROTECT
* set this to true if you want es to perform
* backgrounding as if it were a job controlling shell;
* that is, if you want background jobs to be put in new
* process groups. this flag is ignored if the system
* does not support the job control signals. since there
* are many broken programs that do not behave correctly
* when backgrounded in a v7 non-job-control fashion, the
* default for this option is on, even though it is ugly.
*
* PROTECT_ENV
* if on, makes all variable names in the environment ``safe'':
* that is, makes sure no characters other than c identifier
* characters appear in them.
*
* REF_ASSERTIONS
* if this is on, assertions about the use of the Ref() macro
* will be checked at run-time. this is only useful if you're
* modifying es source, and makes the binary much larger.
*
* REISER_CPP
* true if es is being compiled with a reiser-style preprocessor.
* if you have an ansi preprocessor, use it and turn this off.
*
* SHOW_DOT_FILES
* if this option is off (the default), wildcard patterns do not
* match files that being with a ``.'' character; this behavior
* is the same as in most unix shells. if it is on, the only
* files not matched are ``.'' and ``..''; this behavior follows
* convention on bell labs research unix systems (since the eighth
* edition) and plan 9. in either case, an explicit ``.'' at
* the beginning of a pattern will match the hidden files.
* (Contributed by Steve Kilbane.)
*
* SPECIAL_SIGCLD
* true if SIGCLD has System V semantics. this is true at least
* for silicon graphics machines running Irix. (according to
* Byron, ``if you trap SIGCLD on System V machines, weird things
* happen.'')
*
* SYSV_SIGNALS
* True if signal handling follows System V behavior;
* otherwise, Berkeley signals are assumed. If you set
* USE_SIGACTION, this value is ignore. By System V
* behavior, we mean, signal must be called to reinstall
* the signal handler after it is invoked. This behavior
* is also known as ``unreliable signals.''
*
* USE_CONST
* allow const declarations. if your compiler supports 'em,
* use 'em.
*
* USE_DIRENT
* if on, <dirent.h> is used; if off, <sys/direct.h>.
*
* USE_MEMORY
* if on, <memory.h> is used; if off, it's assumed that
* <string.h> does the job.
*
* USE_SIGACTION
* turn this on if your system understands the POSIX.1
* sigaction(2) call. it's probably better to use this
* version if you have it. if sigaction() is used, es
* assumes that signals have POSIX semantics, so the
* SPECIAL_SIGCLD and SYSV_SIGNALS options are turned
* off.
*
* USE_SIG_ATOMIC_T
* define this on a system which has its own typedef for
* sig_atomic_t.
*
* USE_STDARG
* define this if you have an ansi compiler and the <stdarg.h>
* header file. if not, es will try to use <varargs.h>, but
* you may need to hack a bit to get that working.
*
* USE_VOLATILE
* allow volatile declarations. if your compiler
* supports 'em, use 'em.
*
* USE_UNISTD
* define this if you have the include file <unistd.h>
*
* USE_WAIT3
* this option should be on if your system supports the
* BSD-style wait3(2) system call. by default, it is on.
* if this option is false and the BUILTIN_TIME is true,
* the times(2) call must exist.
*/
/*
* platform specific options
* please send new configurations to [email protected] and [email protected]
*/
#include "config.h"
#if HAVE_SIGRELSE && HAVE_SIGHOLD
# define SYSV_SIGNALS 1
#endif
/* NeXT defaults */
#if NeXT
#ifndef USE_SIG_ATOMIC_T
#define USE_SIG_ATOMIC_T 1
#endif
#endif /* NeXT */
/* Irix defaults */
#if sgi
#ifndef INITIAL_PATH
#define INITIAL_PATH "/usr/bsd", "/usr/sbin", "/usr/bin", "/bin", ""
#endif
#endif /* sgi */
/* HP/UX 9.0.1 -- from [email protected] (Rich $alz) and haahr*/
#if HPUX
#define _INCLUDE_POSIX_SOURCE 1
#define _INCLUDE_XOPEN_SOURCE 1
#define _INCLUDE_HPUX_SOURCE 1
#endif
/* SCO Xenix -- from [email protected] (Steven W Orr) for SCO-ODT-1.1 */
#if sco
#ifndef USE_SIG_ATOMIC_T
#define USE_SIG_ATOMIC_T 1
#endif
#endif /* sco */
/* OSF/1 -- this is taken from the DEC Alpha */
#if OSF1
#ifndef INITIAL_PATH
#define INITIAL_PATH "/usr/bin", ""
#endif
#endif /* OSF1 */
/* OSF/1 on HP snakes -- from John Robert LoVerso <[email protected]> */
#ifdef __hp_osf
#define __NO_FP_VARARGS /* avoid bug compiling print.c */
#endif
/* DEC Ultrix 4.2 -- from [email protected] (Hal Render) */
#if ultrix
#ifndef USE_SIG_ATOMIC_T
#define USE_SIG_ATOMIC_T 1
#endif
#endif /* ultrix */
/* 386BSD -- from [email protected] (Dave Barker) */
#if __386BSD__
#ifndef INITIAL_PATH
#define INITIAL_PATH "/usr/sbin", "/sbin", "/usr/bin", "/bin", ""
#endif
#define SIG_ERR BADSIG
#ifndef REQUIRE_STAT
#define REQUIRE_STAT 1
#endif
#endif
/*
* default defaults -- don't change this section
*/
#ifndef ASSERTIONS
#define ASSERTIONS 1
#endif
#ifndef BUILTIN_TIME
#define BUILTIN_TIME 1
#endif
#ifndef DEVFD_PATH
#define DEVFD_PATH "/dev/fd/%d"
#endif
#ifndef GCALWAYS
#define GCALWAYS 0
#endif
#ifndef GCDEBUG
#define GCDEBUG 0
#endif
#ifndef GCINFO
#define GCINFO 0
#endif
#ifndef GCPROTECT
#define GCPROTECT 0
#endif
#ifndef GCVERBOSE
#define GCVERBOSE 0
#endif
#ifndef INITIAL_PATH
#define INITIAL_PATH "/usr/ucb", "/usr/bin", "/bin", ""
#endif
#ifndef JOB_PROTECT
#define JOB_PROTECT 1
#endif
#ifndef PROTECT_ENV
#define PROTECT_ENV 1
#endif
#ifndef REF_ASSERTIONS
#define REF_ASSERTIONS 0
#endif
#ifndef REISER_CPP
#define REISER_CPP 0
#endif
#ifndef SHOW_DOT_FILES
#define SHOW_DOT_FILES 0
#endif
#ifndef SYSV_SIGNALS
#define SYSV_SIGNALS 0
#endif
#ifndef HAVE_MEMORY
#define HAVE_MEMORY 0
#endif
#ifndef USE_SIG_ATOMIC_T
#define USE_SIG_ATOMIC_T 0
#endif
/*
* enforcing choices that must be made
*/
#if GCDEBUG
#undef GCALWAYS
#undef GCINFO
#undef GCPROTECT
#undef GCVERBOSE
#define GCALWAYS 1
#define GCINFO 1
#define GCPROTECT 1
#define GCVERBOSE 1
#endif
#if HAVE_SIGACTION
#undef SYSV_SIGNALS
#define SYSV_SIGNALS 0
#endif