mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-18 17:37:53 +00:00
8026385: [macosx] (awt) setjmp/longjmp changes the process signal mask on OS X
Use _setjmp/_longjmp instead Reviewed-by: prr, anthony
This commit is contained in:
parent
ba597e32a7
commit
bf464ca61b
@ -56,6 +56,12 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
/* Cached Java method ids */
|
||||
static jmethodID JPEGImageReader_readInputDataID;
|
||||
static jmethodID JPEGImageReader_skipInputBytesID;
|
||||
|
||||
@ -47,6 +47,12 @@
|
||||
#include <jpeglib.h>
|
||||
#include "jerror.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* use setjmp/longjmp versions that do not save/restore the signal mask */
|
||||
#define setjmp _setjmp
|
||||
#define longjmp _longjmp
|
||||
#endif
|
||||
|
||||
/* The method IDs we cache. Note that the last two belongs to the
|
||||
* java.io.InputStream class.
|
||||
*/
|
||||
|
||||
@ -30,6 +30,12 @@
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* use setjmp/longjmp versions that do not save/restore the signal mask */
|
||||
#define setjmp _setjmp
|
||||
#define longjmp _longjmp
|
||||
#endif
|
||||
|
||||
/* stream input handling */
|
||||
|
||||
typedef struct
|
||||
|
||||
@ -71,7 +71,12 @@ SplashDecodePng(Splash * splash, png_rw_ptr read_func, void *io_ptr)
|
||||
goto done;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* use setjmp/longjmp versions that do not save/restore the signal mask */
|
||||
if (_setjmp(png_set_longjmp_fn(png_ptr, _longjmp, sizeof(jmp_buf)))) {
|
||||
#else
|
||||
if (setjmp(png_jmpbuf(png_ptr))) {
|
||||
#endif
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user