diff --git a/include/hx/StdLibs.h b/include/hx/StdLibs.h index 963a78ced..68818088b 100644 --- a/include/hx/StdLibs.h +++ b/include/hx/StdLibs.h @@ -313,7 +313,7 @@ int _hx_atomic_dec(::cpp::Pointer inPtr ); #define HX_GCC_ATOMICS #elif defined(_MSC_VER) #define HX_MSVC_ATOMICS -#include +#include #else // Nearly everyone uses GCC, Clang or MSVC, right? #error "Neither GCC, clang or MSVC is being used. Please contribute the relevant atomic instrinsics for your compiler." #endif @@ -322,7 +322,7 @@ inline int _hx_atomic_add(int *a, int b) { #if defined(HX_GCC_ATOMICS) return __atomic_fetch_add(a, b, __ATOMIC_SEQ_CST); #elif defined(HX_MSVC_ATOMICS) - return InterlockedExchangeAdd((LONG volatile *)a, b); + return _InterlockedExchangeAdd((long volatile *)a, b); #endif } @@ -330,7 +330,7 @@ inline int _hx_atomic_sub(int *a, int b) { #if defined(HX_GCC_ATOMICS) return __atomic_fetch_sub(a, b, __ATOMIC_SEQ_CST); #elif defined(HX_MSVC_ATOMICS) - return InterlockedExchangeAdd((LONG volatile *)a, -b); + return _InterlockedExchangeAdd((long volatile *)a, -b); #endif } @@ -338,7 +338,7 @@ inline int _hx_atomic_and(int *a, int b) { #if defined(HX_GCC_ATOMICS) return __atomic_fetch_and(a, b, __ATOMIC_SEQ_CST); #elif defined(HX_MSVC_ATOMICS) - return InterlockedAnd((LONG volatile *)a, b); + return _InterlockedAnd((long volatile *)a, b); #endif } @@ -346,7 +346,7 @@ inline int _hx_atomic_or(int *a, int b) { #if defined(HX_GCC_ATOMICS) return __atomic_fetch_or(a, b, __ATOMIC_SEQ_CST); #elif defined(HX_MSVC_ATOMICS) - return InterlockedOr((LONG volatile *)a, b); + return _InterlockedOr((long volatile *)a, b); #endif } @@ -354,7 +354,7 @@ inline int _hx_atomic_xor(int *a, int b) { #if defined(HX_GCC_ATOMICS) return __atomic_fetch_xor(a, b, __ATOMIC_SEQ_CST); #elif defined(HX_MSVC_ATOMICS) - return InterlockedXor((LONG volatile *)a, b); + return _InterlockedXor((long volatile *)a, b); #endif } @@ -365,7 +365,7 @@ inline int _hx_atomic_compare_exchange(int *a, int expected, __atomic_compare_exchange(a, &_expected, &replacement, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return _expected; #elif defined(HX_MSVC_ATOMICS) - return InterlockedCompareExchange((LONG volatile *)a, replacement, expected); + return _InterlockedCompareExchange((long volatile *)a, replacement, expected); #endif } @@ -375,7 +375,7 @@ inline int _hx_atomic_exchange(int *a, int replacement) { __atomic_exchange(a, &replacement, &ret, __ATOMIC_SEQ_CST); return ret; #elif defined(HX_MSVC_ATOMICS) - return InterlockedExchange((LONG volatile *)a, replacement); + return _InterlockedExchange((long volatile *)a, replacement); #endif } @@ -385,7 +385,7 @@ inline int _hx_atomic_load(int *a) { __atomic_load(a, &ret, __ATOMIC_SEQ_CST); return ret; #elif defined(HX_MSVC_ATOMICS) - return InterlockedXor((LONG volatile *)a, 0); + return _InterlockedXor((long volatile *)a, 0); #endif } @@ -394,7 +394,7 @@ inline int _hx_atomic_store(int *a, int value) { __atomic_store(a, &value, __ATOMIC_SEQ_CST); return value; #elif defined(HX_MSVC_ATOMICS) - InterlockedExchange((LONG volatile *)a, value); + _InterlockedExchange((long volatile *)a, value); return value; #endif }