From d7913a02cecadf995d05c85e51e03d5af6a13f6c Mon Sep 17 00:00:00 2001 From: Shido Date: Wed, 6 Nov 2013 14:20:55 +0800 Subject: Added _MSC_VER check. * This will check if C/C++ Compiler Version since VER 18.00 already defined Interlocked/Interlocked64. Signed-off-by: Shido --- src/common/atomic.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common') 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__) -- cgit v1.2.3-60-g2f50