diff options
author | Hal Canary <halcanary@google.com> | 2014-08-01 09:29:17 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2014-08-01 16:04:01 +0000 |
commit | 021b9904279c7bcd08a66a349933fc883141db34 (patch) | |
tree | 9b35f2fdbc8b387bf9a7f92d357bc9a7c80f72e2 | |
parent | 213197252c8c4825f6572c651126c22067025fe9 (diff) | |
download | jpeg-lollipop-release.tar.gz |
Fix INT32 typedefandroid-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1lollipop-releaselollipop-devlollipop-cts-release
Was typedefed to long - this is incorrect on many systems.
Change-Id: Ic3ece594ac2ada95e94ac41c145a7e4dc9e07ffc
-rw-r--r-- | jmorecfg.h | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -10,6 +10,11 @@ * optimizations. Most users will not need to touch this file. */ +#ifndef JMORECFG_H +#define JMORECFG_H + +#include <stdint.h> + /* * Define ANDROID_RGB to enable specific optimizations for Android * JCS_RGBA_8888 support @@ -78,7 +83,7 @@ #ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char JSAMPLE; +typedef uint8_t JSAMPLE; #define GETJSAMPLE(value) ((int) (value)) #else /* not HAVE_UNSIGNED_CHAR */ @@ -103,7 +108,7 @@ typedef char JSAMPLE; * On nearly all machines "short" will do nicely. */ -typedef short JSAMPLE; +typedef int16_t JSAMPLE; #define GETJSAMPLE(value) ((int) (value)) #define MAXJSAMPLE 4095 @@ -118,7 +123,7 @@ typedef short JSAMPLE; * if you have memory to burn and "short" is really slow. */ -typedef short JCOEF; +typedef int16_t JCOEF; /* Compressed datastreams are represented as arrays of JOCTET. @@ -129,7 +134,7 @@ typedef short JCOEF; #ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char JOCTET; +typedef uint8_t JOCTET; #define GETJOCTET(value) (value) #else /* not HAVE_UNSIGNED_CHAR */ @@ -154,7 +159,7 @@ typedef char JOCTET; /* UINT8 must hold at least the values 0..255. */ #ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char UINT8; +typedef uint8_t UINT8; #else /* not HAVE_UNSIGNED_CHAR */ #ifdef CHAR_IS_UNSIGNED typedef char UINT8; @@ -166,7 +171,7 @@ typedef short UINT8; /* UINT16 must hold at least the values 0..65535. */ #ifdef HAVE_UNSIGNED_SHORT -typedef unsigned short UINT16; +typedef uint16_t UINT16; #else /* not HAVE_UNSIGNED_SHORT */ typedef unsigned int UINT16; #endif /* HAVE_UNSIGNED_SHORT */ @@ -174,13 +179,13 @@ typedef unsigned int UINT16; /* INT16 must hold at least the values -32768..32767. */ #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ -typedef short INT16; +typedef int16_t INT16; #endif /* INT32 must hold at least signed 32-bit values. */ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -typedef long INT32; +typedef int32_t INT32; #endif /* Datatype used for image dimensions. The JPEG standard only supports @@ -393,3 +398,5 @@ typedef int boolean; #endif #endif /* JPEG_INTERNAL_OPTIONS */ + +#endif /* JMORECFG_H */ |