* configure.ac (GC_SETJMP_WORKS, GC_MARK_STACK): Move here from src/s.
(AH_BOTTOM): Move GC_SETJMP_WORKS GCC fallback to main body.
* src/s/aix4-2.h, src/s/freebsd.h, src/s/gnu-linux.h, src/s/hpux10-20.h:
* src/s/irix6-5.h, src/s/netbsd.h, src/s/sol2-6.h, src/s/unixware.h:
Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
+2012-07-14 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac (GC_SETJMP_WORKS, GC_MARK_STACK): Move here from src/s.
+ (AH_BOTTOM): Move GC_SETJMP_WORKS GCC fallback to main body.
+
2012-07-13 Glenn Morris <rgm@gnu.org>
* configure.ac (opsysfile): Set to empty on gnu, cygwin.
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?
+
+
dnl Used in xfaces.c.
case $opsys in
hpux* | sol2* )
#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 */
/*
+2012-07-14 Glenn Morris <rgm@gnu.org>
+
+ * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
+ * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
+ Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
+
2012-07-13 Glenn Morris <rgm@gnu.org>
* s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
/* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */
#undef sigmask
-/* Conservative garbage collection has not been tested, so for now
- play it safe and stick with the old-fashioned way of marking. */
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-/* Tell that garbage collector that setjmp is known to save all
- registers relevant for conservative garbage collection in the jmp_buf. */
-#define GC_SETJMP_WORKS 1
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-/* Tell that garbage collector that setjmp is known to save all
- registers relevant for conservative garbage collection in the jmp_buf.
- Not all the architectures are tested, but there are Debian packages
- for SCM and/or Guile on them, so the technique must work. See also
- comments in alloc.c concerning setjmp and gcc. Fixme: it's
- probably safe to just let the GCC conditional in AH_BOTTOM handle this.
-*/
-#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
- || defined __alpha__ || defined __mips__ || defined __s390__ \
- || defined __arm__ || defined __powerpc__ || defined __amd64__ \
- || defined __ia64__ || defined __sh__
-#define GC_SETJMP_WORKS 1
-#else
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
-#endif
Note we also undef HAVE_RANDOM via configure. */
#undef srandom
#undef random
-
-/* Conservative garbage collection has not been tested, so for now
- play it safe and stick with the old-fashioned way of marking. */
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
#undef TIOCSIGSEND /* defined in usg5-4-common.h */
-/* Tested on Irix 6.5. SCM worked on earlier versions. */
-#define GC_SETJMP_WORKS 1
that are handled with CPP __RENAME() macro in signal.h. */
#include <signal.h>
-/* Tell that garbage collector that setjmp is known to save all
- registers relevant for conservative garbage collection in the jmp_buf. */
-#define GC_SETJMP_WORKS 1
#include "usg5-4-common.h"
-#define GC_SETJMP_WORKS 1
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
#include "usg5-4-common.h"
-
-/* Conservative garbage collection has not been tested, so for now
- play it safe and stick with the old-fashioned way of marking. */
-#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE