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 e1fbac3ca1
.
This commit is contained in:
parent
4f4d230dac
commit
fae5933ad6
5 changed files with 11 additions and 17 deletions
|
@ -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
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue