summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-09-15 11:03:11 +0300
committerEli Zaretskii <eliz@gnu.org>2012-09-15 11:03:11 +0300
commit7105c8cbf3a3226701e4d2ecb0b9c2d207648a98 (patch)
treeea1d91884504460ebb6ac7cad3efabdc41d956e5
parent0328b6de4a92676b4ad4616095ce19a4f51d1c4d (diff)
downloademacs-7105c8cbf3a3226701e4d2ecb0b9c2d207648a98.tar.gz
Fix MS-Windows build broken by 2012-09-15T07:06:56Z!eggert@cs.ucla.edu, completing fix for bug #12446.
src/w32xfns.c: src/w32uniscribe.c: src/w32term.c: src/w32select.c: src/w32reg.c: src/w32proc.c: src/w32menu.c: src/w32inevt.c: src/w32heap.c: src/w32font.c: src/w32fns.c: src/w32console.c: src/w32.c: src/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. src/lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary more accurate. src/image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is not defined as a macro. The latter happens on MS-Windows.
-rw-r--r--src/ChangeLog28
-rw-r--r--src/image.c8
-rw-r--r--src/lisp.h3
-rw-r--r--src/w16select.c1
-rw-r--r--src/w32.c1
-rw-r--r--src/w32console.c1
-rw-r--r--src/w32fns.c1
-rw-r--r--src/w32font.c1
-rw-r--r--src/w32heap.c1
-rw-r--r--src/w32inevt.c1
-rw-r--r--src/w32menu.c1
-rw-r--r--src/w32proc.c1
-rw-r--r--src/w32reg.c1
-rw-r--r--src/w32select.c1
-rw-r--r--src/w32term.c1
-rw-r--r--src/w32uniscribe.c1
-rw-r--r--src/w32xfns.c1
17 files changed, 35 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fb59e9e24dc..f9d31b08abd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,8 +1,34 @@
+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,
diff --git a/src/image.c b/src/image.c
index 6803dbe8f00..02151c500cc 100644
--- a/src/image.c
+++ b/src/image.c
@@ -5516,9 +5516,13 @@ init_png_functions (Lisp_Object libraries)
/* 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
diff --git a/src/lisp.h b/src/lisp.h
index 335ed8ba831..447c6bd296b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1977,7 +1977,8 @@ 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. */
+/* 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)
diff --git a/src/w16select.c b/src/w16select.c
index 2026de7421d..a3f6f1fb9ae 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -31,7 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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 */
diff --git a/src/w32.c b/src/w32.c
index 04f7471577c..bcb0511e2fa 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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 */
diff --git a/src/w32console.c b/src/w32console.c
index 76585851e7f..b22b09af2f2 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <windows.h>
-#include <setjmp.h>
#include "lisp.h"
#include "character.h"
diff --git a/src/w32fns.c b/src/w32fns.c
index ec1acbd89d9..be008bb18c8 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <limits.h>
#include <errno.h>
#include <math.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
diff --git a/src/w32font.c b/src/w32font.c
index 8b3a0e4312e..833b7cdfb25 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <math.h>
#include <ctype.h>
#include <commdlg.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
diff --git a/src/w32heap.c b/src/w32heap.c
index 26cc9aa0a0f..dc65198f90b 100644
--- a/src/w32heap.c
+++ b/src/w32heap.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>
#include "w32heap.h"
#include "lisp.h" /* for VALMASK */
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 731dd6715dc..ee07db5335b 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
#include <windows.h>
-#include <setjmp.h>
#ifndef MOUSE_MOVED
#define MOUSE_MOVED 1
diff --git a/src/w32menu.c b/src/w32menu.c
index d4de73a0de7..fa7db64f147 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -22,7 +22,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <signal.h>
#include <stdio.h>
#include <mbstring.h>
-#include <setjmp.h>
#include "lisp.h"
#include "keyboard.h"
diff --git a/src/w32proc.c b/src/w32proc.c
index 74427e76a4f..26a0925ad87 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <fcntl.h>
#include <signal.h>
#include <sys/file.h>
-#include <setjmp.h>
/* must include CRT headers *before* config.h */
#include <config.h>
diff --git a/src/w32reg.c b/src/w32reg.c
index 9c727ae5ab7..8a6a3c853b1 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Kevin Gallo */
#include <config.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
#include "blockinput.h"
diff --git a/src/w32select.c b/src/w32select.c
index 3fb88d4f17f..11c68c9c617 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -73,7 +73,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*/
#include <config.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h" /* for all of the w32 includes */
#include "w32heap.h" /* os_subtype */
diff --git a/src/w32term.c b/src/w32term.c
index 28c1c593cf6..69a16e1852b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <signal.h>
#include <stdio.h>
-#include <setjmp.h>
#include "lisp.h"
#include "blockinput.h"
#include "w32term.h"
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index cf99d14dc77..5d160b9d42f 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -27,7 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define _WIN32_WINNT 0x500
#include <windows.h>
#include <usp10.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 820dbcc76c6..33f40fc7c01 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <signal.h>
#include <stdio.h>
-#include <setjmp.h>
#include "lisp.h"
#include "keyboard.h"
#include "frame.h"