summaryrefslogtreecommitdiff
path: root/src/common/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/atomic.h')
-rw-r--r--src/common/atomic.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/atomic.h b/src/common/atomic.h
index b1a4bda92..c2227a9d4 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -1,8 +1,8 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _rA_ATOMIC_H_
-#define _rA_ATOMIC_H_
+#ifndef _COMMON_ATOMIC_H_
+#define _COMMON_ATOMIC_H_
// Atomic Operations
// (Interlocked CompareExchange, Add .. and so on ..)
@@ -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__)
@@ -139,4 +144,4 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){
#endif //endif compiler decission
-#endif
+#endif /* _COMMON_ATOMIC_H_ */