summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShido <the.keikun@gmail.com>2013-11-06 14:20:55 +0800
committerShido <the.keikun@gmail.com>2013-11-07 08:33:09 +0800
commitd7913a02cecadf995d05c85e51e03d5af6a13f6c (patch)
tree55f5d7d75d9fca67fe9939e507e9d1d987259eaf
parentf352f73e381b548ede0360d4fdec91d2e6104a77 (diff)
downloadhercules-d7913a02cecadf995d05c85e51e03d5af6a13f6c.tar.gz
hercules-d7913a02cecadf995d05c85e51e03d5af6a13f6c.tar.bz2
hercules-d7913a02cecadf995d05c85e51e03d5af6a13f6c.tar.xz
hercules-d7913a02cecadf995d05c85e51e03d5af6a13f6c.zip
Added _MSC_VER check.
* This will check if C/C++ Compiler Version since VER 18.00 already defined Interlocked/Interlocked64. Signed-off-by: Shido <the.keikun@gmail.com>
-rw-r--r--src/common/atomic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/atomic.h b/src/common/atomic.h
index b1a4bda92..5a2ddb4f0 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -19,6 +19,9 @@
#if defined(_MSC_VER)
#include "../common/winapi.h"
+// This checks if C/C++ Compiler Version is 18.00
+#if _MSC_VER < 1800
+
#if !defined(_M_X64)
// When compiling for windows 32bit, the 8byte interlocked operations are not provided by microsoft
// (because they need at least i586 so its not generic enough.. ... )
@@ -80,6 +83,8 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v
#endif //endif 32bit windows
+#endif //endif _msc_ver check
+
#elif defined(__GNUC__)
#if !defined(__x86_64__) && !defined(__i386__)