Back to index

plt-scheme  4.2.1
sconfig.h
Go to the documentation of this file.
00001 
00002 /* 
00003    Configuration for compiling MzScheme
00004 
00005    If you want to set all the flags externally (on the command line
00006    with -D or some other compiler-dependent way), then define
00007    FLAGS_ALREADY_SET, and this file will be ignored.
00008 
00009    The best flag settings are already provided for some auto-detected
00010    architecture/system/compilers. Otherwise, the default settings 
00011    are generic Unix.  Send other architecture/system/compiler-specific 
00012    info to "plt-bugs@cs.rice.edu".
00013 */
00014 
00015 #ifndef FLAGS_ALREADY_SET
00016 
00017 
00018 /******** (BEGIN KNOWN ARCHITECTURE/SYSTEM CONFIGURATIONS) ********/
00019 
00020 /* First, use configure-generated information */
00021 /*   (on Windows, this is done by a manual file which is in src/worksp) */
00022 #include "mzconfig.h"
00023 
00024   /*************** OSKit with Linux/gcc *****************/
00025 
00026 #if defined(OSKIT)
00027 
00028 # define SYSTEM_TYPE_NAME "oskit"
00029 
00030 # define DO_STACK_CHECK
00031 # ifndef OSKIT_TEST
00032 #  define OSKIT_FIXED_STACK_BOUNDS
00033 # else
00034 #  define ASSUME_FIXED_STACK_SIZE
00035 #  define FIXED_STACK_SIZE 65500
00036 # endif
00037 # define STACK_SAFETY_MARGIN 10000
00038 
00039 # define UNIX_FILE_SYSTEM
00040 # define NO_UNIX_USERS
00041 
00042 # define TIME_SYNTAX
00043 # define DIR_FUNCTION
00044 # define DIRENT_NO_NAMLEN
00045 # define GETENV_FUNCTION
00046 
00047 # ifndef OSKIT_TEST
00048 #  define HAS_FREEBSD_IOB
00049 # else
00050 #  define HAS_LINUX_IOB
00051 # endif
00052 # define USE_OSKIT_CONSOLE
00053 # define FILES_HAVE_FDS
00054 # define USE_FD_PORTS
00055 # define FIXED_FD_LIMIT 256
00056 # define USE_UNIX_SOCKETS_TCP
00057 # define USE_FCNTL_O_NONBLOCK
00058 
00059 # ifndef OSKIT_TEST
00060 #  define INCLUDE_OSKIT_SOCKET
00061 #  define MZ_PF_INET OSKIT_PF_INET
00062 #  define PROTOENT_IS_INT IPPROTO_TCP
00063 # endif
00064 
00065 # define NO_USLEEP
00066 # define NO_SLEEP
00067 # define USER_TIME_IS_CLOCK
00068 
00069 # define SIGSET_IS_SIGNAL
00070 
00071 # define UNISTD_INCLUDE
00072 
00073 # define USE_TM_GMTOFF_FIELD
00074 
00075 # define FLAGS_ALREADY_SET
00076 
00077 #else  /* >>>>>>> close after all platforms <<<<<<<<<< */
00078 
00079   /************** SunOS/Solaris with gcc ****************/
00080 
00081 #if defined(sun)
00082 
00083 # include "uconfig.h"
00084 
00085 # define USE_EXPLICT_FP_FORM_CHECK
00086 # define POW_HANDLES_INF_CORRECTLY
00087 
00088 # include <errno.h>
00089 # ifdef ECHRNG
00090 /* Solaris */
00091 #  if  defined(i386)
00092 #   define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-solaris"
00093 #  else
00094 #   define SCHEME_PLATFORM_LIBRARY_SUBPATH "sparc-solaris"
00095 #  endif
00096 #  define DIRENT_NO_NAMLEN
00097 #  define NO_USLEEP
00098 #  define USE_ULIMIT
00099 #  define USE_FCNTL_O_NONBLOCK
00100 #  define SOME_FDS_ARE_NOT_SELECTABLE
00101 #  define NEED_RESET_STDOUT_BLOCKING
00102 #  define USE_TIMEZONE_AND_ALTZONE_VAR
00103 #  define USE_NULL_TO_DISCONNECT_UDP
00104 # else
00105 /* SunOS4 */
00106 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "sparc-sunos4"
00107 # define SIGSET_IS_SIGNAL
00108 # define USE_TM_GMTOFF_FIELD
00109 # define NO_STRERROR_AVAILABLE
00110 # define USE_ON_EXIT_FOR_ATEXIT
00111 # endif
00112 
00113 #define FMOD_CAN_RETURN_POS_ZERO
00114 
00115 # ifndef i386
00116 #  define FLUSH_SPARC_REGISTER_WINDOWS
00117 # endif
00118 
00119 #ifdef i386
00120 # define MZ_USE_JIT_I386
00121 # define MZ_JIT_USE_MPROTECT
00122 #endif
00123 
00124 # define FLAGS_ALREADY_SET
00125 
00126 #endif
00127 
00128   /************** RS6000/AIX with gcc or xlc ****************/
00129 
00130 # if defined(_IBMR2)
00131 
00132 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "rs6k-aix"
00133 
00134 # include "uconfig.h"
00135 # undef USE_FCHDIR
00136 
00137 # define UNIX_LIMIT_STACK 33554944
00138 
00139 # define SELECT_INCLUDE
00140 
00141 # define POW_HANDLES_INF_CORRECTLY
00142 
00143 # define USE_FCNTL_O_NONBLOCK
00144 
00145 # define USE_TIMEZONE_VAR_W_DLS
00146 
00147 # define FLAGS_ALREADY_SET
00148 
00149 #endif
00150 
00151   /************** Linux with gcc ****************/
00152 
00153 #if defined(linux)
00154 
00155 # if defined(i386)
00156 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-linux"
00157 #  define REGISTER_POOR_MACHINE
00158 #  define ASM_DBLPREC_CONTROL_87
00159 # endif
00160 # if defined(powerpc)
00161 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "ppc-linux"
00162 # endif
00163 # if defined(__mc68000__)
00164 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "m68k-linux"
00165 # endif
00166 # if defined(mips)
00167 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "mips-linux"
00168 # endif
00169 # if defined(__alpha__)
00170 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "alpha-linux"
00171 # endif
00172 # if defined(__hppa__)
00173 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "hppa-linux"
00174 # endif
00175 # if defined(__sparc__)
00176 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "sparc-linux"
00177 #  define FLUSH_SPARC_REGISTER_WINDOWS
00178 # endif
00179 # if defined(__x86_64__)
00180 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "x86_64-linux"
00181 #  define REGISTER_POOR_MACHINE
00182 #  define ASM_DBLPREC_CONTROL_87
00183 # endif
00184 # ifndef SCHEME_PLATFORM_LIBRARY_SUBPATH
00185 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "unknown-linux"
00186 # endif
00187 
00188 # include "uconfig.h"
00189 # undef HAS_STANDARD_IOB
00190 # ifndef __ELF__
00191 #  undef UNIX_DYNAMIC_LOAD
00192 # endif
00193 
00194 # define DIRENT_NO_NAMLEN
00195 
00196 # define HAS_LINUX_IOB
00197 
00198 # define USE_IEEE_FP_PREDS
00199 # define USE_EXPLICT_FP_FORM_CHECK
00200 
00201 # define SIGSET_IS_SIGNAL
00202 # define SIGSET_NEEDS_REINSTALL
00203 
00204 # define USE_DYNAMIC_FDSET_SIZE
00205 
00206 # define USE_TIMEZONE_VAR_W_DLS
00207 
00208 # define MZ_TCP_LISTEN_IPV6_ONLY_SOCKOPT
00209 
00210 # define FLAGS_ALREADY_SET
00211 
00212 #if defined(i386)
00213 # define MZ_USE_JIT_I386
00214 # define MZ_JIT_USE_MPROTECT
00215 #endif
00216 #if defined(__x86_64__)
00217 # define MZ_USE_JIT_X86_64
00218 # define MZ_JIT_USE_MPROTECT
00219 # define MZ_USE_DWARF_LIBUNWIND
00220 #endif
00221 #if defined(powerpc)
00222 # define MZ_USE_JIT_PPC
00223 #endif
00224 
00225 #endif
00226 
00227   /********************* NetBSD ***********************/
00228 
00229 #if defined(__NetBSD__)
00230 
00231 #if defined(i386)
00232 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-netbsd"
00233 #elif defined(powerpc)
00234 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "ppc-netbsd"
00235 #elif defined(__x86_64__)
00236 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "x86_64-netbsd"
00237 #else
00238 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "netbsd"
00239 #endif
00240 
00241 # include "uconfig.h"
00242 
00243 # undef HAS_STANDARD_IOB
00244 # define HAS_BSD_IOB
00245 
00246 #ifndef __ELF__
00247 # define UNDERSCORE_DYNLOAD_SYMBOL_PREFIX
00248 #endif
00249 
00250 # define USE_IEEE_FP_PREDS
00251 # define POW_HANDLES_INF_CORRECTLY
00252 
00253 # define SIGSET_IS_SIGNAL
00254 
00255 # define USE_TM_GMTOFF_FIELD
00256 
00257 #if defined(__alpha__)
00258 # define USE_DIVIDE_MAKE_INFINITY
00259 #endif
00260 
00261 #if defined(i386)
00262 # define MZ_USE_JIT_I386
00263 # define MZ_JIT_USE_MPROTECT
00264 #endif
00265 #if defined(powerpc)
00266 # define MZ_USE_JIT_PPC
00267 #endif
00268 #if defined(__x86_64__)
00269 # define MZ_USE_JIT_X86_64
00270 # define MZ_JIT_USE_MPROTECT
00271 #endif
00272 
00273 # define FLAGS_ALREADY_SET
00274 
00275 #endif
00276 
00277   /************** x86/OpenBSD with gcc ****************/
00278               /* Thanks to Bengt Kleberg */
00279 
00280 #if defined(__OpenBSD__) && (defined(__i386__) || defined(i386) || defined(__x86_64__))
00281 
00282 # if defined(__x86_64__)
00283 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "x86_64-openbsd"
00284 # else
00285 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-openbsd"
00286 # endif
00287 
00288 # include "uconfig.h"
00289 # undef HAS_STANDARD_IOB
00290 
00291 # define HAS_BSD_IOB
00292 
00293 #ifndef __ELF__
00294 # define UNDERSCORE_DYNLOAD_SYMBOL_PREFIX
00295 #endif
00296 
00297 # define USE_IEEE_FP_PREDS
00298 # define POW_HANDLES_INF_CORRECTLY
00299 
00300 # define USE_DYNAMIC_FDSET_SIZE
00301 
00302 # define SIGSET_IS_SIGNAL
00303 
00304 # define REGISTER_POOR_MACHINE
00305 
00306 # define USE_TM_GMTOFF_FIELD
00307 
00308 #if defined(__x86_64__)
00309 # define MZ_USE_JIT_X86_64
00310 # define MZ_JIT_USE_MPROTECT
00311 #else
00312 # define MZ_USE_JIT_I386
00313 # define MZ_JIT_USE_MPROTECT
00314 #endif
00315 
00316 # define FLAGS_ALREADY_SET
00317 
00318 #endif
00319 
00320   /************** x86/FreeBSD with gcc ****************/
00321 
00322 #if defined(__FreeBSD__)
00323  
00324 # if defined(__i386__)
00325 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-freebsd"
00326 #  define REGISTER_POOR_MACHINE
00327 #  define MZ_USE_JIT_I386
00328 #  define FREEBSD_CONTROL_387
00329 # elif defined(__amd64__)
00330 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "amd64-freebsd"
00331 #  define REGISTER_POOR_MACHINE
00332 #  define MZ_USE_JIT_X86_64
00333 # elif defined(__sparc64__)
00334 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "sparc64-freebsd"
00335 #  define FLUSH_SPARC_REGISTER_WINDOWS
00336 # else
00337 #  error Unported platform.
00338 # endif
00339 
00340 # include "uconfig.h"
00341 # undef HAS_STANDARD_IOB
00342 
00343 # define HAS_BSD_IOB
00344 
00345 # ifdef FREEBSD_VERSION_2x
00346 #  define UNDERSCORE_DYNLOAD_SYMBOL_PREFIX
00347 # endif
00348 
00349 # define USE_UNDERSCORE_SETJMP
00350 
00351 # define USE_IEEE_FP_PREDS
00352 # define POW_HANDLES_INF_CORRECTLY
00353 
00354 # define USE_DYNAMIC_FDSET_SIZE
00355 
00356 # define SIGSET_IS_SIGNAL
00357 
00358 # define USE_TM_GMTOFF_FIELD
00359 
00360 # define MZ_JIT_USE_MPROTECT
00361 
00362 # define FLAGS_ALREADY_SET
00363 
00364 #endif
00365 
00366   /************** SGI/IRIX with SGI cc ****************/
00367 
00368 #if  (defined(mips) || defined(__mips)) \
00369      && !(defined(ultrix) || defined(__ultrix) || defined(linux))
00370 
00371 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "mips-irix"
00372 
00373 # include "uconfig.h"
00374 
00375 # define DIRENT_NO_NAMLEN
00376 
00377 # define BSTRING_INCLUDE
00378 
00379 # define DEFEAT_FP_COMP_OPTIMIZATION
00380 # define FMOD_CAN_RETURN_NEG_ZERO
00381 
00382 # define NO_USLEEP
00383 # define USE_FCNTL_O_NONBLOCK
00384 
00385 # define USE_TIMEZONE_AND_ALTZONE_VAR
00386 
00387 # ifdef _ABIN32
00388 #  define USE_LONG_LONG_FOR_BIGDIG
00389 # endif
00390 
00391 # define FLAGS_ALREADY_SET
00392 
00393 #endif
00394 
00395   /************** Ultrix with gcc ****************/
00396 
00397 #if defined(ultrix) || defined(__ultrix)
00398 
00399 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "mips-ultrix"
00400 
00401 # include "uconfig.h"
00402 # undef UNIX_DYNAMIC_LOAD
00403 # undef USE_FCHDIR
00404 
00405 # define DIRENT_NO_NAMLEN
00406 
00407 # define NO_USLEEP
00408 # define USE_FCNTL_O_NONBLOCK
00409 
00410 # define FLAGS_ALREADY_SET
00411 
00412 #endif
00413 
00414   /************** ALPHA/OSF1 with gcc ****************/
00415 
00416 # if (defined(__alpha) || defined(__alpha__)) && !defined(linux) && !defined(__NetBSD__)
00417 
00418 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "alpha-osf1"
00419 
00420 # include "uconfig.h"
00421 
00422 # define ALPHA_CONTROL_FP
00423 # define USE_OSF_FP_PREDS
00424 # define USE_DIVIDE_MAKE_INFINITY
00425 # define ATAN2_DOESNT_WORK_WITH_INFINITIES
00426 
00427 # define FLAGS_ALREADY_SET
00428 
00429 #endif
00430 
00431   /************** HP/UX with cc or gcc ****************/
00432 
00433 #if defined(__hpux)
00434 
00435 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "parisc-hpux"
00436 
00437 # include "uconfig.h"
00438 
00439 # define SOME_FDS_ARE_NOT_SELECTABLE
00440 # define USE_FCNTL_O_NONBLOCK
00441 
00442 # define USE_SYSCALL_GETRUSAGE
00443 
00444 # define USE_DIVIDE_MAKE_INFINITY
00445 # define USE_IEEE_FP_PREDS
00446 # define USE_EXPLICT_FP_FORM_CHECK
00447 # define ZERO_MINUS_ZERO_IS_POS_ZERO
00448 # define LOG_ZERO_ISNT_NEG_INF
00449 
00450 # define USE_ULIMIT
00451 
00452 # define USE_TIMEZONE_VAR_W_DLS
00453 
00454 # define FLAGS_ALREADY_SET
00455 
00456 #endif
00457 
00458   /************** x86/SCO Unix with gcc ****************/
00459   /* Contributed by Atanas Ivanov <nasko@noac.bg>      */
00460 
00461 #if defined(_M_XENIX) && defined(_M_SYSV)
00462 
00463 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "sco-i386"
00464 
00465 # include "uconfig.h"
00466 # undef HAS_STANDARD_IOB
00467 #ifndef __ELF__
00468 # undef UNIX_DYNAMIC_LOAD
00469 #endif
00470 
00471 # define DIRENT_NO_NAMLEN
00472 
00473 # define HAS_SCO_IOB
00474 
00475 # define USE_SCO_IEEE_FP_PREDS
00476 # define USE_EXPLICT_FP_FORM_CHECK
00477 # define USE_FCNTL_O_NONBLOCK
00478 
00479 # define REGISTER_POOR_MACHINE
00480 
00481 # define FLAGS_ALREADY_SET
00482 
00483 #endif
00484 
00485   /****************** Windows with MS Visual C ***************/
00486   /* See the "worksp" directory for more MSVC details.       */
00487 
00488 #if (defined(__BORLANDC__) \
00489      || (defined(_MSC_VER) \
00490          && (defined(__WIN32__) || defined(WIN32) || defined(_WIN32))))
00491 
00492 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "win32\\i386"
00493 
00494 # define SYSTEM_TYPE_NAME "windows"
00495 # define DOS_FILE_SYSTEM
00496 # if defined(_MSC_VER)
00497 #  define NO_READDIR
00498 #  define USE_FINDFIRST
00499 #  define NO_READLINK
00500 #  define MKDIR_NO_MODE_FLAG
00501 # endif
00502 # if defined(__BORLANDC__)
00503 #  define DIRENT_NO_NAMLEN
00504 #  define NO_READLINK
00505 #  define MKDIR_NO_MODE_FLAG
00506 # endif
00507 
00508 # define TIME_SYNTAX
00509 # define USE_FTIME
00510 # define USE_TIMEZONE_VAR_W_DLS
00511 # define WINDOWS_GET_PROCESS_TIMES
00512 # define GETENV_FUNCTION
00513 # define DIR_FUNCTION
00514 
00515 # define USE_WINDOWS_EVENT_LOG
00516 # define INIT_SYSLOG_LEVEL SCHEME_LOG_ERROR
00517 
00518 # define DO_STACK_CHECK
00519 # define WINDOWS_FIND_STACK_BOUNDS
00520 
00521 # define USE_MZ_SETJMP
00522 
00523 # define WINDOWS_DYNAMIC_LOAD
00524 
00525 #ifdef _MSC_VER
00526 # define USE_MSVC_FP_PREDS
00527 # if _MSC_VER < 1300
00528 #  define NAN_EQUALS_ANYTHING
00529 # endif
00530 # define INT64_AS_LONG_LONG
00531 # define ATAN2_DOESNT_WORK_WITH_INFINITIES
00532          /* With VC 7, ATAN2_DOESNT... wasn't needed, and
00533             POW_HANDLES_INF_CORRECTLY worked, too. */
00534 # define SIN_COS_NEED_DEOPTIMIZE
00535 #endif
00536 #ifdef __BORLANDC__
00537 # define NAN_EQUALS_ANYTHING
00538 # define ATAN2_DOESNT_WORK_WITH_INFINITIES
00539 # define ATAN2_DOESNT_WORK_WITH_NAN
00540 # define SQRT_NAN_IS_WRONG
00541 # define LOG_ZERO_ISNT_NEG_INF
00542 # define TRIG_ZERO_NEEDS_SIGN_CHECK
00543 # define NEED_TO_DEFINE_MATHERR
00544 #endif
00545 
00546 # define IO_INCLUDE
00547 # define DONT_IGNORE_PIPE_SIGNAL
00548 
00549 # define PROCESS_FUNCTION
00550 # define NO_SLEEP
00551 # define WINDOWS_PROCESSES
00552 # define WINDOWS_FILE_HANDLES
00553 # define USE_WIN32_THREAD_TIMER
00554 
00555 # define SIGSET_IS_SIGNAL
00556 # define SIGSET_NEEDS_REINSTALL
00557 
00558 #define USE_WINSOCK_TCP
00559 
00560 /* MS Visual C++ likes underscore prefixes */
00561 #if defined(_MSC_VER)
00562 # define MSC_IZE(x) _ ## x
00563 # define DIRECT_INCLUDE
00564 #endif
00565 
00566 #ifdef __BORLANDC__
00567 # define MSCBOR_IZE(x) _ ## x
00568 # define DIR_INCLUDE
00569 # define IGNORE_BY_BORLAND_CONTROL_87
00570 #endif
00571 
00572 #if defined(_MSC_VER)
00573 # define IGNORE_BY_MS_CONTROL_87
00574 #endif
00575 
00576 # define REGISTER_POOR_MACHINE
00577 
00578 # define WINDOWS_UNICODE_SUPPORT
00579 # define USE_ICONV_DLL
00580 # define NO_MBTOWC_FUNCTIONS
00581 
00582 # define MZ_USE_JIT_I386
00583 # define MZ_JIT_USE_WINDOWS_VIRTUAL_ALLOC
00584 
00585 # define FLAGS_ALREADY_SET
00586 
00587 #endif
00588 
00589   /******************** Windows with Cygwin ******************/
00590   /* See the "worksp" directory for more MSVC details.       */
00591 
00592 #if defined(__CYGWIN32__)
00593 
00594 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-cygwin"
00595 
00596 # include "uconfig.h"
00597 
00598 # undef USE_ITIMER
00599 
00600 # undef HAS_STANDARD_IOB
00601 # define HAS_CYGWIN_IOB
00602 # define MZ_BINARY O_BINARY
00603 
00604 # define DIRENT_NO_NAMLEN
00605 # define UNISTD_INCLUDE
00606 
00607 # define SIGCHILD_DOESNT_INTERRUPT_SELECT
00608 # define SIGSET_IS_SIGNAL
00609 # define SIGSET_NEEDS_REINSTALL
00610 
00611 # define CANT_SET_SOCKET_BUFSIZE
00612 # define NO_NEED_FOR_BEGINTHREAD
00613 # define USE_CREATE_PIPE
00614 
00615 # define USE_MZ_CYGWIN_SETJMP
00616 # define USE_MZ_SETJMP
00617 
00618 # define USE_CYGWIN_SO_SUFFIX
00619 
00620 # define USE_PLAIN_TIME
00621 # define USE_TOD_FOR_TIMEZONE
00622 
00623 # define USE_DIVIDE_MAKE_INFINITY
00624 
00625 # define DO_STACK_CHECK
00626 # define WINDOWS_FIND_STACK_BOUNDS
00627 
00628 # define REGISTER_POOR_MACHINE
00629 
00630 # ifndef AS_MSVC_EXTENSION
00631 #  define LINK_EXTENSIONS_BY_TABLE
00632 # endif
00633 
00634 # define MZ_USE_JIT_I386
00635 
00636 # define FLAGS_ALREADY_SET
00637 
00638 #endif
00639 
00640   /************** Mac OS X  ****************/
00641 
00642 # if defined(OS_X) || defined(XONX)
00643 
00644 #ifdef XONX 
00645 # ifdef __POWERPC__
00646 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "ppc-darwin"
00647 # else
00648 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-darwin"
00649 # endif
00650 #else
00651 # ifdef __POWERPC__
00652 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "ppc-macosx"
00653 # else
00654 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-macosx"
00655 # endif
00656 #endif
00657 
00658 # include "uconfig.h"
00659 
00660 # define INIT_SYSLOG_LEVEL SCHEME_LOG_ERROR
00661 
00662 # undef HAS_STANDARD_IOB
00663 # define HAS_BSD_IOB
00664 
00665 #ifndef XONX
00666 # undef SYSTEM_TYPE_NAME
00667 # define SYSTEM_TYPE_NAME "macosx"
00668 #endif
00669 
00670 # undef USE_ITIMER
00671 # define USE_PTHREAD_THREAD_TIMER
00672 
00673 # define USE_MAP_ANON
00674 
00675 # define USE_CARBON_FP_PREDS
00676 # define TRIG_ZERO_NEEDS_SIGN_CHECK
00677 
00678 # define USE_DYNAMIC_FDSET_SIZE
00679 
00680 # define SIGSET_IS_SIGNAL
00681 
00682 # define USE_TM_GMTOFF_FIELD
00683 
00684 # define USE_UNDERSCORE_SETJMP
00685 
00686 # define UDP_DISCONNECT_EADRNOTAVAIL_OK
00687 
00688 #ifndef XONX
00689 # define MACOS_UNICODE_SUPPORT
00690 #endif
00691 
00692 #ifndef OS_X
00693 #  define OS_X 1
00694 #endif
00695 
00696 #ifdef __POWERPC__
00697 # define MZ_USE_JIT_PPC
00698 #else
00699 # define MZ_USE_JIT_I386
00700 # define ASM_DBLPREC_CONTROL_87
00701 #endif
00702 # define MZ_JIT_USE_MPROTECT
00703 
00704 # define FLAGS_ALREADY_SET
00705 
00706 #endif
00707 
00708   /************** Darwin x86  ****************/
00709 
00710 # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__) && !defined(OS_X)
00711 
00712 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-darwin"
00713 
00714 # include "uconfig.h"
00715 
00716 # define USE_MAP_ANON
00717 
00718 # define USE_DYNAMIC_FDSET_SIZE
00719 
00720 # define SIGSET_IS_SIGNAL
00721 
00722 # define USE_TM_GMTOFF_FIELD
00723 
00724 # define USE_UNDERSCORE_SETJMP
00725 
00726 # define UDP_DISCONNECT_EADRNOTAVAIL_OK
00727 
00728 # define MZ_USE_JIT_I386
00729 
00730 # define FLAGS_ALREADY_SET
00731 
00732 # endif
00733 
00734   /************ Macintosh with CodeWarrior (not OS X) *************/
00735 
00736 #if ((defined(__MWERKS__) && !defined(__BEOS__) && !defined(__palmos__) && !defined(OS_X))  \
00737      || defined(MPW_C) || defined(MPW_CPLUS))
00738 
00739 # if defined(__POWERPC__)
00740 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "ppc-mac"
00741 # else
00742 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "68k-mac"
00743 # endif
00744 
00745 # define SYSTEM_TYPE_NAME "macos"
00746 # define MAC_FILE_SYSTEM
00747 
00748 # define NO_READDIR
00749 # define NO_READLINK
00750 # define USE_MAC_FILE_TOOLBOX
00751 
00752 # define MACINTOSH_EVENTS
00753 # define MAC_MZ_GUI_ENABLED
00754 # define MAC_CLASSIC_PROCESS_CONTROL
00755 //# define NEVER_EVER_SLEEP
00756 # define MACINTOSH_GIVE_TIME
00757 # define MACINTOSH_SIOUX
00758 
00759 # if !defined(__POWERPC__)
00760 #  define MACINTOSH_SET_STACK
00761 #  define COMPUTE_NEG_INEXACT_TO_EXACT_AS_POS
00762 #  define NAN_LT_COMPARISON_WRONG
00763 #  define SQRT_NAN_IS_WRONG
00764 #  define ATAN2_DOESNT_WORK_WITH_INFINITIES
00765 # else
00766 #  define CODEFRAGMENT_DYNAMIC_LOAD
00767 # endif
00768 
00769 # ifndef MZSCHEME_IS_CODEFRAGMENT
00770 #  define LINK_EXTENSIONS_BY_TABLE
00771 # endif
00772 
00773 # define DO_STACK_CHECK
00774 # define MACOS_FIND_STACK_BOUNDS
00775 # define STACK_SAFETY_MARGIN 10000
00776 
00777 # define TIME_SYNTAX
00778 # define USE_MACTIME
00779 # define DIR_FUNCTION
00780 # define TIME_TYPE_IS_UNSIGNED
00781 
00782 # define NO_SYS_INCLUDE_SUBDIR
00783 # define NO_SLEEP
00784 # define NO_USLEEP
00785 # define NO_STAT_PROC
00786 # define DONT_IGNORE_PIPE_SIGNAL
00787 
00788 # define POW_HANDLES_INF_CORRECTLY
00789 # define TRIG_ZERO_NEEDS_SIGN_CHECK
00790 
00791 # define MACOS_UNICODE_SUPPORT
00792 
00793 # define USE_MAC_TCP
00794 
00795 # define SIGSET_IS_SIGNAL
00796 
00797 # ifdef MPW_C
00798 #  define NO_INLINE_KEYWORD
00799 # endif
00800 
00801 # define FLAGS_ALREADY_SET
00802 
00803 #endif
00804 
00805   /************** DOS with Borland C++ ****************/
00806   /*          (Never successfully supported)          */
00807 
00808 #if defined(__BORLANDC__) && defined(__MSDOS__)
00809 
00810 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "dos\\i386"
00811 
00812 # define USE_SENORA_GC
00813 # define DOS_FAR_POINTERS
00814 # define SMALL_HASH_TABLES
00815 
00816 # define SYSTEM_TYPE_NAME "dos"
00817 # define DOS_FILE_SYSTEM
00818 # define USE_GETDISK
00819 # define DIRENT_NO_NAMLEN
00820 # define NO_READLINK
00821 # define MKDIR_NO_MODE_FLAG
00822 
00823 # define TIME_SYNTAX
00824 # define USE_FTIME
00825 # define GETENV_FUNCTION
00826 # define DIR_FUNCTION
00827 
00828 # define DO_STACK_CHECK
00829 # define USE_STACKAVAIL
00830 # define STACK_SAFETY_MARGIN 15000
00831 
00832 # define IGNORE_BY_CONTROL_87
00833 
00834 # define DIR_INCLUDE
00835 # define IO_INCLUDE
00836 # define NO_SLEEP
00837 # define DONT_IGNORE_PIPE_SIGNAL
00838 
00839 # define REGISTER_POOR_MACHINE
00840 
00841 # define FLAGS_ALREADY_SET
00842 
00843 #endif
00844 
00845   /************ PalmOS *************/
00846 
00847 #if defined(__palmos__)
00848 
00849 # define SCHEME_PLATFORM_LIBRARY_SUBPATH "68k-palm"
00850 
00851 # define SYSTEM_TYPE_NAME "palm"
00852 
00853 # define NO_FILE_SYSTEM_UTILS
00854 # define NO_TCP_SUPPORT
00855 # define MZSCHEME_SOMETHING_OMITTED
00856 
00857 # define PALMOS_STUFF
00858 # define NO_STAT_PROC
00859 # define NO_USER_BREAK_HANDLER
00860 # define NO_USLEEP
00861 
00862 # define DO_STACK_CHECK
00863 # define PALM_FIND_STACK_BOUNDS
00864 # define STACK_SAFETY_MARGIN 1000
00865 
00866 # define TIME_SYNTAX
00867 # define USE_PALMTIME
00868 # define USER_TIME_IS_CLOCK
00869 # define TIME_TYPE_IS_UNSIGNED
00870 
00871 # define DONT_IGNORE_PIPE_SIGNAL
00872 # define DONT_IGNORE_FPE_SIGNAL
00873 
00874 # define POW_HANDLES_INF_CORRECTLY
00875 # define USE_PALM_INF_TESTS
00876 
00877 # define FLAGS_ALREADY_SET
00878 
00879 #endif
00880 
00881   /***************************************************/
00882 
00883 #endif /* end not OSKit */
00884 
00885 /************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/
00886 
00887 
00888 /***** (BEGIN CONFIGURATION FLAG DESCRPTIONS AND DEFAULTS) ******/
00889 
00890 #ifndef FLAGS_ALREADY_SET
00891 
00892   /*********************/
00893  /* Operating System  */
00894 /*********************/
00895 
00896 #define SYSTEM_TYPE_NAME "unix"
00897 
00898   /* SYSTEM_TYPE_NAME must be a string; this will be converted into
00899      a symbol for the result of (system-type) */
00900 
00901   /* SCHEME_PLATFORM_LIBRARY_SUBPATH must be a string; if it is 
00902      undefined, it is automatically generated into a file named
00903      "schsys.h" into the same directory as .o files and #included
00904      by string.c. This string is returned by (system-library-subpath) */
00905 
00906   /*********************/
00907  /* Language Features */
00908 /*********************/
00909 
00910 #define TIME_SYNTAX
00911 #define PROCESS_FUNCTION
00912 #define DIR_FUNCTION
00913 #define GETENV_FUNCTION
00914 
00915  /* TIME_SYNTAX adds the (time ...) syntax; this may need to be
00916      turned off for compilation on some systems.
00917     CLOCKS_PER_SEC relates the values returned by clock() to
00918      real seconds. (The difference between two clock() calls is
00919      devided by this number.) Usually, this is defined in <time.h>;
00920      it defaults to 1000000 */
00921 
00922  /* USE_FTIME uses ftime instead of gettimeofday; only for TIME_SYNTAX */
00923  
00924  /* USE_PLAIN_TIME uses time; only for TIME_SYNTAX */
00925  
00926  /* USE_MACTIME uses the Mac toolbox to implement time functions. */
00927 
00928  /* CLOCK_IS_USER_TIME uses the system time for user milliseconds. */
00929 
00930  /* USER_TIME_IS_CLOCK uses the user time for system milliseconds. */
00931 
00932  /* TIME_TYPE_IS_UNSIGNED converts time_t values as unsigned. */
00933 
00934  /* PROCESS_FUNCTION adds (process ...) and (system ...) functions */
00935 
00936  /* DIR_FUNCTION adds (current-directory ...) function */
00937 
00938  /* GETENV_FUNCTION adds (getenv ...) function */
00939 
00940  /* USE_TIMEZONE_VAR gets timezone offset from a timezone global.
00941     USE_TOD_FOR_TIMEZONE gets timezone offset via gettimeofday.
00942     USE_TIMEZONE_VAR_W_DLS is similar, but adds 1 hour when daylight 
00943      savings is in effect.
00944     USE_TIMEZONE_AND_ALTZONE_VAR is similar, but uses altzone when
00945      daylight savings is in effect.
00946     USE_TM_GMTOFF_FIELD gets timezone offset from the tm_gmtoff field
00947      of the tm struct. */
00948  
00949 
00950   /*******************/
00951  /*   Filesystem    */
00952 /*******************/
00953 
00954 #define UNIX_FILE_SYSTEM
00955 #define EXPAND_FILENAME_TILDE
00956 
00957  /* UNIX_FILE_SYSTEM indicates that filenames are as in Unix, with
00958     forward slash separators, ".." as the parent directory, "/" 
00959     as the root directory, and case-sensitivity */
00960 
00961  /* DOS_FILE_SYSTEM indicates that filenames are as in DOS, with 
00962     slash or backward slash separators, ".." as the parent directory, 
00963     "X:\", "X:/", "\", or "/" as a root directory (for some letter X),
00964     and case insensitivity */
00965 
00966  /* MAC_FILE_SYSTEM indicates that filenames are as on the Macintosh,
00967     with colon separators, "" as the parent directory, a volume name 
00968     (followed by a colon) as a root directory, and case insensitivity. */
00969 
00970  /* EXPAND_FILENAME_TILDE expands ~ in a filename with a user's home
00971      directory. */
00972 
00973  /* NO_STAT_PROC means that there is no stat() function. */
00974 
00975  /* NO_MKDIR means that there is no mkdir() function. */
00976 
00977  /* NO_READLINK means that there is no readlink() function. */
00978 
00979  /* USE_GETDISK uses getdisk() and setdisk() to implement the
00980      filesystem-root-list primitive under DOS. */
00981 
00982  /* NO_READDIR means that there is no opendir() and readdir() for
00983      implementing directory-list. */
00984 
00985  /* DIRENT_NO_NAMLEN specifies that dirent entries do not have a
00986      d_namlen field; this is used only when NO_READDIR is not
00987      specified. */
00988      
00989  /* MKDIR_NO_MODE_FLAG specifies that mkdir() takes only one argument,
00990      instead of a directory name and mode flags. */
00991 
00992  /* USE_C_SYSLOG uses the C syslog library for logging. */
00993 
00994  /* USE_WINDOWS_EVENT_LOG uses the Windows event log API for logging. */
00995 
00996  /* INIT_SYSLOG_LEVEL sets the initial level for filtering messages
00997     sent to syslog. It default to 0 (i.e., no events). */
00998 
00999   /***********************/
01000  /*       Ports         */
01001 /***********************/
01002 
01003 /* These are flags about the implementation of char-ready? for FILE*s
01004    None of these flags are required, but char-ready? may return
01005    spurious #ts if they are set up incorrectly. */
01006 
01007 #define HAS_STANDARD_IOB
01008 #define FILES_HAVE_FDS
01009 #define USE_UNIX_SOCKETS_TCP
01010 #define CLOSE_ALL_FDS_AFTER_FORK
01011 
01012  /* HAS_STANDARD_IOB, HAS_GNU_IOB, HAS_CYGWIN_IOB, HAS_LINUX_IOB,
01013     HAS_BSD_IOB, and HAS_SCO_IOB are mutually exclusive; they describe
01014     how to read the FILE* structure to determine if there are
01015     available cached characters. */
01016 
01017  /* FILES_HAVE_FDS means that a FILE* is always associated with a
01018     file desciptor, which can be select-ed to see if there are
01019     pending bytes. Don't use this unless one of the HAS_<X>_IOB
01020     flags is used. */
01021 
01022  /* CLOSE_ALL_FDS_AFTER_FORK means that all fds except 0, 1, and 2
01023     should be closed after performing a fork() for `process'
01024     and `system' calls. */
01025 
01026  /* USE_UNIX_SOCKETS_TCP means that the tcp- procedures can be implemented
01027     with the standard Unix socket functions. */
01028 
01029  /* USE_WINSOCK_TCP means that the tcp- procedures can be implemented
01030     with the Winsock toolbox. */
01031 
01032  /* USE_MAC_TCP means that the tcp- procedures can be implemented
01033     with the Mac TCP toolbox. */
01034 
01035  /* WINDOWS_FILE_HANDLES implements file access through the Windows
01036     API (CreateFile(), ReadFile(), etc.) */
01037 
01038  /* USE_FCNTL_O_NONBLOCK uses O_NONBLOCK instead of FNDELAY for
01039     fcntl on Unix TCP sockets. (Posix systems need this flag). */
01040 
01041  /* SOME_FDS_ARE_NOT_SELECTABLE indicates that select() doesn't work
01042     for reading on all kinds of file descriptors. Such FDs must never
01043     be able to go from no-char-ready to char-ready while MzScheme is
01044     sleeping. */
01045 
01046  /* NEED_RESET_STDOUT_BLOCKING enures that file descriptors 1 and 2
01047     are reset to blocking mode before exiting. */
01048 
01049  /* USE_TRANSITIONAL_64_FILE_OPS uses fseeko64, lseek64, stat64,
01050     etc. for file operations involving sizes (that can require
01051     64-bit arithmetic). */
01052 
01053  /* USE_ULIMIT uses ulimit instead of getdtablesize (Unix). */
01054 
01055  /* USE_DYNAMIC_FDSET_SIZE allocates fd_set records based on the
01056     current fd limit instead of relying on the compile-time size
01057     of fd_set. */
01058 
01059  /* UNIX_LIMIT_FDSET_SIZE insures that the fd limit at start-up is
01060     no greater than FD_SETSIZE */
01061 
01062  /* CANT_SET_SOCKET_BUFSIZE turns off setting the buffer size for
01063     Unix TCP sockets. */
01064 
01065  /* USE_NULL_TO_DISCONNECT_UDP calls connect() with NULL instead of
01066     an AF_UNSPEC address to disconnect a UDP socket. */
01067 
01068  /* UDP_DISCONNECT_EADRNOTAVAIL_OK means that a disconnecting call
01069     to connect() might return EADDRNOTAVAIL instead of 
01070     EAFNOSUPPORT. */
01071 
01072  /* MZ_BINARY is combinaed with other flags in all calls to open();
01073     it can be defined to O_BINARY in Cygwin, for example. */
01074 
01075  /* MZ_TCP_LISTEN_IPV6_ONLY_SOCKOPT uses IPV6_V6ONLY for IPv6
01076     listeners when the same listener has an IPv4 address, which means
01077     that the IpV6 listener accepts only IPv6 connections. This is used
01078     with Linux, for example, because a port cannot have both an IPv4
01079     and IPv6 listener if the IPv6 one doesn't use IPV6_V6ONLY. (The
01080     two listeners might be for different interfaces, in which case
01081     IPV6_V6ONLY is not necessary, but we must err on the side of being
01082     too restrictive. If IPV6_V6ONLY is not #defined or if setting the
01083     option doesn't work, then the IPv6 addresses are silently ignored
01084     when creating the listener (but only where there is at least once
01085     IPv4 address). */
01086 
01087 
01088   /***********************/
01089  /* Threads & Signals  */
01090 /***********************/
01091 
01092 /* These are flags about the implementation of system, process, etc. */
01093 
01094 # define UNIX_PROCESSES
01095 # define SIGSET_IS_SIGNAL
01096 # define SIGSET_NEEDS_REINSTALL
01097 
01098  /* UNIX_PROCESSES implements the process functions for Unix; uses
01099     sigset() to install the signal handler. */
01100 
01101  /* WINDOWS_PROCESSES implements the process functions for Windows. */
01102 
01103  /* USE_ITIMER uses setitimer() to implement thread pre-emption (for
01104     MzScheme-implemented threads). Define MZ_THREAD_QUANTUM_USEC to
01105     set the base time in usec allocated to each thread. */
01106 
01107  /* USE_WIN32_THREAD_TIMER uses a background Windows thread to implement
01108     tread pre-emption. */
01109 
01110  /* USE_PTHREAD_THREAD_TIMER uses a background pthread to implement
01111     tread pre-emption. */
01112 
01113  /* SIGSET_IS_SIGNAL uses signal() in place of sigset() for Unix. This 
01114     flag is often paired with SIGSET_NEEDS_REINSTALL for traditional
01115     Unix systems. */
01116 
01117  /* SIGSET_NEEDS_REINSTALL reinstalls a signal handler when it
01118     is called to handle a signal. The expected semantics of sigset()
01119     (when this flags is not defined) is that a signal handler is NOT
01120     reset to SIG_DFL after a handler is called to handle a signal. */
01121 
01122  /* DONT_IGNORE_FPE_SIGNAL stops MzScheme from ignoring floating-point 
01123     exception signals. */
01124 
01125  /* DONT_IGNORE_PIPE_SIGNAL stops MzScheme from ignoring SIGPIPE
01126     signals. */
01127 
01128  /* USE_CREATE_PIPE uses CreatePipe() instead of _pipe() for Windows. */
01129 
01130  /* SIGCHILD_DOESNT_INTERRUPT_SELECT indicates that the SIGCHILD
01131     signal, sent when a child OS process dies, does not interrupt
01132     select(). This flag is needed for Cygwin B20. */
01133 
01134  /* USE_UNDERSCORE_SETJMP uses _setjmp() instead of setjmp() to avoid
01135     sigmal-mask work. */
01136 
01137  /* FLUSH_SPARC_REGISTER_WINDOWS uses an assembly instruction for
01138     flushing the Sparc register windows before copying the stack. */
01139 
01140   /**********************/
01141  /* Inexact Arithmetic */
01142 /**********************/
01143 
01144  /* USE_SINGLE_FLOATS turns on support for single-precision
01145     floating point numbers. Otherwise, floating point numbers
01146     are always represented in double-precision. */
01147 
01148  /* USE_SINGLE_FLOATS_AS_DEFAULT, when used with
01149     USE_SINGLE_FLOATS, causes exact->inexact coercions to
01150     use single-precision numbers as the result rather
01151     than double-precision numbers. */
01152 
01153  /* USE_INFINITY_FUNC uses infinity() to get the infinity
01154      floating-point constant instead of using HUGE_VAL. */
01155 
01156  /* USE_DIVIDE_MAKE_INFINITY creates +inf.0 by dvividing by zero
01157     instead of using HUGE_VAL. */
01158 
01159  /* USE_IEEE_FP_PREDS uses isinf() and isnan() to implement tests for
01160     infinity and not-a-number. */
01161 
01162  /* USE_OSF_FP_PREDS uses fp-class() and isnan() to implement tests for
01163     infinity and not-a-number. */
01164 
01165  /* USE_SCO_IEEE_FP_PREDS uses fpclass() and isnan() to implement tests for
01166     infinity and not-a-number. */
01167 
01168  /* USE_CARBON_FP_PREDS uses __isnand() and __isfinited() to implement tests
01169     for infinity and not-a-number. */
01170 
01171  /* USE_MSVC_FP_PREDS uses _fpclass() and _isnan() to implement tests
01172     for infinity and not-a-number. */
01173 
01174  /* DEFEAT_FP_COMP_OPTIMIZATION avoids a compiler optimization that
01175     converts (a == a) to TRUE, even if `a' is floating-point. Used
01176     only when USE_[SCO_]IEEE_FP_PREDS is not defined. */
01177 
01178  /* ASM_DBLPREC_CONTROL_87 uses inline assembly to set Intel '387
01179     floating-point operations to double-precision instead of
01180     extended-precision arithmetic. */
01181 
01182  /* IGNORE_BY_BORLAND_CONTROL_87 turns off floating-point error for
01183     Intel '387 with Borlad-style _control87. DONT_IGNORE_PIPE_SIGNAL
01184     can be on or off. */
01185 
01186  /* IGNORE_BY_MS_CONTROL_87 turns off floating-point error for Intel
01187     '387 with Microsoft-style _control87. DONT_IGNORE_PIPE_SIGNAL can
01188     be on or off. */
01189 
01190  /* LINUX_CONTROL_387 controls the floating-point processor under i386
01191     Linux using __setfpucw(). libc 6.1 doesn't export __setfpucw() and
01192     it doesn't matter; for Linux 2.0 and up, the default FP behavior
01193     is the one we want. This flag might be needed for older versions
01194     of Linux. */
01195 
01196  /* FREEBSD_CONTROL_387 controls the floating-point processor under i386
01197     FreeBSD. As for Linux, this does not appear necessary anymore. */
01198 
01199  /* APLHA_CONTROL_FP controls the floating-point processor for Alpha
01200     OSF1 */
01201 
01202  /* NAN_EQUALS_ANYTHING indicates that the compiler is broken and
01203     equality comparisons with +nan.0 always return #t. Currently
01204     used for MSVC++ */
01205     
01206  /* ZERO_MINUS_ZERO_IS_POS_ZERO indicates that something (compiler?
01207     machine? fp flags?) is broken so that 0.0 - 0.0 = 0.0 instead of
01208     -0.0. This flag doesn't fix MzScheme completely, since (- 0.0) is
01209     still 0.0, but at least it lets MzScheme read and print 0.0 and
01210     -0.0 accurately. Currently used for HP/UX. */
01211 
01212  /* NAN_LT_COMPARISON_WRONG indicates that +nan.0 is not handled correctly
01213     by < or <=. Probably the compiler implements < as !>. */
01214 
01215  /* USE_EXPLICT_FP_FORM_CHECK circumvents bugs in strtod() under Linux,
01216     SunOS/Solaris, and HP/UX by explicit pre-checking the form of the 
01217     number and looking for values that are obviously +inf.0 or -inf.0 */
01218 
01219  /* POW_HANDLES_INF_CORRECTLY inidicates that thw pow() library procedure
01220     handles +/-inf.0 correctly. Otherwise, code in inserted to specifically
01221     check for infinite arguments. */
01222     
01223  /* ATAN2_DOESNT_WORK_WITH_INFINITIES indicates that atan2(+/-inf, +/-inf)
01224     is not the same as atan2(1, 1). */ 
01225     
01226  /* ATAN2_DOESNT_WORK_WITH_NAN indicates that atan2(+nan.0, _) and
01227     atan2(_, +nan.0) don't produce +nan.0. */ 
01228     
01229  /* SQRT_NAN_IS_WRONG indicates that (sqrt +nan.0) must be forced to +nan.0
01230     (i.e., the C library function is bad). */
01231     
01232  /* COMPUTE_NEG_INEXACT_TO_EXACT_AS_POS computes inexact->exact of some
01233     negative inexact number x by computing the result for -x and negating
01234     it. Use this if (inexact->exact -0.1) is wrong. */
01235 
01236  /* TRIG_ZERO_NEEDS_SIGN_CHECK defines versions of tan, sin, atan, and
01237     asin that preserve the sign of a zero argument. */
01238 
01239  /* FMOD_CAN_RETURN_NEG_ZERO is fmod() on positive numbers can produce
01240     a negative zero. */
01241 
01242  /* FMOD_CAN_RETURN_POS_ZERO is fmod() on -0.0 can produce 0.0. */
01243 
01244  /* LOG_ZERO_ISNT_NEG_INF defines a version of log that checks for an
01245     inexact zero argument and return negative infinity. */
01246 
01247  /* NEED_TO_DEFINE_MATHERR defines _matherr to quiet warnings from the
01248     math library. */
01249 
01250  /* SIN_COS_NEED_DEOPTIMIZE disables optimization for calls to sin()
01251     and cos() (for MSVC) */
01252 
01253 /******************************/
01254  /* Byte Order and long long */
01255 /****************************/
01256 
01257  /* INT64_AS_LONG_LONG indicates that long long is not supported, but
01258     _int64 is */
01259 
01260  /* NO_LONG_LONG_TYPE indicates that long long is not supported */
01261 
01262   /***********************/
01263  /* Stack Maniuplations */
01264 /***********************/
01265 
01266 # define DO_STACK_CHECK
01267 # define UNIX_FIND_STACK_BOUNDS
01268 # define STACK_SAFETY_MARGIN 50000
01269 
01270  /* DO_STACK_CHECK checks for stack overflow during execution.
01271      Requires either UNIX_FIND_STACK_BOUNDS, USE_STACKAVAIL,
01272      MACOS_FIND_STACK_BOUNDS, or ASSUME_FIXED_STACK_SIZE. */
01273 
01274  /* UNIX_FIND_STACK_BOUNDS figures out the maximum stack position
01275      on Unix systems, using getrlimit() and the GC_find_stack_base()
01276      defined in the conservative garbage collector. But no more
01277      than UNIX_STACK_MAXIMUM bytes, if defined, will be used.
01278     USE_STACKAVIL uses stackavail() function for checking stack
01279      overflow; works with Borland C++, maybe other compilers.
01280     WINDOWS_FIND_STACK_BOUNDS figures out the maximum stack position
01281      under Windows (uses GC_find_stack_base())
01282     MACOS_FIND_STACK_BOUNDS figures out the stack limit on the Mac.
01283     ASSUME_FIXED_STACK_SIZE assumes that the main stack size is
01284      always FIXED_STACK_SIZE.
01285     Use only one of these if DO_STACK_CHECK is used, or none otherwise. */
01286 
01287  /* FIXED_STACK_SIZE <X> sets the stack size to <X> when the
01288      ASSUME_FIXED_STACK_SIZE stack-checking mode is on. */
01289 
01290  /* STACK_SAFETY_MARGIN <X> sets the number of bytes that should be
01291      available on the stack for "safety" to <X>. Used only if
01292      DO_STACK_CHECK is used. STACK_SAFETY_MARGIN defaults to 50000. */
01293 
01294  /* UNIX_LIMIT_STACK <X> limits stack usage to <X> bytes. This may
01295      be necessary to avoid GC-setup traversal over too much memory
01296      (with GC flag HEURISTIC2?). */
01297 
01298  /* OSKIT_FIXED_STACK_BOUNDS uses base_stack_start to get the hottest
01299      stack location */
01300 
01301   /***********************/
01302  /*   Dynamic Loading   */
01303 /***********************/
01304 
01305 #define UNIX_DYNAMIC_LOAD
01306 
01307  /* UNIX_DYNAMIC_LOAD implements dynamic extensions under Unix
01308      using dlopen(); you may have to add the -ldl flag in the LIBS 
01309      Makefile variable. The library doesn't exist under Linux without 
01310      ELF, so it won't work. If you get linker errors about dlopen(), etc., 
01311      this flag and the -ldl linker flag are the things to adjust.
01312     SHL_DYNAMIC_LOAD implement HP/UX dynamic loading.
01313     WINDOWS_DYNAMIC_LOAD implements dynamic extensions under Windows
01314      (Thanks to Patrick Barta).
01315     CODEFRAGMENT_DYNAMIC_LOAD implements dynamic extensions with
01316      MacOS's Code Fragment Custodian (thanks to William Ng).
01317     Use only one or none of these. */
01318 
01319  /* UNDERSCORE_DYNLOAD_SYMBOL_PREFIX with UNIX_DYNAMIC_LOAD means that
01320     an extra underscore ("_") must be placed in front of the name passed 
01321     to dlopen(). */
01322 
01323  /* LINK_EXTENSIONS_BY_TABLE specifies that the MzScheme functions
01324     used by an extension must be manually linked via a table of
01325     function pointers. Windows dynamic linking uses this method. */
01326 
01327  /* MZSCHEME_IS_CODEFRAGMENT exploits improved CFM linking when
01328     MzScheme is itself a shared library instead of embedded in
01329     an application */
01330 
01331   /***********************/
01332  /*         JIT         */
01333 /***********************/
01334 
01335  /* MZ_USE_JIT_I386 enables the JIT for x86 */
01336 
01337  /* MZ_USE_JIT_X86_65 enables the JIT for x86_64 */
01338 
01339  /* MZ_USE_JIT_PPC enables the JIT for PowerPC */
01340 
01341  /* MZ_JIT_USE_MPROTECT uses mprotect on x86 platforms to make code
01342     pages executable */
01343 
01344  /* MZ_JIT_USE_WINDOWS_VIRTUAL_ALLOC uses VirtualAlloc to make
01345     code pages executable. */
01346 
01347   /***********************/
01348  /*     Heap Images     */
01349 /***********************/
01350 
01351  /* UNIX_IMAGE_DUMPS turns on image save and restore for Unix systems. 
01352      This will only work if the final application is statically linked. 
01353      (As an exception, the dynamic-linking library itself can be 
01354      dynamically linked. This works because loading an extension in 
01355      MzScheme automatically turns off image saving.) */
01356 
01357   /*****************************/
01358  /*   Macintosh Standalone    */
01359 /*****************************/
01360 
01361  /* MACINTOSH_EVENTS enables specific support for Mac Classic */
01362  
01363  /* MAC_MZ_GUI_ENABLED activates the windowed I/O code (use under classic) 
01364      (should maybe use MACINTOSH_SIOUX instead?) */
01365 
01366  /* MAC_CLASSIC_PROCESS_CONTROL swaps the UNIX process commands for the 
01367     mac family (use under classic) */
01368 
01369  /* OS_X enables specific support for Mac OS X, e.g. the location of the
01370     prefs directory */
01371  
01372  /* MACINTOSH_GIVE_TIME lets background processes run when checking for
01373      a user break */
01374 
01375  /* MACINTOSH_SIOUX interfaces with Metrowerks's SIOUX library */
01376 
01377  /* MACINTOSH_SET_STACK sets the stack to be 1/4 of the heap; this should
01378      be used for 68k machines, where the stack is not user-configurable */
01379 
01380   /***********************/
01381  /*    Miscellaneous    */
01382 /***********************/
01383 
01384 #define UNISTD_INCLUDE
01385 
01386  /* USE_MAP_ANON indicates that mmap should use BSD's MAP_ANON flag
01387     rather than trying to open /dev/zero */
01388 
01389  /* REGISTER_POOR_MACHINE guides a hand optimization that seems to
01390     be work best one way for Sparc machines, and better the other
01391     way for x86 machines. */
01392 
01393  /* USE_LONG_LONG_FOR_BIGDIG indicates that `long long' is available
01394     and 64 bits wide. (Don't use when `long' is 64 bits wide). */
01395 
01396  /* MACOS_UNICODE_SUPPORT and WINDOWS_UNICODE_SUPPORT indicate that
01397     platform-native functions should be used for string comparisons
01398     in the default locale. */
01399 
01400  /* USE_ICONV_DLL loads iconv.dll lazily for string conversion; no
01401     headers necessary. */
01402 
01403  /* NO_MBTOWC_FUNCTIONS indicates that locale-to-wchar conversion
01404     functions are not available. */
01405 
01406  /* NO_INLINE_KEYWORD indicates that the C compiler doesn't recognize
01407     C's `inline' keyword. */
01408 
01409  /* NO_USER_BREAK_HANDLER turns off handling of INT signal in main.c */
01410 
01411  /* DIR_INCLUDE if there's a <dir.h> file (mainly for Windows). */
01412 
01413  /* DIRECT_INCLUDE if there's a <direct.h> file (mainly for Windows). */
01414 
01415  /* IO_INCLUDE if there's a <io.h> file (mainly for Windows). */
01416 
01417  /* UNISTD_INCLUDE if there's a <unistd.h> file (mainly for Unix). */
01418 
01419  /* SELECT_INCLUDE if there's a <sys/select.h> file (mainly for Unix) 
01420      to be used with FILES_HAVE_FDS. */
01421 
01422  /* BSTRING_INCLUDE if there's a <bstring.h> file (mainly for Unix) 
01423      to be used with FILES_HAVE_FDS. */
01424 
01425  /* NO_SYS_INCLUDE_SUBDIR if include files should all be <XXX.h>; no
01426      includes of the form <sys/XXX.h>. Mainly used for <sys/stat.h>
01427      for MacOS. */
01428 
01429  /* USE_FCHDIR uses fchdir() to improve thread context switches when
01430     a small number of threads are active. */
01431 
01432  /* USE_GETRUSAGE uses getrusage() to for timing info; otherwise clock()
01433     is used. */
01434 
01435  /* USE_SYSCALL_GETRUSAGE uses syscall() to implement getrusage() for
01436     timing info. Used with USE_GETRUSAGE. */
01437 
01438  /* NO_SLEEP means that there is no sleep() function. Used only in
01439     standalone MzScheme. */
01440 
01441  /* NO_USLEEP means that there is no usleep() function. Used only in 
01442     standalone MzScheme. Used only if NO_SLEEP is undefined. */
01443 
01444  /* NO_STRERROR_AVAILABLE means that strerror() is not available. */
01445 
01446  /* USE_ON_EXIT_FOR_ATEXIT means that a SunOS4-style on_exit()
01447     is available instead of atexit(). */
01448 
01449  /* NO_NEED_FOR_BEGINTHREAD indicates that the C library used for
01450     Windows is always thread-ready and there's no need use the
01451     _beginthreadex() function instead of CreateThread(). */
01452 
01453  /* WIN32S_HACK uses a special hack to implement threads under Win32s
01454     with some compilers. Obsolete. */
01455 
01456 #endif  /* FLAGS_ALREADY_SET */
01457 
01458 /****** (END CONFIGURATION FLAG DESCRPTIONS AND DEFAULTS) *******/
01459 
01460 #endif  /* FLAGS_ALREADY_SET */