+
+ irix6-5)
+ dnl Ulimit(UL_GMEMLIM) is busted...
+ AC_DEFINE(ULIMIT_BREAK_VALUE, [0x14000000])
+ ;;
+esac
+
+
+dnl These won't be used automatically yet. We also need to know, at least,
+dnl that the stack is continuous.
+AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
+ registers relevant for conservative garbage collection in the jmp_buf.])
+
+AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
+ conservative garbage collection is not known to work.])
+
+
+case $opsys in
+ aix4-2 | hpux* | unixware)
+ dnl Conservative garbage collection has not been tested, so for now
+ dnl play it safe and stick with the old-fashioned way of marking.
+ AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
+ ;;
+
+ dnl Not all the architectures are tested, but there are Debian packages
+ dnl for SCM and/or Guile on them, so the technique must work. See also
+ dnl comments in alloc.c concerning setjmp and gcc.
+ dnl Fixme: it's probably safe to just use the GCC conditional below.
+ gnu-linux | gnu-kfreebsd )
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
+ || defined __alpha__ || defined __mips__ || defined __s390__ \
+ || defined __arm__ || defined __powerpc__ || defined __amd64__ \
+ || defined __ia64__ || defined __sh__
+/* ok */
+#else
+# error "setjmp not known to work on this arch"
+#endif
+ ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1),
+ AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
+ ;;
+esac
+
+
+if test x$GCC = xyes; then
+ dnl GC_SETJMP_WORKS is nearly always appropriate for GCC.
+ AC_DEFINE(GC_SETJMP_WORKS, 1)
+else
+ case $opsys in
+ dnl irix: Tested on Irix 6.5. SCM worked on earlier versions.
+ freebsd | netbsd | openbsd | irix6-5 | sol2* )
+ AC_DEFINE(GC_SETJMP_WORKS, 1)
+ ;;
+ esac
+fi dnl GCC?
+
+
+case $opsys in
+ sol2* | unixware )
+ dnl setjmp and longjmp can safely replace _setjmp and _longjmp,
+ dnl but they will run more slowly.
+ AC_DEFINE(_setjmp, setjmp, [Some platforms redefine this.])
+ AC_DEFINE(_longjmp, longjmp, [Some platforms redefine this.])
+ dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
+ dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs,
+ dnl and this is all we need.
+ AC_DEFINE(TIOCSIGSEND, TIOCSIGNAL, [Some platforms redefine this.])
+ ;;
+esac
+
+dnl Used in process.c.
+case $opsys in
+ irix6-5 | sol2* | unixware )
+ dnl It is possible to receive SIGCHLD when there are no children
+ dnl waiting, because a previous waitsys(2) cleaned up the carcass
+ dnl of child without clearing the SIGCHLD pending info. So, use a
+ dnl non-blocking wait3 instead, which maps to waitpid(2) in SysVr4.
+ AC_DEFINE(wait3(status, options, rusage),
+ [waitpid ((pid_t) -1, (status), (options))],
+ [Some platforms redefine this.])
+ dnl FIXME this makes no sense, because WRETCODE is only used in
+ dnl process.c, which includes syswait.h aftet config.h, and the
+ dnl former unconditionally redefines WRETCODE.
+ AC_DEFINE(WRETCODE(w), [(w >> 8)], [Some platforms redefine this.])
+ ;;