nomlib
29 #ifndef NOMLIB_TYPES_HEADERS
30 #define NOMLIB_TYPES_HEADERS
39 typedef uint8_t uint8;
42 typedef int16_t int16;
43 typedef uint16_t uint16;
46 typedef int32_t int32;
47 typedef uint32_t uint32;
50 typedef signed long long int int64;
51 typedef unsigned long long int uint64;
54 #if defined ( NOM_PLATFORM_ARCH_X86_64 )
55 typedef unsigned long ulong;
56 #else // Blindly assume 32-bit arch
57 typedef long long ulong;
60 typedef unsigned char uchar;
61 typedef signed int sint;
62 typedef unsigned int uint;
67 static_assert (
sizeof ( nom::uint8 ) == 1,
"nom::uint8" );
68 static_assert (
sizeof ( nom::int8 ) == 1,
"nom::int8" );
70 static_assert (
sizeof ( nom::uint16 ) == 2,
"nom::uint16" );
71 static_assert (
sizeof ( nom::int16 ) == 2,
"nom::int16" );
73 static_assert (
sizeof ( nom::uint32 ) == 4,
"nom::uint32" );
74 static_assert (
sizeof ( nom::int32 ) == 4,
"nom::int32" );
76 static_assert (
sizeof ( nom::uint64 ) == 8,
"nom::uint64" );
77 static_assert (
sizeof ( nom::int64 ) == 8,
"nom::int64" );
79 static_assert (
sizeof ( nom::ulong ) == 8,
"nom::ulong" );
82 static_assert (
sizeof ( nom::uchar ) == 1,
"nom::uchar" );
84 #endif // NOMLIB_TYPES_HEADERS defined