From b3b1f6af6627f7f5a3c932abb8382d5dbd7af6bc Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Tue, 27 Mar 2012 16:32:43 +0200 Subject: [PATCH] Make sure that the right bits.h file is always included. --- sortix/include/sortix/bits.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sortix/include/sortix/bits.h b/sortix/include/sortix/bits.h index 7a5a2e55..d54178d7 100644 --- a/sortix/include/sortix/bits.h +++ b/sortix/include/sortix/bits.h @@ -22,11 +22,19 @@ ******************************************************************************/ -#ifdef PLATFORM_X86 +#if !defined(PLATFORM_X86) && !defined(PLATFORM_X64) + #if defined(__LP64__) + #define PLATFORM_X64 + #else + #define PLATFORM_X86 + #endif +#endif + +#if defined(PLATFORM_X86) #include "x86/bits.h" -#endif - -#ifdef PLATFORM_X64 +#elif defined(PLATFORM_X64) #include "x64/bits.h" +#else +#warning Unsupported platform #endif