Support building qcms on Android

Bug 556405. Use be32 and be16 instead __be32 and __be16 as the underscore versions can
conflict with system types.
diff --git a/iccread.c b/iccread.c
index 276400b..c1e853d 100644
--- a/iccread.c
+++ b/iccread.c
@@ -25,15 +25,14 @@
 #include <stdlib.h>
 #include "qcmsint.h"
 
-//XXX: use a better typename
-typedef uint32_t __be32;
-typedef uint16_t __be16;
+typedef uint32_t be32;
+typedef uint16_t be16;
 
 #if 0
 not used yet
 /* __builtin_bswap isn't available in older gccs
  * so open code it for now */
-static __be32 cpu_to_be32(int32_t v)
+static be32 cpu_to_be32(int32_t v)
 {
 #ifdef IS_LITTLE_ENDIAN
 	return ((v & 0xff) << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | ((v & 0xff000000) >> 24);
@@ -43,7 +42,7 @@
 }
 #endif
 
-static uint32_t be32_to_cpu(__be32 v)
+static uint32_t be32_to_cpu(be32 v)
 {
 #ifdef IS_LITTLE_ENDIAN
 	return ((v & 0xff) << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | ((v & 0xff000000) >> 24);
@@ -53,7 +52,7 @@
 #endif
 }
 
-static uint32_t be16_to_cpu(__be16 v)
+static uint16_t be16_to_cpu(be16 v)
 {
 #ifdef IS_LITTLE_ENDIAN
 	return ((v & 0xff) << 8) | ((v & 0xff00) >> 8);
@@ -87,8 +86,8 @@
 		invalid_source(mem, "Invalid offset");
 		return 0;
 	} else {
-		__be32 k;
-		memcpy(&k, mem->buf + offset, sizeof(__be32));
+		be32 k;
+		memcpy(&k, mem->buf + offset, sizeof(k));
 		return be32_to_cpu(k);
 	}
 }
@@ -99,8 +98,8 @@
 		invalid_source(mem, "Invalid offset");
 		return 0;
 	} else {
-		__be16 k;
-		memcpy(&k, mem->buf + offset, sizeof(__be16));
+		be16 k;
+		memcpy(&k, mem->buf + offset, sizeof(k));
 		return be16_to_cpu(k);
 	}
 }
@@ -781,7 +780,7 @@
 	uint32_t length, remaining_length;
 	qcms_profile *profile;
 	size_t read_length;
-	__be32 length_be;
+	be32 length_be;
 	void *data;
 
 	fread(&length_be, sizeof(length), 1, file);
@@ -795,7 +794,7 @@
 		return NO_MEM_PROFILE;
 
 	/* copy in length to the front so that the buffer will contain the entire profile */
-	*((__be32*)data) = length_be;
+	*((be32*)data) = length_be;
 	remaining_length = length - sizeof(length_be);
 
 	/* read the rest profile */
diff --git a/qcmstypes.h b/qcmstypes.h
index 6394f90..26c138a 100644
--- a/qcmstypes.h
+++ b/qcmstypes.h
@@ -12,7 +12,7 @@
 #include <sys/int_types.h>
 #elif defined (_AIX)
 #include <sys/types.h>
-#else
+#elif !defined(ANDROID)
 typedef PRInt8 int8_t;
 typedef PRUint8 uint8_t;
 typedef PRInt16 int16_t;