From 3114c620177e4a8dc2f15d7f9d1f73deddaa6f07 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 12 Nov 2018 13:42:41 +0100 Subject: 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. --- include/mupdf/fitz/system.h | 10 +++++++--- 1 file 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 -- cgit v1.2.3