]> git.eshelyaron.com Git - emacs.git/commitdiff
Port better to POSIX hosts lacking _setjmp.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Sep 2012 07:06:56 +0000 (00:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Sep 2012 07:06:56 +0000 (00:06 -0700)
* configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
(_setjmp, _longjmp): Remove.
* src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
All instances of '#include <setjmp.h>' removed, if the
only reason for the instance was because "lisp.h" was included.
(sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
and _longjmp with the new symbols.  Emacs already uses _setjmp if
available, so this change affects only POSIXish hosts that have
sigsetjmp but not _setjmp, such as some versions of Solaris and
Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
* src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
(png_load_body) [HAVE_PNG]:
(PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
(PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
since PNG requires jmp_buf.  This is the only exception to the
general rule that we now use sys_setjmp and sys_longjmp.
This exception is OK since this code does not change the signal
mask or longjmp out of a signal handler.

Fixes: debbugs:12446
100 files changed:
ChangeLog
configure.ac
src/ChangeLog
src/alloc.c
src/atimer.c
src/bidi.c
src/buffer.c
src/bytecode.c
src/callint.c
src/callproc.c
src/casefiddle.c
src/casetab.c
src/category.c
src/ccl.c
src/character.c
src/charset.c
src/chartab.c
src/cm.c
src/cmds.c
src/coding.c
src/composite.c
src/data.c
src/dbusbind.c
src/dired.c
src/dispnew.c
src/doc.c
src/doprnt.c
src/dosfns.c
src/editfns.c
src/emacs.c
src/emacsgtkfixed.c
src/eval.c
src/fileio.c
src/filelock.c
src/floatfns.c
src/fns.c
src/font.c
src/fontset.c
src/frame.c
src/fringe.c
src/ftfont.c
src/ftxfont.c
src/gnutls.c
src/gtkutil.c
src/image.c
src/indent.c
src/insdel.c
src/intervals.c
src/keyboard.c
src/keymap.c
src/lisp.h
src/lread.c
src/macros.c
src/marker.c
src/menu.c
src/minibuf.c
src/nsfns.m
src/nsfont.m
src/nsimage.m
src/nsmenu.m
src/nsselect.m
src/nsterm.m
src/print.c
src/process.c
src/ralloc.c
src/regex.c
src/region-cache.c
src/scroll.c
src/search.c
src/sheap.c
src/sound.c
src/syntax.c
src/sysdep.c
src/term.c
src/termcap.c
src/terminal.c
src/terminfo.c
src/textprop.c
src/tparam.c
src/undo.c
src/unexaix.c
src/unexcoff.c
src/unexcw.c
src/unexsol.c
src/vm-limit.c
src/widget.c
src/window.c
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xfont.c
src/xftfont.c
src/xgselect.c
src/xmenu.c
src/xml.c
src/xrdb.c
src/xselect.c
src/xsettings.c
src/xsmfns.c
src/xterm.c

index 3e662edb6bc9c133fe51d94f15786c85adf8405c..8dfe5f2746b6129b74e387c89b06444a46ac6b2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port better to POSIX hosts lacking _setjmp (Bug#12446).
+       * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
+       (_setjmp, _longjmp): Remove.
+
 2012-09-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        * configure.ac (--without-sync-input): Fix typo in usage message.
index 382e62a97a1fac2b247bb3ecb95aefd403fc8b3b..f810c839587307793878aef42c6232f74200209b 100644 (file)
@@ -3774,13 +3774,24 @@ AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
           _longjmp (j, 1);]])],
      [emacs_cv_func__setjmp=yes],
      [emacs_cv_func__setjmp=no])])
-if test $emacs_cv_func__setjmp = no; then
-  AC_DEFINE([_setjmp], [setjmp],
-    [Define to setjmp if _setjmp and _longjmp do not work.  See _longjmp.])
-  AC_DEFINE([_longjmp], [longjmp],
-    [Define to longjmp if _setjmp and _longjmp do not work.
-     Because longjmp may alter signal masks, callers of _longjmp
-     should not assume that it leaves signal masks alone.])
+if test $emacs_cv_func__setjmp = yes; then
+  AC_DEFINE([HAVE__SETJMP], 1, [Define to 1 if _setjmp and _longjmp work.])
+else
+  AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+        [[#include <setjmp.h>
+        ]],
+        [[sigjmp_buf j;
+          if (! sigsetjmp (j, 1))
+            siglongjmp (j, 1);]])],
+       [emacs_cv_func_sigsetjmp=yes],
+       [emacs_cv_func_sigsetjmp=no])])
+  if test $emacs_cv_func_sigsetjmp = yes; then
+    AC_DEFINE([HAVE_SIGSETJMP], 1,
+      [Define to 1 if sigsetjmp and siglongjmp work.
+       The value of this symbol is irrelevant if HAVE__SETJMP is defined.])
+  fi
 fi
 
 case $opsys in
index b1b4dc8bbcdfd629afdf5a2e75a63b5862e3a739..fb59e9e24dc780cd41a231de21de677e87d829a5 100644 (file)
@@ -1,3 +1,25 @@
+2012-09-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port better to POSIX hosts lacking _setjmp (Bug#12446).
+       * lisp.h: Include <setjmp.h> here, since we use its symbols here.
+       All instances of '#include <setjmp.h>' removed, if the
+       only reason for the instance was because "lisp.h" was included.
+       (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
+       Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
+       and _longjmp with the new symbols.  Emacs already uses _setjmp if
+       available, so this change affects only POSIXish hosts that have
+       sigsetjmp but not _setjmp, such as some versions of Solaris and
+       Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
+       * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
+       (png_load_body) [HAVE_PNG]:
+       (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
+       (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
+       Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
+       since PNG requires jmp_buf.  This is the only exception to the
+       general rule that we now use sys_setjmp and sys_longjmp.
+       This exception is OK since this code does not change the signal
+       mask or longjmp out of a signal handler.
+
 2012-09-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
index 25cf03dfa2ebaab39e25769b7a351e5a7498c1bf..0bfbb0c88b182a89f92d64cf92ce600ed61ffd5c 100644 (file)
@@ -24,7 +24,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
 #include <limits.h>            /* For CHAR_BIT.  */
-#include <setjmp.h>
 
 #ifdef ENABLE_CHECKING
 #include <signal.h>            /* For SIGABRT. */
@@ -45,7 +44,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "frame.h"
 #include "blockinput.h"
 #include "termhooks.h"         /* For struct terminal.  */
-#include <setjmp.h>
+
 #include <verify.h>
 
 /* GC_CHECK_MARKED_OBJECTS means do sanity checks on allocated objects.
@@ -4764,14 +4763,14 @@ test_setjmp (void)
 {
   char buf[10];
   register int x;
-  jmp_buf jbuf;
+  sys_jmp_buf jbuf;
 
   /* Arrange for X to be put in a register.  */
   sprintf (buf, "1");
   x = strlen (buf);
   x = 2 * x - 1;
 
-  _setjmp (jbuf);
+  sys_setjmp (jbuf);
   if (longjmps_done == 1)
     {
       /* Came here after the longjmp at the end of the function.
@@ -4796,7 +4795,7 @@ test_setjmp (void)
   ++longjmps_done;
   x = 2;
   if (longjmps_done == 1)
-    _longjmp (jbuf, 1);
+    sys_longjmp (jbuf, 1);
 }
 
 #endif /* not GC_SAVE_REGISTERS_ON_STACK && not GC_SETJMP_WORKS */
@@ -4902,7 +4901,7 @@ mark_stack (void)
   /* jmp_buf may not be aligned enough on darwin-ppc64 */
   union aligned_jmpbuf {
     Lisp_Object o;
-    jmp_buf j;
+    sys_jmp_buf j;
   } j;
   volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base;
 #endif
@@ -4938,7 +4937,7 @@ mark_stack (void)
     }
 #endif /* GC_SETJMP_WORKS */
 
-  _setjmp (j.j);
+  sys_setjmp (j.j);
   end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
 #endif /* not GC_SAVE_REGISTERS_ON_STACK */
 #endif /* not HAVE___BUILTIN_UNWIND_INIT */
index 34731920af50f8e1ce8cae1818a68025bf45b223..80b813fe4fe1da79d999724e38cf3d50fcc7acbc 100644 (file)
@@ -18,7 +18,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "syssignal.h"
 #include "systime.h"
index 4186a46e19e819e09f58dd812253c25ee630ec7e..af0209565e29d23f941cee3c46330b657d227c2a 100644 (file)
@@ -56,7 +56,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index d512547d34e50ebb69c1ed62218ad13a953bc88a..b020edb99628ed3bea3d87331912eaf687250835 100644 (file)
@@ -26,7 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/param.h>
 #include <errno.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <unistd.h>
 
 #include <verify.h>
index 97730636d0ecf31a4cab9b375925ee7d06c5ec8e..b151078f60f4fe3cdbb2c587a875c8f74fccee01 100644 (file)
@@ -33,7 +33,7 @@ by Hallvard:
  */
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index b11545ddea24447a221e583abf381f9888796c58..c4c087e83d7992563d46969c783a674b3ccceca9 100644 (file)
@@ -19,7 +19,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index a92959a1559ef05ccf4196ca75d5d805dbf44f9d..9171337ee76c830219d941eed2e4bec0355bfff4 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <errno.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <sys/types.h>
 #include <unistd.h>
 
index 1102054b153e9e972114e92a3287b34d73d96465..e365462757696146917a623d4b878d7656b7f194 100644 (file)
@@ -19,7 +19,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index 3e22d0d0b77c0c735977b3d2fecbb098ebceb25a..a84bc9202d0be1a5bdaa4835b07ee230e905de56 100644 (file)
@@ -19,7 +19,7 @@ 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 <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index 80dc6938d8be9022dc23bd4b19002fa7002609d8..01a6f54ad1793e2d729940986ab42b18e35c6bd6 100644 (file)
@@ -32,7 +32,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define CATEGORY_INLINE EXTERN_INLINE
 
-#include <setjmp.h>
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index dd37934451d2469f3da938a2963081043c0c4bd9..34cc1c98eea21d90318d91c03f020c4b17909fcf 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -26,7 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 
 #include <stdio.h>
-#include <setjmp.h>
 #include <limits.h>
 
 #include "lisp.h"
index 37963d1878c3d180237758ee77dd8ba2f1a630c9..def1ad090fd74d5b7604000d61d0393fffe0be22 100644 (file)
@@ -36,7 +36,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef emacs
 
 #include <sys/types.h>
-#include <setjmp.h>
 #include <intprops.h>
 #include "lisp.h"
 #include "character.h"
index 972a0598059e06e10e5d52c56f53494afe721437..d8c38e5ea3b2cb246ab091ca96a2730a8fe4fa2b 100644 (file)
@@ -32,7 +32,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <limits.h>
 #include <sys/types.h>
-#include <setjmp.h>
 #include <c-ctype.h>
 #include "lisp.h"
 #include "character.h"
index c14df0ebac61360a35c4a54377db4678db12796d..e864514e336b32097228b85e71db482bfcdb10d4 100644 (file)
@@ -19,7 +19,7 @@ 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 <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "charset.h"
index 4b17b92eebcb86e34dbbf08f5cb062ba31aeab66..eda6430bafa349b7bed2b4b03d0fbc26e3ca6bbe 100644 (file)
--- a/src/cm.c
+++ b/src/cm.c
@@ -20,7 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "frame.h"
index 90d3cd6dcedde7f4219b472662afda1bd8f5fa45..45f7df948ae70c2d985f85c0949ba783e7859bf6 100644 (file)
@@ -19,7 +19,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "commands.h"
 #include "character.h"
index 94a2d9fea80b9b15ad4dc769f60b0b47ba627d73..4b3d22f956c1a0311498ab67c41b3b34d7a3de86 100644 (file)
@@ -285,7 +285,6 @@ encode_coding_XXX (struct coding_system *coding)
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index eddabb66d336c2f7649e57af0bc30eff5f6f2243..ae46df0a5739182b7b9cc77bd794848d1c5b8f67 100644 (file)
@@ -26,7 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define COMPOSITE_INLINE EXTERN_INLINE
 
-#include <setjmp.h>
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index 5d7f036b70deb2ad437eaedcae3c71096cf0554b..72d7c8ccf9af9362fc12ae4d9699ff84ca190785 100644 (file)
@@ -20,7 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include <intprops.h>
 
index 901820648cb15f12312114d366fa282b33cbed14..c2eefd605bb22bf8012a3e0771daaac99cfa2840 100644 (file)
@@ -21,7 +21,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_DBUS
 #include <stdio.h>
 #include <dbus/dbus.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "frame.h"
 #include "termhooks.h"
index 9af5f76821b58cbeecd3c4e7e6e207b7aae024a5..3aa27ecf920dcdcef37777caf67f4a44cee7534c 100644 (file)
@@ -22,7 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <setjmp.h>
 
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index f6186e86048f717894000074c66b4f19f68cae23..5827316a7b74ba84c1f03287b72630928dfdd877 100644 (file)
@@ -22,7 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define DISPEXTERN_INLINE EXTERN_INLINE
 
 #include <stdio.h>
-#include <setjmp.h>
 #include <unistd.h>
 
 #include "lisp.h"
index 02a5b4b814395630f869a7f8ec944474adeaca2b..d2d664df266d7ea16095332ff2104e6f3419d22e 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -22,7 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <sys/types.h>
 #include <sys/file.h>  /* Must be after sys/types.h for USG*/
-#include <setjmp.h>
 #include <fcntl.h>
 #include <unistd.h>
 
index 3b7391f07d4134287533b0263fbb32ff2df1f2f8..caa56d6ae8825e0157b10bec7859bb3d8e63cb7b 100644 (file)
@@ -102,7 +102,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <float.h>
 #include <unistd.h>
 #include <limits.h>
index 21676f4b4f51c54932705e3a2ce7597a094d3125..3c649f4d534db94c0b9dbe0cc6b0f19c8ceeb226 100644 (file)
@@ -30,7 +30,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <dos.h>
 #undef gettime
 #undef settime
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index 299cad07fd744d0a83f4caffccb0c5a311a0e190..c6744648bc5b0a60c7390c2fdacfce06351f8976 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <sys/types.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index e815063131148cd15c27c049dc3e7d6c9635faf0..1416bf76c430ce661be3f7e7bd9b57187893674f 100644 (file)
@@ -25,7 +25,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <sys/types.h>
 #include <sys/file.h>
-#include <setjmp.h>
 #include <unistd.h>
 
 #include "lisp.h"
index c0d29a640ed2cda65613d57c7eef2849c122a50b..d10185072cc804497825d769d6210904b8ded4da 100644 (file)
@@ -22,7 +22,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "emacsgtkfixed.h"
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "frame.h"
 #include "xterm.h"
index 3c0c65e93669f92fd9e1a95c7663aedb64fd32d4..6cca13a8fda2ce71a0a3b62827a6144a179f4d70 100644 (file)
@@ -19,7 +19,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <limits.h>
-#include <setjmp.h>
 #include <stdio.h>
 #include "lisp.h"
 #include "blockinput.h"
@@ -1072,7 +1071,7 @@ internal_catch (Lisp_Object tag, Lisp_Object (*func) (Lisp_Object), Lisp_Object
   catchlist = &c;
 
   /* Call FUNC.  */
-  if (! _setjmp (c.jmp))
+  if (! sys_setjmp (c.jmp))
     c.val = (*func) (arg);
 
   /* Throw works by a longjmp that comes right here.  */
@@ -1140,7 +1139,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value)
   backtrace_list = catch->backlist;
   lisp_eval_depth = catch->lisp_eval_depth;
 
-  _longjmp (catch->jmp, 1);
+  sys_longjmp (catch->jmp, 1);
 }
 
 DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0,
@@ -1246,7 +1245,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
   c.interrupt_input_blocked = interrupt_input_blocked;
   c.gcpro = gcprolist;
   c.byte_stack = byte_stack_list;
-  if (_setjmp (c.jmp))
+  if (sys_setjmp (c.jmp))
     {
       if (!NILP (h.var))
        specbind (h.var, c.val);
@@ -1301,7 +1300,7 @@ internal_condition_case (Lisp_Object (*bfun) (void), Lisp_Object handlers,
   c.interrupt_input_blocked = interrupt_input_blocked;
   c.gcpro = gcprolist;
   c.byte_stack = byte_stack_list;
-  if (_setjmp (c.jmp))
+  if (sys_setjmp (c.jmp))
     {
       return (*hfun) (c.val);
     }
@@ -1339,7 +1338,7 @@ internal_condition_case_1 (Lisp_Object (*bfun) (Lisp_Object), Lisp_Object arg,
   c.interrupt_input_blocked = interrupt_input_blocked;
   c.gcpro = gcprolist;
   c.byte_stack = byte_stack_list;
-  if (_setjmp (c.jmp))
+  if (sys_setjmp (c.jmp))
     {
       return (*hfun) (c.val);
     }
@@ -1381,7 +1380,7 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object),
   c.interrupt_input_blocked = interrupt_input_blocked;
   c.gcpro = gcprolist;
   c.byte_stack = byte_stack_list;
-  if (_setjmp (c.jmp))
+  if (sys_setjmp (c.jmp))
     {
       return (*hfun) (c.val);
     }
@@ -1425,7 +1424,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
   c.interrupt_input_blocked = interrupt_input_blocked;
   c.gcpro = gcprolist;
   c.byte_stack = byte_stack_list;
-  if (_setjmp (c.jmp))
+  if (sys_setjmp (c.jmp))
     {
       return (*hfun) (c.val, nargs, args);
     }
index f0b3f0cc2fdb0344e613298afe71e7723a429bac..ca71af7ed9528b9425b8b3e7e4e6e506bc237c7f 100644 (file)
@@ -23,7 +23,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <setjmp.h>
 #include <unistd.h>
 
 #ifdef HAVE_PWD_H
index 1f599c68912768af60bd035a236f27344f43469b..17f3f2532491f4f9a8cf0c774eea1dae7d3ce502 100644 (file)
@@ -23,7 +23,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/stat.h>
 #include <signal.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index 66d7ca4af2c7e7e57478003b883b7ad9f1072ea8..4fe209fcb61c347ffd929ab6750326c70557867f 100644 (file)
@@ -29,7 +29,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
  */
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "syssignal.h"
 
index 91dc66391509fbb97f410b07d0b0b3f760bb6b8f..42c4f817f2936fc75d8cd35e32317fd17f4864ae 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <unistd.h>
 #include <time.h>
-#include <setjmp.h>
 
 #include <intprops.h>
 
index 49a09bced28632a65df6cf0b24a5677297ecd602..da8c5ae52fc76d480d3627069412219fe4c7ff55 100644 (file)
@@ -23,7 +23,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <float.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include <c-ctype.h>
 
index 2b955fe6b117713543efd3d08d3036f7dc2a3fca..35d4bfb367e845d722f58adeb17860731f19e892 100644 (file)
@@ -26,7 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "blockinput.h"
index d10969692ee1968a2a6b91e869e22923fb4a834c..6930dac3ce86816a92dd19ce0243ad8e09a0ee8c 100644 (file)
@@ -24,7 +24,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <stdio.h>
 #include <errno.h>
 #include <limits.h>
-#include <setjmp.h>
 
 #include <c-ctype.h>
 
index 0c2109a0f8e0a440907f2a300421a1d38fa583a8..6e6deeddb08f898781b78705777de9791b4b975e 100644 (file)
@@ -18,7 +18,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "frame.h"
index a85773a9a214ddb8dd78e08dc78f76a50ded8e9d..f07ad6f33c758f02b2682dffeac3be61797cf32f 100644 (file)
@@ -21,8 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
-
 #include <fontconfig/fontconfig.h>
 #include <fontconfig/fcfreetype.h>
 
index c705ede62c42bf433f45f9d205be4bd014c36c3e..466250bd43f222b81c3e0c4489c11e161fe56e63 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <X11/Xlib.h>
 
 #include "lisp.h"
index a2573f6bd99a818ddfc0a4d18331d85ff8719a4c..1c4693aee32319c5751bba893538b073e9d68ab1 100644 (file)
@@ -18,7 +18,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <errno.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "process.h"
index 884574e1062d29c2d05d2274a2eb7b6be123f14f..1eb4b2cabdf76b457bdb3a8fffb69c9e3f10fa3e 100644 (file)
@@ -22,7 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef USE_GTK
 #include <float.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include <c-ctype.h>
 
index d4e54fb7dcdfafab5c8a0741537084b47bd77670..6803dbe8f00b453da2eab8258daea836e622ddb7 100644 (file)
@@ -5514,6 +5514,13 @@ init_png_functions (Lisp_Object libraries)
 
 #endif /* HAVE_NTGUI */
 
+/* Possibly inefficient/inexact substitutes for _setjmp and _longjmp.
+   Do not use sys_setjmp, as PNG supports only jmp_buf.  The _longjmp
+   substitute may munge the signal mask, but that should be OK here.  */
+#ifndef HAVE__SETJMP
+# define _setjmp(j) setjmp (j)
+# define _longjmp longjmp
+#endif
 
 #if (PNG_LIBPNG_VER < 10500)
 #define PNG_LONGJMP(ptr) (_longjmp ((ptr)->jmpbuf, 1))
@@ -5593,7 +5600,7 @@ png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length)
 
 struct png_load_context
 {
-  /* These are members so that _longjmp doesn't munge local variables.  */
+  /* These are members so that longjmp doesn't munge local variables.  */
   png_struct *png_ptr;
   png_info *info_ptr;
   png_info *end_info;
@@ -6129,9 +6136,9 @@ jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired)
 struct my_jpeg_error_mgr
 {
   struct jpeg_error_mgr pub;
-  jmp_buf setjmp_buffer;
+  sys_jmp_buf setjmp_buffer;
 
-  /* The remaining members are so that _longjmp doesn't munge local
+  /* The remaining members are so that longjmp doesn't munge local
      variables.  */
   struct jpeg_decompress_struct cinfo;
   enum
@@ -6151,7 +6158,7 @@ my_error_exit (j_common_ptr cinfo)
 {
   struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err;
   mgr->failure_code = MY_JPEG_ERROR_EXIT;
-  _longjmp (mgr->setjmp_buffer, 1);
+  sys_longjmp (mgr->setjmp_buffer, 1);
 }
 
 
@@ -6401,7 +6408,7 @@ jpeg_load_body (struct frame *f, struct image *img,
      error is detected.  This function will perform a longjmp.  */
   mgr->cinfo.err = fn_jpeg_std_error (&mgr->pub);
   mgr->pub.error_exit = my_error_exit;
-  if (_setjmp (mgr->setjmp_buffer))
+  if (sys_setjmp (mgr->setjmp_buffer))
     {
       switch (mgr->failure_code)
        {
@@ -6460,14 +6467,14 @@ jpeg_load_body (struct frame *f, struct image *img,
   if (!check_image_size (f, width, height))
     {
       mgr->failure_code = MY_JPEG_INVALID_IMAGE_SIZE;
-      _longjmp (mgr->setjmp_buffer, 1);
+      sys_longjmp (mgr->setjmp_buffer, 1);
     }
 
   /* Create X image and pixmap.  */
   if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))
     {
       mgr->failure_code = MY_JPEG_CANNOT_CREATE_X;
-      _longjmp (mgr->setjmp_buffer, 1);
+      sys_longjmp (mgr->setjmp_buffer, 1);
     }
 
   /* Allocate colors.  When color quantization is used,
index c60315a7f6e842a79f6ba9b2a6f9217f408961b1..053643e6319b45c57b6bd9d473a66eb0db7777c9 100644 (file)
@@ -19,7 +19,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index bfb2327a696b44be53a8f1dee9e06f44c6d53b87..87010cd82514d024a3096851e0ec84ef4e6e17b9 100644 (file)
@@ -19,7 +19,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
 
 #include <intprops.h>
 
index e508f968963baa349c8dc760698ba0336f6cc3b4..5a47cacb2dd84ed45f2fa09c5190e62225ddab7a 100644 (file)
@@ -41,7 +41,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define INTERVALS_INLINE EXTERN_INLINE
 
-#include <setjmp.h>
 #include <intprops.h>
 #include "lisp.h"
 #include "intervals.h"
index 45638bc412b5920865af42f3e65c8eda4e8ae3e6..d164083fb866e9d6fbbd1768ac1495e1905b01e4 100644 (file)
@@ -22,7 +22,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define KEYBOARD_INLINE EXTERN_INLINE
 
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "termchar.h"
 #include "termopts.h"
@@ -145,7 +145,7 @@ static ptrdiff_t before_command_echo_length;
 
 /* For longjmp to where kbd input is being done.  */
 
-static jmp_buf getcjmp;
+static sys_jmp_buf getcjmp;
 
 /* True while doing kbd input.  */
 int waiting_for_input;
@@ -434,8 +434,8 @@ static Lisp_Object modify_event_symbol (ptrdiff_t, int, Lisp_Object,
                                         Lisp_Object *, ptrdiff_t);
 static Lisp_Object make_lispy_switch_frame (Lisp_Object);
 static int help_char_p (Lisp_Object);
-static void save_getcjmp (jmp_buf);
-static void restore_getcjmp (jmp_buf);
+static void save_getcjmp (sys_jmp_buf);
+static void restore_getcjmp (sys_jmp_buf);
 static Lisp_Object apply_modifiers (int, Lisp_Object);
 static void clear_event (struct input_event *);
 static Lisp_Object restore_kboard_configuration (Lisp_Object);
@@ -2315,8 +2315,8 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
 {
   volatile Lisp_Object c;
   ptrdiff_t jmpcount;
-  jmp_buf local_getcjmp;
-  jmp_buf save_jump;
+  sys_jmp_buf local_getcjmp;
+  sys_jmp_buf save_jump;
   volatile int key_already_recorded = 0;
   Lisp_Object tem, save;
   volatile Lisp_Object previous_echo_area_message;
@@ -2562,7 +2562,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
      it *must not* be in effect when we call redisplay.  */
 
   jmpcount = SPECPDL_INDEX ();
-  if (_setjmp (local_getcjmp))
+  if (sys_setjmp (local_getcjmp))
     {
       /* Handle quits while reading the keyboard.  */
       /* We must have saved the outer value of getcjmp here,
@@ -3394,13 +3394,13 @@ record_char (Lisp_Object c)
    See read_process_output.  */
 
 static void
-save_getcjmp (jmp_buf temp)
+save_getcjmp (sys_jmp_buf temp)
 {
   memcpy (temp, getcjmp, sizeof getcjmp);
 }
 
 static void
-restore_getcjmp (jmp_buf temp)
+restore_getcjmp (sys_jmp_buf temp)
 {
   memcpy (getcjmp, temp, sizeof getcjmp);
 }
@@ -10979,7 +10979,7 @@ quit_throw_to_read_char (int from_signal)
     do_switch_frame (make_lispy_switch_frame (internal_last_event_frame),
                     0, 0, Qnil);
 
-  _longjmp (getcjmp, 1);
+  sys_longjmp (getcjmp, 1);
 }
 \f
 DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode,
index d79ff89ed6786c427962346de87b4b850ca7e740..66fb52061f99847615cca7b8aea4282352b616d1 100644 (file)
@@ -40,7 +40,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "commands.h"
 #include "character.h"
index ca22ca812286ccb353e112a87a774742021e196e..335ed8ba8312b346064d6955484a0b3004dae10e 100644 (file)
@@ -20,6 +20,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef EMACS_LISP_H
 #define EMACS_LISP_H
 
+#include <setjmp.h>
 #include <stdalign.h>
 #include <stdarg.h>
 #include <stdbool.h>
@@ -1963,7 +1964,24 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int);
     static struct Lisp_Kboard_Objfwd ko_fwd;                   \
     defvar_kboard (&ko_fwd, lname, offsetof (KBOARD, vname ## _)); \
   } while (0)
-
+\f
+/* Save and restore the instruction and environment pointers,
+   without affecting the signal mask.  */
+
+#ifdef HAVE__SETJMP
+typedef jmp_buf sys_jmp_buf;
+# define sys_setjmp(j) _setjmp (j)
+# define sys_longjmp(j, v) _longjmp (j, v)
+#elif defined HAVE_SIGSETJMP
+typedef sigjmp_buf sys_jmp_buf;
+# define sys_setjmp(j) sigsetjmp (j, 0)
+# define sys_longjmp(j, v) siglongjmp (j, v)
+#else
+/* A non-POSIX platform; assume longjmp does not affect the sigmask.  */
+typedef jmp_buf sys_jmp_buf;
+# define sys_setjmp(j) setjmp (j)
+# define sys_longjmp(j, v) longjmp (j, v)
+#endif
 
 \f
 /* Structure for recording Lisp call stack for backtrace purposes.  */
@@ -2056,7 +2074,7 @@ struct catchtag
   Lisp_Object volatile val;
   struct catchtag *volatile next;
   struct gcpro *gcpro;
-  jmp_buf jmp;
+  sys_jmp_buf jmp;
   struct backtrace *backlist;
   struct handler *handlerlist;
   EMACS_INT lisp_eval_depth;
index 08a2e856c003adb4ae57f98a72c50e5787cd628e..08d5f97292ba729b3f00ed08841ca6d78313b895 100644 (file)
@@ -25,7 +25,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/file.h>
 #include <errno.h>
 #include <limits.h>    /* For CHAR_BIT.  */
-#include <setjmp.h>
 #include <stat-time.h>
 #include "lisp.h"
 #include "intervals.h"
index e81068181b9c83e9acca25be721c8372d5d65850..a507f12e34380a704122824fec396656b55b957d 100644 (file)
@@ -19,7 +19,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "macros.h"
 #include "commands.h"
index bfbb161a71d52e5aebc435cc81c224eede84bf37..0c4e8cb3b55ce516c36903955eebeaab85f7722d 100644 (file)
@@ -18,7 +18,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index bfdc68ca11870b4d05ea93afd4ed08841c44972b..7b01d1faefc60dfaf0e9fab6d9f1cd91615b709c 100644 (file)
@@ -20,7 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <limits.h> /* for INT_MAX */
 
 #include "lisp.h"
index 4ed480a8408f69e14c88ce3fd1269cee48366656..8a1e0ddde867e30d940864ba5ef2f8661be7c250 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <errno.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "commands.h"
index f73086eeee9af5b51c5271bbb325498d2106c6f7..ed8d44014d58b63f6a7d0c32a3e5cdedefb95ffd 100644 (file)
@@ -31,7 +31,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 #include <config.h>
 
 #include <math.h>
-#include <setjmp.h>
 #include <c-strcase.h>
 
 #include "lisp.h"
index 1c9976ec6cc185954ab50a3e202a353c449530fe..eba1eb04765dddfcb60c65f60b8ac98bd1cec8d6 100644 (file)
@@ -23,7 +23,6 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu)
 /* This should be the first include, as it may set up #defines affecting
    interpretation of even the system includes. */
 #include <config.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "dispextern.h"
index 8a8a3ddaae4a2d6cc7cd3f47b5e9f021ab4449e4..668664c7a20d77a4f71a2edd6bb8ecb26df8e98e 100644 (file)
@@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 /* This should be the first include, as it may set up #defines affecting
    interpretation of even the system includes. */
 #include <config.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "dispextern.h"
index d0f3e45e939dcfac274bc2a5e26ecb4cc92615b4..3057f4f6a203c155b31b947539c385624928452f 100644 (file)
@@ -24,7 +24,6 @@ Carbon version by Yamamoto Mitsuharu. */
 /* This should be the first include, as it may set up #defines affecting
    interpretation of even the system includes. */
 #include <config.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "window.h"
index e0bbfe58636a8e629a30a935256837a276b36c1d..95bc1a95957013093695e6b94734265c72378ba2 100644 (file)
@@ -28,7 +28,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 /* This should be the first include, as it may set up #defines affecting
    interpretation of even the system includes. */
 #include <config.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "nsterm.h"
index f9611fd12105a5dd1c7368d53292a855d6036190..f1f23ad44792c7625d7d7ce29d4d939577d6c5ee 100644 (file)
@@ -35,7 +35,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 #include <time.h>
 #include <signal.h>
 #include <unistd.h>
-#include <setjmp.h>
 
 #include <c-ctype.h>
 #include <c-strcase.h>
index 16116643ad01d422d7bedd9bad4ab68a06901e13..aae13bb6764c38e07b3ef85ef4c67a5fef843e07 100644 (file)
@@ -21,7 +21,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index b4b05a4b2e28414e8ffd0579302764fa93da4141..6dbff6f4b161bab2e06ceebc0df02aaaba0df2f1 100644 (file)
@@ -25,12 +25,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
 #include <errno.h>
-#include <setjmp.h>
 #include <sys/types.h>         /* Some typedefs are used in sys/file.h.  */
 #include <sys/file.h>
 #include <sys/stat.h>
-#include <setjmp.h>
-
 #include <unistd.h>
 #include <fcntl.h>
 
@@ -5421,7 +5418,7 @@ read_process_output (Lisp_Object proc, register int channel)
 \f
 /* Sending data to subprocess */
 
-static jmp_buf send_process_frame;
+static sys_jmp_buf send_process_frame;
 static Lisp_Object process_sent_to;
 
 static _Noreturn void
@@ -5431,7 +5428,7 @@ handle_pipe_signal (int sig)
   sigemptyset (&unblocked);
   sigaddset (&unblocked, SIGPIPE);
   pthread_sigmask (SIG_UNBLOCK, &unblocked, 0);
-  _longjmp (send_process_frame, 1);
+  sys_longjmp (send_process_frame, 1);
 }
 
 static void
@@ -5640,7 +5637,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
   /* 2000-09-21: Emacs 20.7, sparc-sun-solaris-2.6, GCC 2.95.2,
      CFLAGS="-g -O": The value of the parameter `proc' is clobbered
      when returning with longjmp despite being declared volatile.  */
-  if (!_setjmp (send_process_frame))
+  if (!sys_setjmp (send_process_frame))
     {
       p = XPROCESS (proc);  /* Repair any setjmp clobbering.  */
       process_sent_to = proc;
index 74834333aa35f654d76954453c14fbcef79cc190..b0134ea730a0e2d80d303bf97a9dc7f0d55ebebf 100644 (file)
@@ -25,7 +25,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef emacs
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"              /* Needed for VALBITS.  */
 #include "blockinput.h"
 
index 472ef7279790c4aaf52f1b2956a71ae321017c8c..92264ccae23fc9781dd121d323bcf72dc2d1f3d9 100644 (file)
    that make sense only in Emacs. */
 #ifdef emacs
 
-# include <setjmp.h>
 # include "lisp.h"
 # include "character.h"
 # include "buffer.h"
index c3eb087aadea75154faaac44688bfbea802b8268..832f4bfd2146f4656efd29daa189194ca742725b 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index 79dd464b29e5db472382d1cdbc5212a8d6005a0b..71ce43b2e483ee70b0511e4bb39ceb0ca946b23d 100644 (file)
@@ -21,7 +21,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "termchar.h"
 #include "dispextern.h"
index 72bd5605709bdb0220a80405e9e71f01b4aba588..99fd7971e4c7aa24afdb2ad76e83d218e7b1a113 100644 (file)
@@ -20,7 +20,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "syntax.h"
 #include "category.h"
index 3ae14b5daec614122409aad543d2d90b6d5403f9..f6022ea3ce7c17ff3d346c01c6e3c4c08e6fa432 100644 (file)
@@ -20,7 +20,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 
 #include <unistd.h>
@@ -93,4 +93,3 @@ report_sheap_usage (int die_if_pure_storage_exceeded)
           bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE);
   message ("%s", buf);
 }
-
index fe48bb277b2188b577561d0c25ffbb27ead505fb..0ee85312fd3edbfc04908a9b22d2e63fb05fae6f 100644 (file)
@@ -44,7 +44,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <sys/types.h>
 #include <errno.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "dispextern.h"
 #include "atimer.h"
index fdd9353bb879c770a7a4c3a64e3d0a773c2c63bc..91ef4e66663be25ecd85d3b444ed7ba5a4b77362 100644 (file)
@@ -21,7 +21,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 
 #include <sys/types.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "commands.h"
 #include "character.h"
index b8f35e791468f878be8b5f893714d081145894e3..9065b38d6fced1b64123e41254cb0cd87ff96826 100644 (file)
@@ -23,7 +23,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <execinfo.h>
 #include <stdio.h>
-#include <setjmp.h>
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #include <grp.h>
index 47bde5ac240c7bd7d1fc5567cacec8adce9f9d9c..f4117d67decb32fc39f6c7524f8b0923bb2ca989 100644 (file)
@@ -25,7 +25,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/file.h>
 #include <sys/time.h>
 #include <unistd.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "termchar.h"
index d1b05e8df94bb1e5e3fa5393d5f8aceee4b5fa32..e494cd113d98693c811863b826a27180f87f5552 100644 (file)
@@ -19,7 +19,6 @@ Boston, MA 02110-1301, USA.  */
 
 /* Emacs config.h may rename various library functions such as malloc.  */
 #include <config.h>
-#include <setjmp.h>
 #include <sys/file.h>
 #include <fcntl.h>
 #include <unistd.h>
index c51a18dfa61299a3b72b3691a7d5980c55e38f4e..719c2a361114bbf107ee49c48d9258fc0a9690d1 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define TERMHOOKS_INLINE EXTERN_INLINE
 
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "frame.h"
index ca2d89a000be76553c298051004b2bb6053769c9..124c452a4a9e76e7f5466ca729f2e6d92cadcae2 100644 (file)
@@ -19,7 +19,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include "tparam.h"
 
-#include <setjmp.h>
 #include "lisp.h"
 
 /* Define these variables that serve as global parameters to termcap,
index 2a9efba1c45ae4bd2b017ae2f9bd82ce5bb4f6ec..872912ea706f94d24cbf01996a165469aae5dbd1 100644 (file)
@@ -17,7 +17,7 @@ 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 <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "intervals.h"
 #include "character.h"
index 58a825c90d7b0823d9a4e3f211ab69e6dd463a46..164f61d471bb1cb4de1b76e7421063c2a245113c 100644 (file)
@@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA.  */
 
 /* Emacs config.h may rename various library functions such as malloc.  */
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"              /* for xmalloc */
 #include "tparam.h"
 \f
index 9cd1d5f9f67b8a57b3eb54679f96fd635c7b77ab..e878ef4dcf90af6e5b19cdc8fed3a49f0d28b50e 100644 (file)
@@ -18,7 +18,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
index c09156296f73850942908eb0e5a04bf9c1a22567..c01a22a79f6fb79dc5bcec7b5b1c18372b68adf2 100644 (file)
@@ -89,7 +89,6 @@ static int adjust_lnnoptrs (int, int, const char *);
 
 static int pagemask;
 
-#include <setjmp.h>
 #include "lisp.h"
 
 static void
index e83042a379dc15cc0a155c7783fd10127edc718c..966dd58cb6ee1b30f7056060acf9eab3c548503f 100644 (file)
@@ -120,7 +120,6 @@ static int pagemask;
 
 #define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
 
-#include <setjmp.h>
 #include "lisp.h"
 
 static void
index eae534cf4ddd957a669c3a9fd8f7c95df2d859e7..96c4b4a9aec5e6854cd8652b1cc520bdf6f0ec4f 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include "unexec.h"
 
-#include <setjmp.h>
 #include <lisp.h>
 #include <stdio.h>
 #include <fcntl.h>
index 336f3b4faea83e115d140a5acab114bd4676c5d9..470206d58387fc27b95c35ac01303c57ce9d1a52 100644 (file)
@@ -4,7 +4,6 @@
 #include "unexec.h"
 
 #include <dlfcn.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index cf697b56fdfc24b781a5354d46edc2876ac89fdf..8de0acd1bb2062f67342f23bda4b06c3c31d88de 100644 (file)
@@ -17,7 +17,6 @@ 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 <config.h>
-#include <setjmp.h>
 #include <unistd.h> /* for 'environ', on AIX */
 #include "lisp.h"
 #include "mem-limits.h"
index 0100acc8143bbe0441f65249aa21487c37f07be8..fd5ad167125b0ec022b664f2723ae0dfe0c3f5ca 100644 (file)
@@ -30,7 +30,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "xterm.h"
 
index 18a550782e8ee8b4e9ac2083582aafd0c5ebcb5d..b3db1292e5c64e54cb149955fe6ef5c1a3d1c770 100644 (file)
@@ -23,7 +23,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define WINDOW_INLINE EXTERN_INLINE
 
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index 320998a5713d02fbed425607157f0c3261050b52..8e0975cf65a177aa4f7d088bff70691ebcb44f3f 100644 (file)
@@ -273,7 +273,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <stdio.h>
 #include <limits.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "keyboard.h"
index c113c1a37b727324d96530d46381a075398035ae..c240a05c6c027bb1aa4035d36ad83a5a4682ffb9 100644 (file)
@@ -204,7 +204,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>              /* This needs to be before termchar.h */
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
index 90b54d1234592bd934faf181e1c606fa3e7bdffb..8304a3df04fba49481baeffb49a6b8d6540ba053 100644 (file)
@@ -20,7 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <stdio.h>
 #include <math.h>
-#include <setjmp.h>
 #include <unistd.h>
 
 /* This makes the fields of a Display accessible, in Xlib header files.  */
index 7755b780815e45afead448f8f9bd7dac6db9f7ef..1f2fd13f1b7e2bd09c84cdf4396229ae971fd513 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <X11/Xlib.h>
 
 #include "lisp.h"
index 404b912409959a1268b5e16b553e61d45134c2d4..9f52eb8b23355dd15b120ae5097b8f4a61209390 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 #include <X11/Xlib.h>
 #include <X11/Xft/Xft.h>
 
index 5f4c7edfb79b05f9aae23582572fdb210d459088..c161564a322a2672a4b9bf1ab0535fd055d8ae08 100644 (file)
@@ -19,14 +19,12 @@ along with GNU Emacs.  If not, see <http§://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
-#include <setjmp.h>
 #include "xgselect.h"
 
 #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS)
 
 #include <glib.h>
 #include <errno.h>
-#include <setjmp.h>
 #include "xterm.h"
 
 int
index 605db13e1494522b00b456a4d50635fecbc91363..d03a4bc974b9a182dc5d1d6eb3c915fc362413f3 100644 (file)
@@ -33,7 +33,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "keyboard.h"
index 7bc6130b8b1d1487af2b33e1bb2caa65c8c61b21..b668525cf267dcfb3158f6815fad2a80c213eda9 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -20,7 +20,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef HAVE_LIBXML2
 
-#include <setjmp.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
 #include <libxml/HTMLparser.h>
index 624bafa5e928b4a73872b53cfedc0a37ef85ea1d..73672c9617c78aad31ddb57210ca7052bb11d6a9 100644 (file)
@@ -26,7 +26,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <epaths.h>
 
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 
index 5a3b7452c6d0addb5aacd108a42e81291a814a5c..ab199e0b9b98f8ae9cd239e5d3acf15365d00df0 100644 (file)
@@ -22,7 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <config.h>
 #include <limits.h>
 #include <stdio.h>      /* termhooks.h needs this */
-#include <setjmp.h>
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
index a28d75d9422b8759442fee46f08ff0ae3cf158b5..58c844954895bcee8e577e362e31740698e5bac8 100644 (file)
@@ -21,7 +21,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <float.h>
 #include <limits.h>
-#include <setjmp.h>
 #include <fcntl.h>
 #include "lisp.h"
 #include "xterm.h"
@@ -711,12 +710,12 @@ apply_xft_settings (struct x_display_info *dpyinfo,
       if (send_event_p)
         store_config_changed_event (Qfont_render,
                                     XCAR (dpyinfo->name_list_element));
-      Vxft_settings 
+      Vxft_settings
        = make_formatted_string (buf, format,
                                 oldsettings.aa, oldsettings.hinting,
                                 oldsettings.rgba, oldsettings.lcdfilter,
                                 oldsettings.hintstyle, oldsettings.dpi);
-      
+
     }
   else
     FcPatternDestroy (pat);
index cddbb2aae86e9ecc0a3602c318e410477604ced1..8067899f9312d9172d346c4a2591c145537f87a8 100644 (file)
@@ -29,7 +29,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <sys/param.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "systime.h"
index 54d4f14bdd0f567a516cd8ecb4eb2f3f4901dd94..900a1d78b80f23136e6b0a4308908786a1a576bd 100644 (file)
@@ -22,7 +22,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #ifdef HAVE_X_WINDOWS
 
@@ -47,7 +46,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
 #include <errno.h>
-#include <setjmp.h>
 #include <sys/stat.h>
 /* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed.  */
 /* #include <sys/param.h>  */