From 10c7c4157f02e3abbb7a0505bfc2985b67e04043 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 1 Aug 2012 18:46:49 +0300 Subject: [PATCH] Use Int64 from inttypes.h, and proper defines --- source/type.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/type.h b/source/type.h index 72d148a..701a5dc 100644 --- a/source/type.h +++ b/source/type.h @@ -1,6 +1,7 @@ #ifndef MSP_DATAFILE_TYPE_H_ #define MSP_DATAFILE_TYPE_H_ +#include #include namespace Msp { @@ -19,11 +20,7 @@ struct Symbol struct IntType { static const char signature = 'i'; -#ifdef MSVC - typedef __int64 Store; -#else - typedef long long int Store; -#endif + typedef Int64 Store; typedef Store Load; }; @@ -90,13 +87,13 @@ struct TypeInfo: IntType { }; template<> struct TypeInfo: IntType { }; -#ifdef MSVC +#if defined(_MSC_VER) template<> struct TypeInfo<__int64, false>: IntType { }; template<> struct TypeInfo: IntType { }; -#else +#elif defined(__GNUC__) template<> struct TypeInfo: IntType { }; -- 2.43.0