]> git.tdb.fi Git - libs/datafile.git/commitdiff
Use Int64 from inttypes.h, and proper defines
authorMikko Rasa <tdb@tdb.fi>
Wed, 1 Aug 2012 15:46:49 +0000 (18:46 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 1 Aug 2012 15:46:49 +0000 (18:46 +0300)
source/type.h

index 72d148a0e16631b2440747fd2c20a1556597b728..701a5dc9786533f930e6c49778988f6816f83189 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_DATAFILE_TYPE_H_
 #define MSP_DATAFILE_TYPE_H_
 
 #ifndef MSP_DATAFILE_TYPE_H_
 #define MSP_DATAFILE_TYPE_H_
 
+#include <msp/core/inttypes.h>
 #include <msp/strings/lexicalcast.h>
 
 namespace Msp {
 #include <msp/strings/lexicalcast.h>
 
 namespace Msp {
@@ -19,11 +20,7 @@ struct Symbol
 struct IntType
 {
        static const char signature = 'i';
 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;
 };
 
        typedef Store Load;
 };
 
@@ -90,13 +87,13 @@ struct TypeInfo<long int, false>: IntType { };
 template<>
 struct TypeInfo<unsigned long int, false>: IntType { };
 
 template<>
 struct TypeInfo<unsigned long int, false>: IntType { };
 
-#ifdef MSVC
+#if defined(_MSC_VER)
 template<>
 struct TypeInfo<__int64, false>: IntType { };
 
 template<>
 struct TypeInfo<unsigned __int64, false>: IntType { };
 template<>
 struct TypeInfo<__int64, false>: IntType { };
 
 template<>
 struct TypeInfo<unsigned __int64, false>: IntType { };
-#else
+#elif defined(__GNUC__)
 template<>
 struct TypeInfo<long long int, false>: IntType { };
 
 template<>
 struct TypeInfo<long long int, false>: IntType { };