Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #pragma once
00015
00019 #ifndef KNET_NO_FIXEDWIDTH_TYPES
00020
00021
00022
00023
00024 #if (__STDC_VERSION__ >= 199901L) || (_MSC_VER >= 1600)
00025
00026 #include <cstdint>
00027
00028 typedef uint8_t u8;
00029 typedef uint16_t u16;
00030 typedef uint32_t u32;
00031 typedef uint64_t u64;
00032
00033 typedef int8_t s8;
00034 typedef int16_t s16;
00035 typedef int32_t s32;
00036 typedef int64_t s64;
00037
00038
00039 #elif KNET_USE_BOOST
00040
00041 #include <boost/cstdint.hpp>
00042
00043 typedef boost::uint8_t u8;
00044 typedef boost::uint16_t u16;
00045 typedef boost::uint32_t u32;
00046 typedef boost::uint64_t u64;
00047
00048 typedef boost::int8_t s8;
00049 typedef boost::int16_t s16;
00050 typedef boost::int32_t s32;
00051 typedef boost::int64_t s64;
00052
00053 #else // No boost or unknown if we have C99. Have to guess the following are correct.
00054
00055 #warning "Not using boost and C99 not defined. Guessing the built-ins for fixed-width types!"
00056
00057 typedef unsigned char u8;
00058 typedef unsigned short u16;
00059 typedef unsigned int u32;
00060 typedef unsigned long long u64;
00061
00062 typedef signed char s8;
00063 typedef signed short s16;
00064 typedef signed int s32;
00065 typedef signed long long s64;
00066
00067 #endif
00068
00069 #endif // ~KNET_NO_FIXEDWIDTH_TYPES