diff options
Diffstat (limited to 'scmfig.h')
-rw-r--r-- | scmfig.h | 326 |
1 files changed, 175 insertions, 151 deletions
@@ -42,38 +42,20 @@ /* "scmfig.h" system-dependent configuration. Author: Aubrey Jaffer */ -#ifdef HAVE_CONFIG_H -# include "scmconfig.h" -# ifdef HAVE_STRING_H -# include <string.h> -# else -# include <strings.h> -# endif - -# ifndef HAVE_GETCWD -# define getcwd(S,L) getwd(S) -# endif - -# ifdef __amigados__ -# define STDC_HEADERS -# endif - -#else /* HAVE_CONFIG_H */ - -# ifdef sequent -# include <strings.h> -# define strchr index -# define strrchr rindex -# else -# include <string.h> -# endif +#ifdef sequent +# include <strings.h> +# define strchr index +# define strrchr rindex +#else +# include <string.h> +#endif -# include "scmflags.h" /* user specified, system independent flags */ +#include "scmflags.h" /* user specified, system independent flags */ /* IMPLINIT is the full pathname (surrounded by double quotes) of Init.scm, the Scheme initialization code. This is best defined in - the makefile, if possible. If available, scm uses the value of - environment variable SCM_INIT_PATH instead of IMPLINIT. */ + the makefile. If available, scm uses the value of environment + variable SCM_INIT_PATH instead of IMPLINIT. */ /* #define IMPLINIT "/usr/jaffer/scm/Init.scm" */ @@ -109,28 +91,28 @@ rgx.c init_rgx(); regcomp and regexec. */ /* Define SINGLES if you want single precision floats and (sizeof(float)==sizeof(long)) */ -# ifdef FLOATS -# define SINGLES -# endif +#ifdef FLOATS +# define SINGLES +#endif /* #define SINGLESONLY */ /* Define CDR_DOUBLES if (sizeof(double)==sizeof(long)), i.e. a `single' is really a double. */ -# ifdef FLOATS -# ifdef __alpha -# define CDR_DOUBLES -# endif +#ifdef FLOATS +# ifdef __alpha +# define CDR_DOUBLES +# endif -# ifdef _UNICOS /* doubles are no better than singles on Cray. */ -# define SINGLESONLY -# endif +# ifdef _UNICOS /* doubles are no better than singles on Cray. */ +# define SINGLESONLY +# endif -# ifdef CDR_DOUBLES -# define SINGLES -# define SINGLESONLY -# endif +# ifdef CDR_DOUBLES +# define SINGLES +# define SINGLESONLY # endif +#endif /* #define ENGNOT */ @@ -149,27 +131,27 @@ rgx.c init_rgx(); regcomp and regexec. */ /* Define HAVE_DYNL if dynamic linking is available */ -# ifdef DLD -# define HAVE_DYNL -# endif -# ifdef SUN_DL -# define HAVE_DYNL -# endif -# ifdef HP_SHL -# define HAVE_DYNL -# endif +#ifdef DLD +# define HAVE_DYNL +#endif +#ifdef SUN_DL +# define HAVE_DYNL +#endif +#ifdef HP_SHL +# define HAVE_DYNL +#endif -# ifdef HAVE_DYNL -# define CCLO -# endif +#ifdef HAVE_DYNL +# define CCLO +#endif /* Define GC_FREE_SEGMENTS if you want segments of unused heap to be freed up after garbage collection. Don't define it if you never want the heap to shrink. */ -# ifndef DONT_GC_FREE_SEGMENTS -# define GC_FREE_SEGMENTS -# endif +#ifndef DONT_GC_FREE_SEGMENTS +# define GC_FREE_SEGMENTS +#endif /* #define CHEAP_CONTINUATIONS */ @@ -204,103 +186,121 @@ rgx.c init_rgx(); regcomp and regexec. */ ANSI C. For most modern systems this is the case. */ /* added by Yasuaki Honda */ -# ifdef THINK_C -# define __STDC__ +#ifdef THINK_C +# define __STDC__ +# ifndef macintosh +# define macintosh # endif +#endif +/* added by Bob Schumaker, cobblers@netcom.com */ +#ifdef __MWERKS__ +# ifndef macintosh +# define macintosh +# endif +# define bzero(p, n) memset(p, 0, n) +# define bcopy memcpy +#endif /* added by Denys Duchier */ -# ifndef SVR4 -# ifdef __svr4__ -# define SVR4 -# endif +#ifndef SVR4 +# ifdef __svr4__ +# define SVR4 # endif +#endif -# ifdef __STDC__ -# ifndef __HIGHC__ /* overly fussy compiler */ -# define USE_ANSI_PROTOTYPES -# endif -# ifndef __GNUC__ -# define STDC_HEADERS +#ifdef __STDC__ +# ifndef __HIGHC__ /* overly fussy compiler */ +# define USE_ANSI_PROTOTYPES +# endif +# ifndef __GNUC__ +# define STDC_HEADERS +# else +# ifdef sparc +# ifdef SVR4 +# define STDC_HEADERS +# endif # else -# ifdef sparc -# ifdef SVR4 +# ifndef tahoe +# ifndef sun # define STDC_HEADERS # endif -# else -# ifndef tahoe -# ifndef sun -# define STDC_HEADERS -# endif -# endif # endif # endif # endif -# ifdef MSDOS /* Microsoft C 5.10 and 6.00A */ -# ifndef GO32 -# define SHORT_INT -# endif -# endif -# ifdef _QC -# define SHORT_INT -# endif -# ifdef __TURBOC__ +#endif +#ifdef MSDOS /* Microsoft C 5.10 and 6.00A */ +# ifndef GO32 # define SHORT_INT -# ifndef __TOS__ -# define MSDOS -# endif # endif -# ifdef _WIN32 -# define MSDOS -# define LACK_TIMES -# endif -# ifdef _MSDOS +#endif +#ifdef _QC +# define SHORT_INT +#endif +#ifdef __TURBOC__ +# define SHORT_INT +# define LACK_SBRK +# ifndef __TOS__ # define MSDOS # endif -# ifdef MSDOS -# define STDC_HEADERS -# endif -# ifdef vms -# define STDC_HEADERS -# endif -# ifdef nosve -# define STDC_HEADERS -# endif +#endif +#ifdef __HIGHC__ +# define LACK_SBRK +#endif +#ifdef _WIN32 +# define MSDOS +# define LACK_TIMES +#endif +#ifdef _MSDOS +# define MSDOS +#endif +#ifdef MSDOS +# define STDC_HEADERS +#endif +#ifdef vms +# define STDC_HEADERS +#endif +#ifdef nosve +# define STDC_HEADERS +#endif -# ifdef linux -# define HAVE_SELECT -# define HAVE_SYS_TIME_H -# undef STDC_HEADERS -# endif +#ifdef linux +# define HAVE_SELECT +# define HAVE_SYS_TIME_H +# define STDC_HEADERS +#endif -# ifdef _UNICOS -# define STDC_HEADERS -# endif +#ifdef _UNICOS +# define STDC_HEADERS +#endif -# ifdef _AIX -# define _POSIX_SOURCE -# define LACK_FTIME -# endif +#ifdef _AIX +# define _POSIX_SOURCE +# define LACK_FTIME +#endif -# ifdef __sgi__ -# define LACK_FTIME -# define STDC_HEADERS -# define USE_ANSI_PROTOTYPES -# define HAVE_SELECT -# define HAVE_SYS_TIME_H -# define __svr4__ -# endif +#ifdef __sgi__ +# define LACK_FTIME +# define STDC_HEADERS +# define USE_ANSI_PROTOTYPES +# define HAVE_SELECT +# define HAVE_SYS_TIME_H +# define __svr4__ +#endif -# ifdef hpux -# define LACK_E_IDs -# endif +#ifdef hpux +# define LACK_E_IDs +#endif /* C-Set++ for OS/2 */ -# ifdef __IBMC__ -# define STDC_HEADERS -# define LACK_TIMES -# endif +#ifdef __IBMC__ +# define STDC_HEADERS +# define LACK_TIMES +#endif -#endif /* HAVE_CONFIG_H */ +#ifdef __CYGWIN32__ +# define LACK_FTIME +# undef MSDOS +#endif /* PROMPT is the prompt string printed at top level */ @@ -330,15 +330,6 @@ rgx.c init_rgx(); regcomp and regexec. */ # define WHITE_SPACES ' ':case '\t':case '\r':case '\f' #endif -/* NUM_HASH_BUCKETS is the number of symbol hash table buckets. */ - -#define NUM_HASH_BUCKETS 137 - -/* If fewer than MIN_GC_YIELD cells are recovered during a garbage - collection (GC) more space is allocated for the heap. */ - -#define MIN_GC_YIELD (heap_size/4) - /* Define BIGDIG to an integer type whose size is smaller than long if you want bignums. BIGRAD is one greater than the biggest BIGDIG. */ /* Define DIGSTOOBIG if the digits equivalent to a long won't fit in a long. */ @@ -375,6 +366,7 @@ rgx.c init_rgx(); regcomp and regexec. */ #endif #ifdef NON_PREEMPTIVE +# define VERIFY_INTS(s1, s2) /**/ # define DEFER_INTS /**/ # ifdef TICKS # define POLL {if (0==poll_count--) poll_routine(); \ @@ -384,22 +376,42 @@ rgx.c init_rgx(); regcomp and regexec. */ # endif # define CHECK_INTS POLL # define ALLOW_INTS POLL +# define DEFER_INTS_EGC /**/ +# define ALLOW_INTS_EGC /**/ #else # ifdef CAREFUL_INTS +typedef struct {char *fname; long linum;} ints_infot; +extern ints_infot *ints_info; +# define VERIFY_INTS(s1, s2) {if (!ints_disabled)\ + ints_warn(s1, s2, __FILE__,__LINE__); } # define DEFER_INTS \ -{FENCE;if (ints_disabled) ints_viol(!0);else ints_disabled = !0;FENCE;} + {static ints_infot info = {__FILE__, __LINE__};\ + FENCE;if (1==ints_disabled) ints_viol(&info, 1);\ + else {ints_info = &info; ints_disabled = 1;FENCE;}} # define ALLOW_INTS \ -{FENCE;if (!ints_disabled) ints_viol(0);else ints_disabled = 0;FENCE;CHECK_INTS} + {static ints_infot info = {__FILE__, __LINE__};\ + FENCE;if (1!=ints_disabled) ints_viol(&info, 0);\ + else {ints_info = &info; ints_disabled = 0;FENCE;CHECK_INTS}} +# define DEFER_INTS_EGC \ + {static ints_infot info = {__FILE__, __LINE__};\ + FENCE;if (1==ints_disabled) ints_viol(&info, 1);\ + else {ints_info = &info; ints_disabled = 2;FENCE;}} +# define ALLOW_INTS_EGC \ + {static ints_infot info = {__FILE__, __LINE__};\ + FENCE;if (1==ints_disabled) ints_viol(&info, 0);\ + else {ints_info = &info; ints_disabled = 0;FENCE;CHECK_INTS}} # else -# define DEFER_INTS {FENCE;ints_disabled = !0;FENCE;} +# define VERIFY_INTS(s1, s2) /**/ +# define DEFER_INTS {FENCE;ints_disabled = 1;FENCE;} # define ALLOW_INTS {FENCE;ints_disabled = 0;FENCE;CHECK_INTS} +# define DEFER_INTS_EGC {FENCE;ints_disabled = 2;FENCE;} +# define ALLOW_INTS_EGC {FENCE;ints_disabled = 0;FENCE;CHECK_INTS} # endif # ifdef TICKS -# define CHECK_INTS {if (sig_deferred) han_sig();if (alrm_deferred) han_alrm();\ - POLL;} +# define CHECK_INTS {if (deferred_proc) (*deferred_proc)(); POLL;} # define POLL {if (0==tick_count--) tick_signal();} # else -# define CHECK_INTS {if (sig_deferred) han_sig();if (alrm_deferred) han_alrm();} +# define CHECK_INTS {if (deferred_proc) (*deferred_proc)();} # define POLL /**/ # endif #endif @@ -535,7 +547,9 @@ rgx.c init_rgx(); regcomp and regexec. */ #ifdef FLOATS # ifdef STDC_HEADERS # ifndef GO32 -# include <float.h> +# ifndef macintosh +# include <float.h> +# endif # endif # endif # ifdef DBL_MAX_10_EXP @@ -568,7 +582,7 @@ rgx.c init_rgx(); regcomp and regexec. */ # define IS_INF(x) ((x)==(x)/2) #endif -#ifndef THINK_C +#ifndef macintosh # ifdef __WINDOWS__ /* there should be a better flag for this. */ # define PROT386 # endif @@ -613,6 +627,10 @@ typedef SCM *SCMPTR; # endif #endif +#ifdef macintosh +# include <unistd.h> +#endif + /* On VMS, GNU C's errno.h contains a special hack to get link attributes for errno correct for linking to the C RTL. */ @@ -673,13 +691,19 @@ typedef SCM *SCMPTR; # endif #endif -/* Yasuaki Honda */ -/* Think C lacks isascii macro */ -#ifdef THINK_C +/* Yasuaki Honda, Bob Schumaker */ +/* Think C and Metrowerks lack isascii macro */ +#ifdef macintosh # define isascii(c) ((unsigned)(c) <= 0x7f) #endif #ifdef _DCC # define isascii(c) ((unsigned)(c) <= 0x7f) #endif +#ifdef __STDC__ +# define VOLATILE volatile +#else +# define VOLATILE /**/ +#endif + /* end of automatic C pre-processor definitions */ |