Use <stdint.h> in jni.h for better x86_64 portability.
Otherwise templates won't match jlong to long or int64_t.
Change-Id: I805133d86f75691c6920bebf3d79f1ce47f0861c
diff --git a/include/nativehelper/jni.h b/include/nativehelper/jni.h
index e4d74cf..1c2fb0c 100644
--- a/include/nativehelper/jni.h
+++ b/include/nativehelper/jni.h
@@ -25,33 +25,20 @@
#define JNI_H_
#include <stdarg.h>
+#include <stdint.h>
-/*
- * Primitive types that match up with Java equivalents.
- */
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h> /* C99 */
-typedef uint8_t jboolean; /* unsigned 8 bits */
-typedef int8_t jbyte; /* signed 8 bits */
-typedef uint16_t jchar; /* unsigned 16 bits */
-typedef int16_t jshort; /* signed 16 bits */
-typedef int32_t jint; /* signed 32 bits */
-typedef int64_t jlong; /* signed 64 bits */
-typedef float jfloat; /* 32-bit IEEE 754 */
-typedef double jdouble; /* 64-bit IEEE 754 */
-#else
-typedef unsigned char jboolean; /* unsigned 8 bits */
-typedef signed char jbyte; /* signed 8 bits */
-typedef unsigned short jchar; /* unsigned 16 bits */
-typedef short jshort; /* signed 16 bits */
-typedef int jint; /* signed 32 bits */
-typedef long long jlong; /* signed 64 bits */
-typedef float jfloat; /* 32-bit IEEE 754 */
-typedef double jdouble; /* 64-bit IEEE 754 */
-#endif
+/* Primitive types that match up with Java equivalents. */
+typedef uint8_t jboolean; /* unsigned 8 bits */
+typedef int8_t jbyte; /* signed 8 bits */
+typedef uint16_t jchar; /* unsigned 16 bits */
+typedef int16_t jshort; /* signed 16 bits */
+typedef int32_t jint; /* signed 32 bits */
+typedef int64_t jlong; /* signed 64 bits */
+typedef float jfloat; /* 32-bit IEEE 754 */
+typedef double jdouble; /* 64-bit IEEE 754 */
/* "cardinal indices and sizes" */
-typedef jint jsize;
+typedef jint jsize;
#ifdef __cplusplus
/*