From: Vineeth TM Date: Fri, 12 Feb 2016 02:51:54 +0000 (+0900) Subject: Merge Upstream version 1.4.2 from branch 'upstream' into tizen X-Git-Tag: accepted/tizen/ivi/20160218.025305~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb96b89aff42ae869e7be0665e09b5423cea9726;p=platform%2Fupstream%2Flibjpeg-turbo.git Merge Upstream version 1.4.2 from branch 'upstream' into tizen Signed-off-by: Vineeth TM Conflicts: cdjpeg.h jmorecfg.h wrjpgcom.c Change-Id: I5e6eb84dfad65eba7d7af43887b45e377e0bb457 --- fb96b89aff42ae869e7be0665e09b5423cea9726 diff --cc cdjpeg.h index 491d020,8461ee3..40c1784 --- a/cdjpeg.h +++ b/cdjpeg.h @@@ -155,20 -125,15 +125,15 @@@ EXTERN(FILE *) write_stdout (void) /* miscellaneous useful macros */ - #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ - #define READ_BINARY "re" - #define WRITE_BINARY "we" + #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" ++#define READ_BINARY "re" ++#define WRITE_BINARY "we" #else - #ifdef VMS /* VMS is very nonstandard */ - #define READ_BINARY "rb", "ctx=stm" - #define WRITE_BINARY "wb", "ctx=stm" - #else /* standard ANSI-compliant case */ - #define READ_BINARY "rbe" - #define WRITE_BINARY "wbe" - #endif -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" ++#define READ_BINARY "rbe" ++#define WRITE_BINARY "wbe" #endif - #ifndef EXIT_FAILURE /* define exit() codes if not provided */ + #ifndef EXIT_FAILURE /* define exit() codes if not provided */ #define EXIT_FAILURE 1 #endif #ifndef EXIT_SUCCESS diff --cc jmorecfg.h index 9852e1d,be89189..b4b1d4f --- a/jmorecfg.h +++ b/jmorecfg.h @@@ -159,9 -148,16 +148,16 @@@ typedef short INT16 /* INT32 must hold at least signed 32-bit values. */ - #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ + #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ + #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ + #ifndef _BASETSD_H /* MinGW is slightly different */ + #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ + #define __INT32_IS_ACTUALLY_LONG -typedef long INT32; +typedef int INT32; #endif + #endif + #endif + #endif /* Datatype used for image dimensions. The JPEG standard only supports * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore diff --cc rdswitch.c index c10f609,a0aa37c..759b070 --- a/rdswitch.c +++ b/rdswitch.c @@@ -188,10 -188,10 +188,10 @@@ read_scan_script (j_compress_ptr cinfo int scanno, ncomps, termchar; long val; jpeg_scan_info * scanptr; - #define MAX_SCANS 100 /* quite arbitrary limit */ + #define MAX_SCANS 100 /* quite arbitrary limit */ jpeg_scan_info scans[MAX_SCANS]; - if ((fp = fopen(filename, "r")) == NULL) { + if ((fp = fopen(filename, READ_BINARY)) == NULL) { fprintf(stderr, "Can't open scan definition file %s\n", filename); return FALSE; } diff --cc wrjpgcom.c index 671ead1,0a22f62..28d4fdc --- a/wrjpgcom.c +++ b/wrjpgcom.c @@@ -34,20 -36,15 +36,15 @@@ extern void * malloc () #endif #endif - #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ - #define READ_BINARY "re" - #define WRITE_BINARY "we" + #ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" ++#define READ_BINARY "re" ++#define WRITE_BINARY "we" #else - #ifdef VMS /* VMS is very nonstandard */ - #define READ_BINARY "rb", "ctx=stm" - #define WRITE_BINARY "wb", "ctx=stm" - #else /* standard ANSI-compliant case */ - #define READ_BINARY "rbe" - #define WRITE_BINARY "wbe" - #endif -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" ++#define READ_BINARY "rbe" ++#define WRITE_BINARY "wbe" #endif - #ifndef EXIT_FAILURE /* define exit() codes if not provided */ + #ifndef EXIT_FAILURE /* define exit() codes if not provided */ #define EXIT_FAILURE 1 #endif #ifndef EXIT_SUCCESS @@@ -439,9 -432,9 +432,9 @@@ main (int argc, char **argv keep_COM = 0; } else if (keymatch(arg, "cfile", 2)) { if (++argn >= argc) usage(); - if ((comment_file = fopen(argv[argn], "r")) == NULL) { + if ((comment_file = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); } } else if (keymatch(arg, "comment", 1)) { if (++argn >= argc) usage();