+2012-09-15 Eli Zaretskii <eliz@gnu.org>
+
+ * w32xfns.c:
+ * w32uniscribe.c:
+ * w32term.c:
+ * w32select.c:
+ * w32reg.c:
+ * w32proc.c:
+ * w32menu.c:
+ * w32inevt.c:
+ * w32heap.c:
+ * w32font.c:
+ * w32fns.c:
+ * w32console.c:
+ * w32.c:
+ * w16select.c: Remove inclusion of setjmp.h, as it is now included
+ by lisp.h. This completes removal of setjmp.h inclusion
+ erroneously announced in the previous commit. (Bug#12446)
+
+ * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
+ more accurate.
+
+ * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
+ not defined as a macro. The latter happens on MS-Windows.
+ (Bug#12446)
+
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
+ Some 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,
/* 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. */
+ substitute may munge the signal mask, but that should be OK here.
+ MinGW (MS-Windows) uses _setjmp and defines setjmp to _setjmp in
+ the system header setjmp.h; don't mess up that. */
#ifndef HAVE__SETJMP
-# define _setjmp(j) setjmp (j)
+# ifndef setjmp
+# define _setjmp(j) setjmp (j)
+# endif
# define _longjmp longjmp
#endif
# 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. */
+/* A platform that uses neither _longjmp nor siglongjmp; 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)
#include <dpmi.h>
#include <go32.h>
#include <sys/farptr.h>
-#include <setjmp.h>
#include "lisp.h"
#include "dispextern.h" /* frame.h seems to want this */
#include "frame.h" /* Need this to get the X window of selected_frame */
#include <sys/utime.h>
#include <mbstring.h> /* for _mbspbrk */
#include <math.h>
-#include <setjmp.h>
#include <time.h>
/* must include CRT headers *before* config.h */
#include <stdio.h>
#include <windows.h>
-#include <setjmp.h>
#include "lisp.h"
#include "character.h"
#include <limits.h>
#include <errno.h>
#include <math.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
#include <math.h>
#include <ctype.h>
#include <commdlg.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
#include <config.h>
#include <stdio.h>
-#include <setjmp.h>
#include "w32heap.h"
#include "lisp.h" /* for VALMASK */
#include <config.h>
#include <stdio.h>
#include <windows.h>
-#include <setjmp.h>
#ifndef MOUSE_MOVED
#define MOUSE_MOVED 1
#include <signal.h>
#include <stdio.h>
#include <mbstring.h>
-#include <setjmp.h>
#include "lisp.h"
#include "keyboard.h"
#include <fcntl.h>
#include <signal.h>
#include <sys/file.h>
-#include <setjmp.h>
/* must include CRT headers *before* config.h */
#include <config.h>
/* Written by Kevin Gallo */
#include <config.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
#include "blockinput.h"
*/
#include <config.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h" /* for all of the w32 includes */
#include "w32heap.h" /* os_subtype */
#include <config.h>
#include <signal.h>
#include <stdio.h>
-#include <setjmp.h>
#include "lisp.h"
#include "blockinput.h"
#include "w32term.h"
#define _WIN32_WINNT 0x500
#include <windows.h>
#include <usp10.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
#include <config.h>
#include <signal.h>
#include <stdio.h>
-#include <setjmp.h>
#include "lisp.h"
#include "keyboard.h"
#include "frame.h"