1 /* DO NOT EDIT --- AUTO-GENERATED --- DO NOT EDIT */
7 /* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this software; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 * As a special exception, the Free Software Foundation gives permission
24 * for additional uses of the text contained in its release of GUILE.
26 * The exception is that, if you link the GUILE library with other files
27 * to produce an executable, this does not by itself cause the
28 * resulting executable to be covered by the GNU General Public License.
29 * Your use of that executable is in no way restricted on account of
30 * linking the GUILE library code into it.
32 * This exception does not however invalidate any other reasons why
33 * the executable file might be covered by the GNU General Public License.
35 * This exception applies only to the code released by the
36 * Free Software Foundation under the name GUILE. If you copy
37 * code from other Free Software Foundation releases into a copy of
38 * GUILE, as the General Public License permits, the exception does
39 * not apply to the code that you add in this way. To avoid misleading
40 * anyone as to the status of such modified files, you must delete
41 * this exception notice from them.
43 * If you write modifications of your own for GUILE, it is your choice
44 * whether to permit this exception to apply to your modifications.
45 * If you do not wish that, delete this exception notice.
48 /* {Supported Options}
50 * These may be defined or undefined.
53 /* If the compile FLAG `CAUTIOUS' is #defined then the number of
54 * arguments is always checked for application of closures. If the
55 * compile FLAG `RECKLESS' is #defined then they are not checked.
56 * Otherwise, number of argument checks for closures are made only when
57 * the function position (whose value is the closure) of a combination is
58 * not an ILOC or GLOC. When the function position of a combination is a
59 * symbol it will be checked only the first time it is evaluated because
60 * it will then be replaced with an ILOC or GLOC.
65 /* After looking up a local for the first time, rewrite the
66 * code graph, caching its position.
68 #define MEMOIZE_LOCALS
70 /* All the number support there is.
75 /* GC should relinquish empty cons-pair arenas.
77 #define GC_FREE_SEGMENTS
79 /* Provide a scheme-accessible count-down timer that
80 * generates a pseudo-interrupt.
85 /* Use engineering notation when converting numbers strings?
89 /* Include support for uniform arrays?
91 * Possibly some of the initialization code depends on this
92 * being defined, but that is a bug and should be fixed.
96 #undef SCM_CAREFUL_INTS
98 /* {Unsupported Options}
100 * These must be defined.
109 /* Random options (net yet supported or in final form). */
111 #undef DEBUG_EXTENSIONS
112 #undef READER_EXTENSIONS
113 #undef SCM_STACK_LIMIT 20000
114 #undef NO_CEVAL_STACK_CHECK
117 /* Some auto-generated .h files contain unused prototypes
118 * that need these typedefs.
120 typedef long long_long
;
121 typedef unsigned long ulong_long
;
128 * SCM_CHAR_SCM_CODE_LIMIT == UCHAR_MAX + 1
129 * SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
130 * SCM_MOST_NEGATIVE_FIXNUM == SCM_SRS((long)LONG_MIN, 2)
136 # define SCM_CHAR_SCM_CODE_LIMIT (UCHAR_MAX+1L)
138 # define SCM_CHAR_SCM_CODE_LIMIT 256L
139 # endif /* def UCHAR_MAX */
140 # define SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
141 # ifdef _UNICOS /* Stupid cray bug */
142 # define SCM_MOST_NEGATIVE_FIXNUM ((long)LONG_MIN/4)
144 # define SCM_MOST_NEGATIVE_FIXNUM SCM_SRS((long)LONG_MIN, 2)
147 # define SCM_CHAR_SCM_CODE_LIMIT 256L
148 # define SCM_MOST_POSITIVE_FIXNUM ((long)((unsigned long)~0L>>3))
150 # define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
152 # define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM)
153 # endif /* (0 != ~0) */
154 #endif /* def HAVE_LIMITSH */
157 #include <scmconfig.h>
162 # ifndef CHEAP_CONTINUATIONS
163 typedef int jmp_buf[17];
164 extern int setjump(jmp_buf env
);
165 extern int longjump(jmp_buf env
, int ret
);
166 # define setjmp setjump
167 # define longjmp longjump
173 typedef int jmp_buf[112];
174 extern int setjump(jmp_buf env
);
175 extern int longjump(jmp_buf env
, int ret
);
176 # define setjmp setjump
177 # define longjmp longjump
178 # else /* ndef _CRAY1 */
180 # endif /* ndef _CRAY1 */
181 #endif /* ndef vms */
184 /* James Clark came up with this neat one instruction fix for
185 * continuations on the SPARC. It flushes the register windows so
186 * that all the state of the process is contained in the stack.
190 # define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3")
192 # define SCM_FLUSH_REGISTER_WINDOWS /* empty */
195 /* If stack is not longword aligned then
198 /* #define SHORT_ALIGN */
210 typedef short SCM_STACKITEM
;
212 typedef long SCM_STACKITEM
;
216 extern unsigned int scm_async_clock
;
217 #define SCM_ASYNC_TICK if (0 == --scm_async_clock) scm_async_click ()
219 #ifdef SCM_CAREFUL_INTS
220 #define SCM_CHECK_NOT_DISABLED \
221 if (scm_ints_disabled) \
222 fputs("ints already disabled\n", stderr); \
224 #define SCM_CHECK_NOT_ENABLED \
225 if (!scm_ints_disabled) \
226 fputs("ints already enabled\n", stderr); \
229 #define SCM_CHECK_NOT_DISABLED
230 #define SCM_CHECK_NOT_ENABLED
234 #define SCM_DEFER_INTS \
236 SCM_CHECK_NOT_DISABLED; \
237 scm_ints_disabled = 1; \
241 #define SCM_ALLOW_INTS_ONLY \
243 scm_ints_disabled = 0; \
247 #define SCM_ALLOW_INTS \
249 SCM_CHECK_NOT_ENABLED; \
250 scm_ints_disabled = 0; \
255 #define SCM_REDEFER_INTS \
257 ++scm_ints_disabled; \
261 #define SCM_REALLOW_INTS \
263 --scm_ints_disabled; \
264 if (!scm_ints_disabled) \
278 #define SCM_ASSERT(_cond, _arg, _pos, _subr)
279 #define SCM_ASRTGO(_cond, _label)
281 #define SCM_ASSERT(_cond, _arg, _pos, _subr) \
283 scm_wta(_arg, (char *)(_pos), _subr)
284 #define SCM_ASRTGO(_cond, _label) \
298 #define SCM_ARGERR(X) ((X) < SCM_WNA \
300 : "wrong type argument")
302 /* Following must match entry indexes in scm_errmsgs[].
303 * Also, SCM_WNA must follow the last SCM_ARGn in sequence.
306 #define SCM_OVSCM_FLOW 9
307 #define SCM_OUTOFRANGE 10
308 #define SCM_NALLOC 11
309 #define SCM_STACK_SCM_OVSCM_FLOW 12
313 /* (...still matching scm_errmsgs) These
314 * are signals. Signals may become errors
315 * but are distinguished because they first
316 * try to invoke a handler that can resume
317 * the interrupted routine.
319 #define SCM_HUP_SIGNAL 14
320 #define SCM_INT_SIGNAL 15
321 #define SCM_FPE_SIGNAL 16
322 #define SCM_BUS_SIGNAL 17
323 #define SCM_SEGV_SIGNAL 18
324 #define SCM_ALRM_SIGNAL 19
325 #define SCM_GC_SIGNAL 20
326 #define SCM_TICK_SIGNAL 21
328 #define SCM_SIG_ORD(X) ((X) - SCM_HUP_SIGNAL)
329 #define SCM_ORD_SIG(X) ((X) + SCM_HUP_SIGNAL)
330 #define SCM_NUM_SIGS (SCM_SIG_ORD (SCM_TICK_SIGNAL) + 1)
340 extern struct errdesc scm_errmsgs
[];
344 /* SCM_EXIT_SUCCESS is the default code to return from SCM if no errors
345 * were encountered. SCM_EXIT_FAILURE is the default code to return from
346 * SCM if errors were encountered. The return code can be explicitly
347 * specified in a SCM program with (scm_quit <n>).
350 #ifndef SCM_EXIT_SUCCESS
352 #define SCM_EXIT_SUCCESS 1
354 #define SCM_EXIT_SUCCESS 0
356 #endif /* ndef SCM_EXIT_SUCCESS */
357 #ifndef SCM_EXIT_FAILURE
359 #define SCM_EXIT_FAILURE 2
361 #define SCM_EXIT_FAILURE 1
363 #endif /* ndef SCM_EXIT_FAILURE */