src/share/native/sun/awt/image/jpeg/imageioJPEG.c

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


  39 #include <stdlib.h>
  40 #include <setjmp.h>
  41 #include <assert.h>
  42 #include <string.h>
  43 #include <limits.h>
  44 
  45 /* java native interface headers */
  46 #include "jni.h"
  47 #include "jni_util.h"
  48 
  49 #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h"
  50 #include "com_sun_imageio_plugins_jpeg_JPEGImageWriter.h"
  51 
  52 /* headers from the JPEG library */
  53 #include <jpeglib.h>
  54 #include "jerror.h"
  55 
  56 #undef MAX
  57 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
  58 






  59 /* Cached Java method ids */
  60 static jmethodID JPEGImageReader_readInputDataID;
  61 static jmethodID JPEGImageReader_skipInputBytesID;
  62 static jmethodID JPEGImageReader_warningOccurredID;
  63 static jmethodID JPEGImageReader_warningWithMessageID;
  64 static jmethodID JPEGImageReader_setImageDataID;
  65 static jmethodID JPEGImageReader_acceptPixelsID;
  66 static jmethodID JPEGImageReader_pushBackID;
  67 static jmethodID JPEGImageReader_passStartedID;
  68 static jmethodID JPEGImageReader_passCompleteID;
  69 static jmethodID JPEGImageWriter_writeOutputDataID;
  70 static jmethodID JPEGImageWriter_warningOccurredID;
  71 static jmethodID JPEGImageWriter_warningWithMessageID;
  72 static jmethodID JPEGImageWriter_writeMetadataID;
  73 static jmethodID JPEGImageWriter_grabPixelsID;
  74 static jfieldID JPEGQTable_tableID;
  75 static jfieldID JPEGHuffmanTable_lengthsID;
  76 static jfieldID JPEGHuffmanTable_valuesID;
  77 
  78 /*




  39 #include <stdlib.h>
  40 #include <setjmp.h>
  41 #include <assert.h>
  42 #include <string.h>
  43 #include <limits.h>
  44 
  45 /* java native interface headers */
  46 #include "jni.h"
  47 #include "jni_util.h"
  48 
  49 #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h"
  50 #include "com_sun_imageio_plugins_jpeg_JPEGImageWriter.h"
  51 
  52 /* headers from the JPEG library */
  53 #include <jpeglib.h>
  54 #include "jerror.h"
  55 
  56 #undef MAX
  57 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
  58 
  59 #ifdef __APPLE__
  60 /* use setjmp/longjmp versions that do not save/restore the signal mask */
  61 #define setjmp _setjmp
  62 #define longjmp _longjmp
  63 #endif
  64 
  65 /* Cached Java method ids */
  66 static jmethodID JPEGImageReader_readInputDataID;
  67 static jmethodID JPEGImageReader_skipInputBytesID;
  68 static jmethodID JPEGImageReader_warningOccurredID;
  69 static jmethodID JPEGImageReader_warningWithMessageID;
  70 static jmethodID JPEGImageReader_setImageDataID;
  71 static jmethodID JPEGImageReader_acceptPixelsID;
  72 static jmethodID JPEGImageReader_pushBackID;
  73 static jmethodID JPEGImageReader_passStartedID;
  74 static jmethodID JPEGImageReader_passCompleteID;
  75 static jmethodID JPEGImageWriter_writeOutputDataID;
  76 static jmethodID JPEGImageWriter_warningOccurredID;
  77 static jmethodID JPEGImageWriter_warningWithMessageID;
  78 static jmethodID JPEGImageWriter_writeMetadataID;
  79 static jmethodID JPEGImageWriter_grabPixelsID;
  80 static jfieldID JPEGQTable_tableID;
  81 static jfieldID JPEGHuffmanTable_lengthsID;
  82 static jfieldID JPEGHuffmanTable_valuesID;
  83 
  84 /*