Created
December 2, 2012 13:39
-
-
Save xyzz/4188724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+//! 64 bit unsigned variable. | |
+/** This is a typedef for unsigned long long, it ensures portability of the engine. */ | |
+#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) | |
+typedef unsigned __int64 u64; | |
+#elif defined(__GNUC__) && defined(__UINT64_TYPE__) | |
+typedef __UINT64_TYPE__ u64; | |
+#elif ULONG_MAX == 18446744073709551615u // 2**64 - 1 | |
+typedef unsigned long u64; | |
+#else // Fallback | |
+// Works even without C++11 with any compiler known to me. | |
+typedef unsigned long long u64; | |
+#endif | |
+//! 64 bit signed variable. | |
+/** This is a typedef for signed long long, it ensures portability of the engine. */ | |
+#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)) | |
+typedef __int64 s64; | |
+#elif defined(__GNUC__) && defined(__UINT64_TYPE__) | |
+typedef __INT64_TYPE__ s64; | |
+#elif ULONG_MAX == 18446744073709551615u // 2**64 - 1 | |
+typedef signed long s64; | |
+#else // Fallback | |
+// Works even without C++11 with any compiler known to me. | |
+typedef signed long long s64; | |
+#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment