From 95fa2a46519d0820548ab7855b32182ff81f0435 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 20 Feb 2019 22:35:24 +0100 Subject: Change linux platform from 64 to x86_64, add sibs platforms command --- include/env.hpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'include/env.hpp') diff --git a/include/env.hpp b/include/env.hpp index b25cb69..8037f26 100644 --- a/include/env.hpp +++ b/include/env.hpp @@ -11,11 +11,6 @@ #define OS_TYPE_HAIKU 10 #if defined(_WIN32) || defined(_WIN64) - #if defined(_WIN64) - #define SIBS_ENV_64BIT - #else - #define SIBS_ENV_32BIT - #endif #define OS_FAMILY OS_FAMILY_WINDOWS #define OS_TYPE OS_TYPE_WINDOWS @@ -64,12 +59,18 @@ #define OS_TYPE OS_TYPE_LINUX #endif -#if defined(__GNUC__) - #if defined(__x86_64__) || defined(__pc64__) - #define SIBS_ENV_64BIT - #else - #define SIBS_ENV_32BIT - #endif +#if defined(__aarch64__) + #define SIBS_ARCH_ARM + #define SIBS_ENV_64BIT +#elif defined(__arm__) || defined(_ARM) || defined(_M_ARM) || defined(__arm) + #define SIBS_ARCH_ARM + #define SIBS_ENV_32BIT +#elif defined(__x86_64__) || defined(__amd64__) || defined(__amd64) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) + #define SIBS_ARCH_X86 + #define SIBS_ENV_64BIT +#elif defined(i386) || defined(__i386) || defined(__i386__) || defined(__IA32__) || defined(_M_I86) || defined(_M_IX86) || defined(__X86__) || defined(_X86_) + #define SIBS_ARCH_X86 + #define SIBS_ENV_32BIT #endif #if !defined(SIBS_ENV_32BIT) && !defined(SIBS_ENV_64BIT) @@ -84,6 +85,10 @@ #error "System not supported. Only Windows, linux, macos and openbsd systems supported right now" #endif +#if !defined(SIBS_ARCH_ARM) && !defined(SIBS_ARCH_X86) + #error "System is not detected as either arm or x86" +#endif + #if !defined(DEBUG) && !defined(NDEBUG) #define DEBUG #endif -- cgit v1.2.3