/* Define this to check for short string overrun. */
#undef GC_CHECK_STRING_OVERRUN
+/* Mark a secondary stack, like the register stack on the ia64. */
+#undef GC_MARK_SECONDARY_STACK
+
+/* Define to GC_USE_GCPROS_AS_BEFORE if conservative garbage collection is not
+ known to work. */
+#undef GC_MARK_STACK
+
+/* Define if setjmp is known to save all registers relevant for conservative
+ garbage collection in the jmp_buf. */
+#undef GC_SETJMP_WORKS
+
/* Define to 1 if the `getpgrp' function requires zero arguments. */
#undef GETPGRP_VOID
/* Define if process.c:child_setup should not call setpgrp. */
#undef SETPGRP_RELEASES_CTTY
+/* How to set up a slave PTY, if needed. */
+#undef SETUP_SLAVE_PTY
+
/* Make process_send_signal work by "typing" a signal character on the pty. */
#undef SIGNALS_VIA_CHARACTERS
#undef noinline
#endif
-/* These won't be used automatically yet. We also need to know, at least,
- that the stack is continuous. */
-#ifdef __GNUC__
-# ifndef GC_SETJMP_WORKS
- /* GC_SETJMP_WORKS is nearly always appropriate for GCC. */
-# define GC_SETJMP_WORKS 1
-# endif
-#endif
-
#endif /* EMACS_CONFIG_H */
/*
;;
sol2* )
- $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
+ $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
- $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
+ ;;
- $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
+ unixware )
+ $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
;;
+esac
+
- unixware )
- $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
+case $opsys in
+ sol2* | unixware )
+ $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
$as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
- $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
+
+$as_echo "#define SETUP_SLAVE_PTY if (ioctl (xforkin, I_PUSH, \"ptem\") == -1) fatal (\"ioctl I_PUSH ptem\"); if (ioctl (xforkin, I_PUSH, \"ldterm\") == -1) fatal (\"ioctl I_PUSH ldterm\"); if (ioctl (xforkin, I_PUSH, \"ttcompat\") == -1) fatal (\"ioctl I_PUSH ttcompat\");" >>confdefs.h
;;
esac
if ac_fn_c_try_cpp "$LINENO"; then :
$as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef __ia64__
+# error "not ia64"
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+$as_echo "#define GC_MARK_SECONDARY_STACK() do { extern void *__libc_ia64_register_backing_store_base; __builtin_ia64_flushrs (); mark_memory (__libc_ia64_register_backing_store_base, __builtin_ia64_bsp ());} while (0)" >>confdefs.h
+
fi
rm -f conftest.err conftest.$ac_ext
;;
esac
+
+
+
+
+
+case $opsys in
+ aix4-2 | hpux* | unixware)
+ $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
+
+ ;;
+
+ gnu-linux | gnu-kfreebsd )
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#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
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
+
+else
+ $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
+
+fi
+rm -f conftest.err conftest.$ac_ext
+ ;;
+esac
+
+
+if test x$GCC = xyes; then
+ $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
+
+else
+ case $opsys in
+ freebsd | netbsd | openbsd | irix6-5 | sol2* )
+ $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
+
+ ;;
+ esac
+fi
+
case $opsys in
hpux* | sol2* )