-typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned long uint32;
+#include <inttypes.h>
+typedef int8_t int8;
+typedef int16_t int16;
+typedef int32_t int32;
+
+typedef uint8_t uint8;
+typedef uint16_t uint16;
+typedef uint32_t uint32;
+
+//typedef unsigned char uint8;
+//typedef unsigned short uint16;
+//typedef unsigned long uint32;
+
+#ifndef __cplusplus
+#define bool int
+#endif