aboutsummaryrefslogtreecommitdiff
path: root/src/common/platform.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-07 18:17:33 -0300
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-07 18:22:36 -0300
commitfae5933ad614ca8c2559f499ebe16b518594cca3 (patch)
tree352d4e078789f31408c8f8658ba84cc03c08cbcf /src/common/platform.h
parent4f4d230dac936f32cceb8be35fe09822d85bb2b6 (diff)
Common: Add proper macros to test for architecture pointer size
The old system of just defining macros available in some other platform was susceptible to silently using the wrong code if you forgot to include a particular header. This fixes a crash on non-Windows platforms introduced by e1fbac3ca13d37d2625c11d30cfdece4327b446b.
Diffstat (limited to 'src/common/platform.h')
-rw-r--r--src/common/platform.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/platform.h b/src/common/platform.h
index 1516dc88a7..df780ac6f0 100644
--- a/src/common/platform.h
+++ b/src/common/platform.h
@@ -57,10 +57,10 @@
#endif
-#if defined(__x86_64__) || defined(_M_X64) || defined(__alpha__) || defined(__ia64__)
-#define EMU_ARCHITECTURE_X64
-#else
-#define EMU_ARCHITECTURE_X86
+#if defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__)
+ #define EMU_ARCH_BITS 64
+#elif defined(__i386) || defined(_M_IX86) || defined(__arm__) || defined(_M_ARM)
+ #define EMU_ARCH_BITS 32
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////