summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-09-15 00:06:56 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-15 00:06:56 -0700
commit0328b6de4a92676b4ad4616095ce19a4f51d1c4d (patch)
treefba6da827e1383b3ff6ee4b738d2ac74a5956dde /src
parent823751606a90e3850551b43e707d58bbf58033dc (diff)
downloademacs-0328b6de4a92676b4ad4616095ce19a4f51d1c4d.tar.gz
Port better to POSIX hosts lacking _setjmp.
* 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
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog22
-rw-r--r--src/alloc.c13
-rw-r--r--src/atimer.c2
-rw-r--r--src/bidi.c1
-rw-r--r--src/buffer.c1
-rw-r--r--src/bytecode.c2
-rw-r--r--src/callint.c1
-rw-r--r--src/callproc.c1
-rw-r--r--src/casefiddle.c2
-rw-r--r--src/casetab.c2
-rw-r--r--src/category.c1
-rw-r--r--src/ccl.c1
-rw-r--r--src/character.c1
-rw-r--r--src/charset.c1
-rw-r--r--src/chartab.c2
-rw-r--r--src/cm.c1
-rw-r--r--src/cmds.c2
-rw-r--r--src/coding.c1
-rw-r--r--src/composite.c1
-rw-r--r--src/data.c1
-rw-r--r--src/dbusbind.c2
-rw-r--r--src/dired.c1
-rw-r--r--src/dispnew.c1
-rw-r--r--src/doc.c1
-rw-r--r--src/doprnt.c1
-rw-r--r--src/dosfns.c2
-rw-r--r--src/editfns.c1
-rw-r--r--src/emacs.c1
-rw-r--r--src/emacsgtkfixed.c2
-rw-r--r--src/eval.c15
-rw-r--r--src/fileio.c1
-rw-r--r--src/filelock.c1
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c1
-rw-r--r--src/font.c1
-rw-r--r--src/fontset.c1
-rw-r--r--src/frame.c1
-rw-r--r--src/fringe.c1
-rw-r--r--src/ftfont.c2
-rw-r--r--src/ftxfont.c1
-rw-r--r--src/gnutls.c1
-rw-r--r--src/gtkutil.c1
-rw-r--r--src/image.c21
-rw-r--r--src/indent.c1
-rw-r--r--src/insdel.c1
-rw-r--r--src/intervals.c1
-rw-r--r--src/keyboard.c20
-rw-r--r--src/keymap.c2
-rw-r--r--src/lisp.h22
-rw-r--r--src/lread.c1
-rw-r--r--src/macros.c2
-rw-r--r--src/marker.c2
-rw-r--r--src/menu.c1
-rw-r--r--src/minibuf.c1
-rw-r--r--src/nsfns.m1
-rw-r--r--src/nsfont.m1
-rw-r--r--src/nsimage.m1
-rw-r--r--src/nsmenu.m1
-rw-r--r--src/nsselect.m1
-rw-r--r--src/nsterm.m1
-rw-r--r--src/print.c2
-rw-r--r--src/process.c9
-rw-r--r--src/ralloc.c2
-rw-r--r--src/regex.c1
-rw-r--r--src/region-cache.c1
-rw-r--r--src/scroll.c2
-rw-r--r--src/search.c2
-rw-r--r--src/sheap.c3
-rw-r--r--src/sound.c2
-rw-r--r--src/syntax.c2
-rw-r--r--src/sysdep.c1
-rw-r--r--src/term.c1
-rw-r--r--src/termcap.c1
-rw-r--r--src/terminal.c1
-rw-r--r--src/terminfo.c1
-rw-r--r--src/textprop.c2
-rw-r--r--src/tparam.c2
-rw-r--r--src/undo.c2
-rw-r--r--src/unexaix.c1
-rw-r--r--src/unexcoff.c1
-rw-r--r--src/unexcw.c1
-rw-r--r--src/unexsol.c1
-rw-r--r--src/vm-limit.c1
-rw-r--r--src/widget.c2
-rw-r--r--src/window.c1
-rw-r--r--src/xdisp.c1
-rw-r--r--src/xfaces.c1
-rw-r--r--src/xfns.c1
-rw-r--r--src/xfont.c1
-rw-r--r--src/xftfont.c1
-rw-r--r--src/xgselect.c2
-rw-r--r--src/xmenu.c1
-rw-r--r--src/xml.c1
-rw-r--r--src/xrdb.c1
-rw-r--r--src/xselect.c1
-rw-r--r--src/xsettings.c5
-rw-r--r--src/xsmfns.c1
-rw-r--r--src/xterm.c2
98 files changed, 108 insertions, 137 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b1b4dc8bbcd..fb59e9e24dc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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]:
diff --git a/src/alloc.c b/src/alloc.c
index 25cf03dfa2e..0bfbb0c88b1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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 */
diff --git a/src/atimer.c b/src/atimer.c
index 34731920af5..80b813fe4fe 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -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"
diff --git a/src/bidi.c b/src/bidi.c
index 4186a46e19e..af0209565e2 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -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"
diff --git a/src/buffer.c b/src/buffer.c
index d512547d34e..b020edb9962 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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>
diff --git a/src/bytecode.c b/src/bytecode.c
index 97730636d0e..b151078f60f 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -33,7 +33,7 @@ by Hallvard:
*/
#include <config.h>
-#include <setjmp.h>
+
#include "lisp.h"
#include "character.h"
#include "buffer.h"
diff --git a/src/callint.c b/src/callint.c
index b11545ddea2..c4c087e83d7 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -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"
diff --git a/src/callproc.c b/src/callproc.c
index a92959a1559..9171337ee76 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -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>
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 1102054b153..e3654627576 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -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"
diff --git a/src/casetab.c b/src/casetab.c
index 3e22d0d0b77..a84bc9202d0 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -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"
diff --git a/src/category.c b/src/category.c
index 80dc6938d8b..01a6f54ad17 100644
--- a/src/category.c
+++ b/src/category.c
@@ -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"
diff --git a/src/ccl.c b/src/ccl.c
index dd37934451d..34cc1c98eea 100644
--- 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"
diff --git a/src/character.c b/src/character.c
index 37963d1878c..def1ad090fd 100644
--- a/src/character.c
+++ b/src/character.c
@@ -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"
diff --git a/src/charset.c b/src/charset.c
index 972a0598059..d8c38e5ea3b 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -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"
diff --git a/src/chartab.c b/src/chartab.c
index c14df0ebac6..e864514e336 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -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"
diff --git a/src/cm.c b/src/cm.c
index 4b17b92eebc..eda6430bafa 100644
--- 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"
diff --git a/src/cmds.c b/src/cmds.c
index 90d3cd6dced..45f7df948ae 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -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"
diff --git a/src/coding.c b/src/coding.c
index 94a2d9fea80..4b3d22f956c 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -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"
diff --git a/src/composite.c b/src/composite.c
index eddabb66d33..ae46df0a573 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -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"
diff --git a/src/data.c b/src/data.c
index 5d7f036b70d..72d7c8ccf9a 100644
--- a/src/data.c
+++ b/src/data.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 <intprops.h>
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 901820648cb..c2eefd605bb 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -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"
diff --git a/src/dired.c b/src/dired.c
index 9af5f76821b..3aa27ecf920 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -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>
diff --git a/src/dispnew.c b/src/dispnew.c
index f6186e86048..5827316a7b7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -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"
diff --git a/src/doc.c b/src/doc.c
index 02a5b4b8143..d2d664df266 100644
--- 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>
diff --git a/src/doprnt.c b/src/doprnt.c
index 3b7391f07d4..caa56d6ae88 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -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>
diff --git a/src/dosfns.c b/src/dosfns.c
index 21676f4b4f5..3c649f4d534 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -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"
diff --git a/src/editfns.c b/src/editfns.c
index 299cad07fd7..c6744648bc5 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -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>
diff --git a/src/emacs.c b/src/emacs.c
index e8150631311..1416bf76c43 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -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"
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index c0d29a640ed..d10185072cc 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -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"
diff --git a/src/eval.c b/src/eval.c
index 3c0c65e9366..6cca13a8fda 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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);
}
diff --git a/src/fileio.c b/src/fileio.c
index f0b3f0cc2fd..ca71af7ed95 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -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
diff --git a/src/filelock.c b/src/filelock.c
index 1f599c68912..17f3f253249 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -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>
diff --git a/src/floatfns.c b/src/floatfns.c
index 66d7ca4af2c..4fe209fcb61 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -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"
diff --git a/src/fns.c b/src/fns.c
index 91dc6639150..42c4f817f29 100644
--- 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>
diff --git a/src/font.c b/src/font.c
index 49a09bced28..da8c5ae52fc 100644
--- a/src/font.c
+++ b/src/font.c
@@ -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>
diff --git a/src/fontset.c b/src/fontset.c
index 2b955fe6b11..35d4bfb367e 100644
--- a/src/fontset.c
+++ b/src/fontset.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 "lisp.h"
#include "blockinput.h"
diff --git a/src/frame.c b/src/frame.c
index d10969692ee..6930dac3ce8 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -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>
diff --git a/src/fringe.c b/src/fringe.c
index 0c2109a0f8e..6e6deeddb08 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -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"
diff --git a/src/ftfont.c b/src/ftfont.c
index a85773a9a21..f07ad6f33c7 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -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>
diff --git a/src/ftxfont.c b/src/ftxfont.c
index c705ede62c4..466250bd43f 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -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"
diff --git a/src/gnutls.c b/src/gnutls.c
index a2573f6bd99..1c4693aee32 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -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"
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 884574e1062..1eb4b2cabdf 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -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>
diff --git a/src/image.c b/src/image.c
index d4e54fb7dcd..6803dbe8f00 100644
--- a/src/image.c
+++ b/src/image.c
@@ -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,
diff --git a/src/indent.c b/src/indent.c
index c60315a7f6e..053643e6319 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -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"
diff --git a/src/insdel.c b/src/insdel.c
index bfb2327a696..87010cd8251 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -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>
diff --git a/src/intervals.c b/src/intervals.c
index e508f968963..5a47cacb2dd 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -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"
diff --git a/src/keyboard.c b/src/keyboard.c
index 45638bc412b..d164083fb86 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -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);
}
DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode,
diff --git a/src/keymap.c b/src/keymap.c
index d79ff89ed67..66fb52061f9 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -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"
diff --git a/src/lisp.h b/src/lisp.h
index ca22ca81228..335ed8ba831 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -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)
-
+
+/* 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
/* 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;
diff --git a/src/lread.c b/src/lread.c
index 08a2e856c00..08d5f97292b 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -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"
diff --git a/src/macros.c b/src/macros.c
index e81068181b9..a507f12e343 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -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"
diff --git a/src/marker.c b/src/marker.c
index bfbb161a71d..0c4e8cb3b55 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -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"
diff --git a/src/menu.c b/src/menu.c
index bfdc68ca118..7b01d1faefc 100644
--- a/src/menu.c
+++ b/src/menu.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 <limits.h> /* for INT_MAX */
#include "lisp.h"
diff --git a/src/minibuf.c b/src/minibuf.c
index 4ed480a8408..8a1e0ddde86 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -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"
diff --git a/src/nsfns.m b/src/nsfns.m
index f73086eeee9..ed8d44014d5 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -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"
diff --git a/src/nsfont.m b/src/nsfont.m
index 1c9976ec6cc..eba1eb04765 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -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"
diff --git a/src/nsimage.m b/src/nsimage.m
index 8a8a3ddaae4..668664c7a20 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -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"
diff --git a/src/nsmenu.m b/src/nsmenu.m
index d0f3e45e939..3057f4f6a20 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -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"
diff --git a/src/nsselect.m b/src/nsselect.m
index e0bbfe58636..95bc1a95957 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -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"
diff --git a/src/nsterm.m b/src/nsterm.m
index f9611fd1210..f1f23ad4479 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -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>
diff --git a/src/print.c b/src/print.c
index 16116643ad0..aae13bb6764 100644
--- a/src/print.c
+++ b/src/print.c
@@ -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"
diff --git a/src/process.c b/src/process.c
index b4b05a4b2e2..6dbff6f4b16 100644
--- a/src/process.c
+++ b/src/process.c
@@ -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)
/* 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;
diff --git a/src/ralloc.c b/src/ralloc.c
index 74834333aa3..b0134ea730a 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -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"
diff --git a/src/regex.c b/src/regex.c
index 472ef727979..92264ccae23 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -126,7 +126,6 @@
that make sense only in Emacs. */
#ifdef emacs
-# include <setjmp.h>
# include "lisp.h"
# include "character.h"
# include "buffer.h"
diff --git a/src/region-cache.c b/src/region-cache.c
index c3eb087aade..832f4bfd214 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -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"
diff --git a/src/scroll.c b/src/scroll.c
index 79dd464b29e..71ce43b2e48 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -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"
diff --git a/src/search.c b/src/search.c
index 72bd5605709..99fd7971e4c 100644
--- a/src/search.c
+++ b/src/search.c
@@ -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"
diff --git a/src/sheap.c b/src/sheap.c
index 3ae14b5daec..f6022ea3ce7 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -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);
}
-
diff --git a/src/sound.c b/src/sound.c
index fe48bb277b2..0ee85312fd3 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -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"
diff --git a/src/syntax.c b/src/syntax.c
index fdd9353bb87..91ef4e66663 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -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"
diff --git a/src/sysdep.c b/src/sysdep.c
index b8f35e79146..9065b38d6fc 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -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>
diff --git a/src/term.c b/src/term.c
index 47bde5ac240..f4117d67dec 100644
--- a/src/term.c
+++ b/src/term.c
@@ -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"
diff --git a/src/termcap.c b/src/termcap.c
index d1b05e8df94..e494cd113d9 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -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>
diff --git a/src/terminal.c b/src/terminal.c
index c51a18dfa61..719c2a36111 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -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"
diff --git a/src/terminfo.c b/src/terminfo.c
index ca2d89a000b..124c452a4a9 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -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,
diff --git a/src/textprop.c b/src/textprop.c
index 2a9efba1c45..872912ea706 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -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"
diff --git a/src/tparam.c b/src/tparam.c
index 58a825c90d7..164f61d471b 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -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"
diff --git a/src/undo.c b/src/undo.c
index 9cd1d5f9f67..e878ef4dcf9 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -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"
diff --git a/src/unexaix.c b/src/unexaix.c
index c09156296f7..c01a22a79f6 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -89,7 +89,6 @@ static int adjust_lnnoptrs (int, int, const char *);
static int pagemask;
-#include <setjmp.h>
#include "lisp.h"
static void
diff --git a/src/unexcoff.c b/src/unexcoff.c
index e83042a379d..966dd58cb6e 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -120,7 +120,6 @@ static int pagemask;
#define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
-#include <setjmp.h>
#include "lisp.h"
static void
diff --git a/src/unexcw.c b/src/unexcw.c
index eae534cf4dd..96c4b4a9aec 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -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>
diff --git a/src/unexsol.c b/src/unexsol.c
index 336f3b4faea..470206d5838 100644
--- a/src/unexsol.c
+++ b/src/unexsol.c
@@ -4,7 +4,6 @@
#include "unexec.h"
#include <dlfcn.h>
-#include <setjmp.h>
#include "lisp.h"
#include "character.h"
diff --git a/src/vm-limit.c b/src/vm-limit.c
index cf697b56fdf..8de0acd1bb2 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -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"
diff --git a/src/widget.c b/src/widget.c
index 0100acc8143..fd5ad167125 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -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"
diff --git a/src/window.c b/src/window.c
index 18a550782e8..b3db1292e5c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -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"
diff --git a/src/xdisp.c b/src/xdisp.c
index 320998a5713..8e0975cf65a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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"
diff --git a/src/xfaces.c b/src/xfaces.c
index c113c1a37b7..c240a05c6c0 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -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"
diff --git a/src/xfns.c b/src/xfns.c
index 90b54d12345..8304a3df04f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -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. */
diff --git a/src/xfont.c b/src/xfont.c
index 7755b780815..1f2fd13f1b7 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -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"
diff --git a/src/xftfont.c b/src/xftfont.c
index 404b9124099..9f52eb8b233 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -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>
diff --git a/src/xgselect.c b/src/xgselect.c
index 5f4c7edfb79..c161564a322 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -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
diff --git a/src/xmenu.c b/src/xmenu.c
index 605db13e149..d03a4bc974b 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -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"
diff --git a/src/xml.c b/src/xml.c
index 7bc6130b8b1..b668525cf26 100644
--- 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>
diff --git a/src/xrdb.c b/src/xrdb.c
index 624bafa5e92..73672c9617c 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -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"
diff --git a/src/xselect.c b/src/xselect.c
index 5a3b7452c6d..ab199e0b9b9 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -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>
diff --git a/src/xsettings.c b/src/xsettings.c
index a28d75d9422..58c84495489 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -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);
diff --git a/src/xsmfns.c b/src/xsmfns.c
index cddbb2aae86..8067899f931 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -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"
diff --git a/src/xterm.c b/src/xterm.c
index 54d4f14bdd0..900a1d78b80 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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> */