summaryrefslogtreecommitdiff
path: root/include/mupdf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-11-12 13:42:41 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-11-12 17:30:10 +0100
commit3114c620177e4a8dc2f15d7f9d1f73deddaa6f07 (patch)
tree6009cadd9b98b7ddac4b42fce3f2d75f09c71673 /include/mupdf
parent8a8114cc9c3ae2f9bc866e15ea9f69778c63c3a3 (diff)
downloadmupdf-3114c620177e4a8dc2f15d7f9d1f73deddaa6f07.tar.xz
Fix 697687: Use #if rather than #ifdef HAVE_SIGSETJMP.
Allows to turn it off with make XCFLAGS=-DHAVE_SIGSETJMP=0 or by adding -DHAVE_SIGSETJMP=0 to the relevant Makerules section.
Diffstat (limited to 'include/mupdf')
-rw-r--r--include/mupdf/fitz/system.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h
index c623f2cb..f43ad7d6 100644
--- a/include/mupdf/fitz/system.h
+++ b/include/mupdf/fitz/system.h
@@ -59,10 +59,14 @@ typedef unsigned __int64 uint64_t;
#ifndef __STRICT_ANSI__
#if defined(__APPLE__)
-#define HAVE_SIGSETJMP
+#ifndef HAVE_SIGSETJMP
+#define HAVE_SIGSETJMP 1
+#endif
#elif defined(__unix)
#ifndef __EMSCRIPTEN__
-#define HAVE_SIGSETJMP
+#ifndef HAVE_SIGSETJMP
+#define HAVE_SIGSETJMP 1
+#endif
#endif
#endif
#endif
@@ -75,7 +79,7 @@ typedef unsigned __int64 uint64_t;
makes a large speed difference on MacOSX (and probably other
platforms too.
*/
-#ifdef HAVE_SIGSETJMP
+#if HAVE_SIGSETJMP
#define fz_setjmp(BUF) sigsetjmp(BUF, 0)
#define fz_longjmp(BUF,VAL) siglongjmp(BUF, VAL)
#define fz_jmp_buf sigjmp_buf