]> code.delx.au - gnu-emacs/blobdiff - nt/inc/ms-w32.h
Merge from origin/emacs-25
[gnu-emacs] / nt / inc / ms-w32.h
index 4fb32df0c07d0de848ae9418262ef1441e27c9cb..cdbfac03c649c575133222502accc8dc50aa3235 100644 (file)
@@ -1,6 +1,6 @@
 /* System description file for Windows NT.
 
-Copyright (C) 1993-1995, 2001-2015 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 2001-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -187,6 +187,20 @@ extern struct tm * sys_localtime (const time_t *);
 #undef HAVE__SETJMP
 #endif
 
+/* The following is needed for recovery from C stack overflows.  */
+#include <setjmp.h>
+typedef jmp_buf sigjmp_buf;
+#ifdef MINGW_W64
+/* Evidently, MinGW64's longjmp crashes when invoked from an exception
+   handler, see https://sourceforge.net/p/mingw-w64/mailman/message/32421953/.
+   This seems to be an unsolved problem in the MinGW64 runtime.  So we
+   use the GCC intrinsics instead.  FIXME.  */
+#define sigsetjmp(j,m) __builtin_setjmp(j)
+#else
+#define sigsetjmp(j,m) setjmp(j)
+#endif
+extern void w32_reset_stack_overflow_guard (void);
+
 #ifdef _MSC_VER
 #include <sys/timeb.h>
 #include <sys/stat.h>