Fix INT32 typedef

Was typedefed to long - this is incorrect on many systems.

Change-Id: Ic3ece594ac2ada95e94ac41c145a7e4dc9e07ffc
diff --git a/jmorecfg.h b/jmorecfg.h
index 66116db..f878ed7 100644
--- a/jmorecfg.h
+++ b/jmorecfg.h
@@ -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 @@
  * 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 @@
  * 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 @@
 
 #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 @@
 /* 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 @@
 /* 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 @@
 /* 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 @@
 #endif
 
 #endif /* JPEG_INTERNAL_OPTIONS */
+
+#endif /* JMORECFG_H */