From 0328b6de4a92676b4ad4616095ce19a4f51d1c4d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 15 Sep 2012 00:06:56 -0700 Subject: Port better to POSIX hosts lacking _setjmp. * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols. (_setjmp, _longjmp): Remove. * src/lisp.h: Include here, since we use its symbols here. All instances of '#include ' 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 --- src/xgselect.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/xgselect.c') 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 . */ #include -#include #include "xgselect.h" #if defined (USE_GTK) || defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) #include #include -#include #include "xterm.h" int -- cgit v1.2.1