\f
/* {Unsupported Options}
*
- * These must be defined.
+ * These must be defined as given here.
*/
#define CCLO
-#define SICP
+
+/* Guile Scheme supports the #f/() distinction; Guile Lisp won't. We
+ have horrible plans for their unification. */
+#undef SICP
\f
-/* Random options (net yet supported or in final form). */
+/* Random options (not yet supported or in final form). */
-#undef DEBUG_EXTENSIONS
-#undef READER_EXTENSIONS
-#undef SCM_STACK_LIMIT 20000
-#undef NO_CEVAL_STACK_CHECK
+#define STACK_CHECKING
+#undef NO_CEVAL_STACK_CHECKING
#undef LONGLONGS
/* Some auto-generated .h files contain unused prototypes
\f
/* What did the configure script discover about the outside world? */
-#include <scmconfig.h>
+#include "libguile/scmconfig.h"
\f
/* Write prototype declarations like this:
- int foo PROTO(int a, int b);
+ int foo SCM_P ((int a, int b));
At definitions, use K&R style declarations, but make sure there's a
declarative prototype (as above) in scope. This will give you
argument type checking, when available, and be harmless otherwise. */
#ifdef __STDC__
-# define PROTO(x) x
+# define SCM_P(x) x
#else
-# define PROTO(x) (x)
+# define SCM_P(x) ()
#endif
\f
/* Define
*
- * SCM_CHAR_SCM_CODE_LIMIT == UCHAR_MAX + 1
+ * SCM_CHAR_CODE_LIMIT == UCHAR_MAX + 1
* SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
* SCM_MOST_NEGATIVE_FIXNUM == SCM_SRS((long)LONG_MIN, 2)
*/
#ifdef HAVE_LIMITS_H
# include <limits.h>
# ifdef UCHAR_MAX
-# define SCM_CHAR_SCM_CODE_LIMIT (UCHAR_MAX+1L)
+# define SCM_CHAR_CODE_LIMIT (UCHAR_MAX+1L)
# else
-# define SCM_CHAR_SCM_CODE_LIMIT 256L
+# define SCM_CHAR_CODE_LIMIT 256L
# endif /* def UCHAR_MAX */
# define SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
# ifdef _UNICOS /* Stupid cray bug */
# define SCM_MOST_NEGATIVE_FIXNUM SCM_SRS((long)LONG_MIN, 2)
# endif /* UNICOS */
#else
-# define SCM_CHAR_SCM_CODE_LIMIT 256L
+# define SCM_CHAR_CODE_LIMIT 256L
# define SCM_MOST_POSITIVE_FIXNUM ((long)((unsigned long)~0L>>3))
# if (0 != ~0)
# define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
#endif /* def HAVE_LIMITS_H */
\f
-#include "tags.h"
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# ifdef AMIGA
+# include <stddef.h>
+# endif /* def AMIGA */
+# define scm_sizet size_t
+#else
+# ifdef _SIZE_T
+# define scm_sizet size_t
+# else
+# define scm_sizet unsigned int
+# endif /* def _SIZE_T */
+#endif /* def STDC_HEADERS */
+
+\f
+
+#include "libguile/tags.h"
\f
#ifdef vms
#endif
\f
+#ifndef USE_THREADS
+#define SCM_THREAD_DEFER
+#define SCM_THREAD_ALLOW
+#define SCM_THREAD_REDEFER
+#define SCM_THREAD_REALLOW_1
+#define SCM_THREAD_REALLOW_2
+#define SCM_THREAD_SWITCHING_CODE
+#endif
+
extern unsigned int scm_async_clock;
-#define SCM_ASYNC_TICK if (0 == --scm_async_clock) scm_async_click ()
+#if 0
+#define SCM_ASYNC_TICK \
+{ \
+ if (0 == --scm_async_clock) \
+ scm_async_click (); \
+} \
+
+#else
+#define SCM_ASYNC_TICK \
+{ \
+ if (0 == --scm_async_clock) \
+ scm_async_click (); \
+ SCM_THREAD_SWITCHING_CODE; \
+} \
+
+#endif
#ifdef SCM_CAREFUL_INTS
#define SCM_CHECK_NOT_DISABLED \
#define SCM_DEFER_INTS \
{ \
SCM_CHECK_NOT_DISABLED; \
+ SCM_THREAD_DEFER; \
scm_ints_disabled = 1; \
} \
#define SCM_ALLOW_INTS_ONLY \
{ \
+ SCM_THREAD_ALLOW; \
scm_ints_disabled = 0; \
} \
#define SCM_ALLOW_INTS \
{ \
SCM_CHECK_NOT_ENABLED; \
+ SCM_THREAD_ALLOW; \
scm_ints_disabled = 0; \
SCM_ASYNC_TICK; \
} \
#define SCM_REDEFER_INTS \
{ \
+ SCM_THREAD_REDEFER; \
++scm_ints_disabled; \
} \
#define SCM_REALLOW_INTS \
{ \
+ SCM_THREAD_REALLOW_1; \
--scm_ints_disabled; \
if (!scm_ints_disabled) \
- SCM_ASYNC_TICK; \
+ { \
+ SCM_THREAD_REALLOW_2; \
+ SCM_ASYNC_TICK; \
+ } \
} \
goto _label
#endif
-#define SCM_SYSERROR(_subr) \
- scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
- strerror (errno), _subr)
-
- /* equivalent to:
- scm_throw (system_error_sym, \
- scm_listify (scm_makfrom0str (strerror (errno)), \
- scm_makfrom0str (_subr), \
- SCM_UNDEFINED));
- */
-#ifdef ENOSYS
-# define SCM_SYSMISSING(_subr) \
- scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
- strerror (ENOSYS), _subr)
-#else
-# define SCM_SYSMISSING(_subr) \
- scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
- "missing function", _subr)
-#endif
#define SCM_ARGn 0
#define SCM_ARG1 1
#define SCM_ARG2 2
#define SCM_ARG4 4
#define SCM_ARG5 5
#define SCM_ARG6 6
-#define SCM_ARG7 7
-#define SCM_ARGERR(X) ((X) < SCM_WNA \
+#define SCM_ARG7 7
+ /* #define SCM_ARGERR(X) ((X) < SCM_WNA \
? (char *)(X) \
: "wrong type argument")
+ */
/* Following must match entry indexes in scm_errmsgs[].
* Also, SCM_WNA must follow the last SCM_ARGn in sequence.
*/
#define SCM_WNA 8
-#define SCM_OVSCM_FLOW 9
+ /* #define SCM_OVSCM_FLOW 9 */
#define SCM_OUTOFRANGE 10
#define SCM_NALLOC 11
-#define SCM_STACK_SCM_OVSCM_FLOW 12
-#define SCM_EXIT 13
+ /* #define SCM_STACK_OVFLOW 12 */
+ /* #define SCM_EXIT 13 */
/* (...still matching scm_errmsgs) These
#define SCM_ORD_SIG(X) ((X) + SCM_HUP_SIGNAL)
#define SCM_NUM_SIGS (SCM_SIG_ORD (SCM_TICK_SIGNAL) + 1)
+#if 0
struct errdesc
{
char *msg;
extern struct errdesc scm_errmsgs[];
+#endif
\f
\f
-#ifdef __STDC__
-
-#else /* STDC */
-
-#endif /* STDC */
-
#endif /* __SCMH */