Print this page
rev 9959 : 8026385: [macosx] (awt) setjmp/longjmp changes the process signal mask on OS X
Contributed-by: David DeHaven <>

@@ -54,10 +54,16 @@
 #include "jerror.h"
 #undef MAX
 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
+#ifdef __APPLE__
+/* use setjmp/longjmp versions that do not save/restore the signal mask */
+#define setjmp _setjmp
+#define longjmp _longjmp
 /* Cached Java method ids */
 static jmethodID JPEGImageReader_readInputDataID;
 static jmethodID JPEGImageReader_skipInputBytesID;
 static jmethodID JPEGImageReader_warningOccurredID;
 static jmethodID JPEGImageReader_warningWithMessageID;