1 #ifndef _TYPES_H_ 2 #define _TYPES_H_ 3 4 typedef signed char int8; 5 typedef unsigned char uint8; 6 7 typedef short int16; 8 typedef unsigned short uint16; 9 10 typedef int int32; 11 12 //Fixes compilation problem under xcode 13 #ifndef _UINT32 14 #define _UINT32 15 typedef unsigned int uint32; 16 #endif 17 18 typedef long long int64; 19 typedef unsigned long long uint64; 20 21 static_assert(sizeof(int8) == 1, "int8 size must be 1 byte."); 22 static_assert(sizeof(uint8) == 1, "uint8 size must be 1 byte."); 23 24 static_assert(sizeof(int16) == 2, "int16 size must be 2 bytes."); 25 static_assert(sizeof(uint16) == 2, "uint16 size must be 2 bytes."); 26 27 static_assert(sizeof(int32) == 4, "int32 size must be 4 bytes."); 28 static_assert(sizeof(uint32) == 4, "uint32 size must be 4 bytes."); 29 30 static_assert(sizeof(int64) == 8, "int64 size must be 8 bytes."); 31 static_assert(sizeof(uint64) == 8, "uint64 size must be 8 bytes."); 32 33 #endif 34