aboutsummaryrefslogtreecommitdiff
path: root/include/env.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-02-20 22:35:24 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit95fa2a46519d0820548ab7855b32182ff81f0435 (patch)
treeff5333b61195a0d5019eb3d0aea05a1ff1ba7897 /include/env.hpp
parent29fa87b048c20a1e6e648cb874c6da1cb7f1766a (diff)
Change linux platform from 64 to x86_64, add sibs platforms command
Diffstat (limited to 'include/env.hpp')
-rw-r--r--include/env.hpp27
1 files changed, 16 insertions, 11 deletions
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