summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-06-28 16:44:57 +0200
committerGitHub <noreply@github.com>2020-06-28 16:44:57 +0200
commit44e53924b3db97b515f9a2e032580be0d5ed433c (patch)
tree75457e95ce923ea8a39250dcb79885b1de58eba9 /src/common
parent8fdc97b3d38d938a610795b8477c2d49deea0f5c (diff)
parente3e1acb092a5ba8ddc4dcb116ec4bcf7686e140d (diff)
downloadhercules-44e53924b3db97b515f9a2e032580be0d5ed433c.tar.gz
hercules-44e53924b3db97b515f9a2e032580be0d5ed433c.tar.bz2
hercules-44e53924b3db97b515f9a2e032580be0d5ed433c.tar.xz
hercules-44e53924b3db97b515f9a2e032580be0d5ed433c.zip
Merge pull request #2778 from 4144/extendci
Extend ci with more checks and add different fixes
Diffstat (limited to 'src/common')
-rw-r--r--src/common/atomic.h3
-rw-r--r--src/common/cbasetypes.h10
-rw-r--r--src/common/hercules.h12
3 files changed, 19 insertions, 6 deletions
diff --git a/src/common/atomic.h b/src/common/atomic.h
index 518d2e6ab..b9157373f 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -103,8 +103,9 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v
// The __sync functions are available on x86 or ARMv6+
#if !defined(__x86_64__) && !defined(__i386__) \
+ && !defined(__ppc64__) && ! defined(__powerpc64__) \
&& ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 )
-#error Your Target Platfrom is not supported
+#error Target platform currently not supported
#endif
static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64 increment){
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 31d89d66b..06333a7b2 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -62,16 +62,24 @@
#endif
// Standardize the ARM platform version, if available (the only values we're interested in right now are >= ARMv6)
+#ifdef __ARM_ARCH
+#define __ARM_ARCH_VERSION__ __ARM_ARCH
+#else
#if defined(__ARMV6__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \
|| defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) // gcc ARMv6
#define __ARM_ARCH_VERSION__ 6
-#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7
+#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7
#define __ARM_ARCH_VERSION__ 7
+#elif defined(__ARM_ARCH_8__) || defined(__ARM_ARCH_8A__)
+#define __ARM_ARCH_VERSION__ 8
#elif defined(_M_ARM) // MSVC
#define __ARM_ARCH_VERSION__ _M_ARM
+#elif defined(__TARGET_ARCH_ARM) // RVCT
+#define __ARM_ARCH_VERSION__ __TARGET_ARCH_ARM
#else
#define __ARM_ARCH_VERSION__ 0
#endif
+#endif
// Necessary for __NetBSD_Version__ (defined as VVRR00PP00) on NetBSD
#ifdef __NETBSD__
diff --git a/src/common/hercules.h b/src/common/hercules.h
index 89ea761b4..e62656494 100644
--- a/src/common/hercules.h
+++ b/src/common/hercules.h
@@ -23,11 +23,15 @@
#include "config/core.h"
#include "common/cbasetypes.h"
+#ifdef HERCULES_CORE
+#define HPExport static
+#else // HERCULES_CORE
#ifdef WIN32
- #define HPExport __declspec(dllexport)
-#else
- #define HPExport __attribute__((visibility("default")))
-#endif
+#define HPExport __declspec(dllexport)
+#else // WIN32
+#define HPExport __attribute__((visibility("default")))
+#endif // WIN32
+#endif // HERCULES_CORE
#define HPShared extern