aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-09-03 23:25:44 -0700
committerPaul Eggert2012-09-03 23:25:44 -0700
commit7b6c362efe6e32b6a3a68f6f827c9cc558a2fcf0 (patch)
tree09a9bc85534fcd644a627caa564463544c19934b
parent6578b4d8428cf00cd5a2f452bfc3099c95f0981a (diff)
downloademacs-7b6c362efe6e32b6a3a68f6f827c9cc558a2fcf0.tar.gz
emacs-7b6c362efe6e32b6a3a68f6f827c9cc558a2fcf0.zip
* configure.ac (_setjmp, _longjmp): Check by compiling
instead of by guessing. The guesses were wrong for recent versions of Solaris, such as Solaris 11.
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac22
2 files changed, 24 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2fb825ccdda..a6b66dbc3e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 * configure.ac (_setjmp, _longjmp): Check by compiling
4 instead of by guessing. The guesses were wrong for
5 recent versions of Solaris, such as Solaris 11.
6
12012-09-03 Paul Eggert <eggert@cs.ucla.edu> 72012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 * configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init. 9 * configure.ac (WARN_CFLAGS): Omit -Wjump-misses-init.
diff --git a/configure.ac b/configure.ac
index 77e11910553..1694c98d897 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3791,13 +3791,27 @@ else
3791 esac 3791 esac
3792fi dnl GCC? 3792fi dnl GCC?
3793 3793
3794AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
3795 [AC_LINK_IFELSE(
3796 [AC_LANG_PROGRAM(
3797 [[#include <setjmp.h>
3798 ]],
3799 [[jmp_buf j;
3800 if (! _setjmp (j))
3801 _longjmp (j, 1);]])],
3802 [emacs_cv_func__setjmp=yes],
3803 [emacs_cv_func__setjmp=no])])
3804if test $emacs_cv_func__setjmp = no; then
3805 AC_DEFINE([_setjmp], [setjmp],
3806 [Define to setjmp if _setjmp and _longjmp do not work. See _longjmp.])
3807 AC_DEFINE([_longjmp], [longjmp],
3808 [Define to longjmp if _setjmp and _longjmp do not work.
3809 Because longjmp may alter signal masks, callers of _longjmp
3810 should not assume that it leaves signal masks alone.])
3811fi
3794 3812
3795case $opsys in 3813case $opsys in
3796 sol2* | unixware ) 3814 sol2* | unixware )
3797 dnl setjmp and longjmp can safely replace _setjmp and _longjmp,
3798 dnl but they will run more slowly.
3799 AC_DEFINE(_setjmp, setjmp, [Some platforms redefine this.])
3800 AC_DEFINE(_longjmp, longjmp, [Some platforms redefine this.])
3801 dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY 3815 dnl TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
3802 dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs, 3816 dnl subprocesses the usual way. But TIOCSIGNAL does work for PTYs,
3803 dnl and this is all we need. 3817 dnl and this is all we need.