From c30b65a0ea3495e8cba753ea19a53b3bab4f0ebb Mon Sep 17 00:00:00 2001 From: Anthony Williams Date: Tue, 26 Sep 2006 16:31:41 +0000 Subject: [PATCH] Added #ifdef _WIN64 around a direct call to InterlockedCompareExchange rather than the existing call through ice_wrapper. The platform SDK library for Win64 doesn't include a library version of InterlockedCompareExchange which the ice_wrapper code requires. [SVN r35340] --- src/once.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/once.cpp b/src/once.cpp index 4332f49a..bbbfae60 100644 --- a/src/once.cpp +++ b/src/once.cpp @@ -113,7 +113,11 @@ inline LONG ice_wrapper(LPVOID (__stdcall *ice)(LPVOID*, LPVOID, LPVOID), // according to the above function type wrappers. inline LONG compare_exchange(volatile LPLONG dest, LONG exch, LONG cmp) { +#ifdef _WIN64 + return InterlockedCompareExchange(dest, exch, cmp); +#else return ice_wrapper(&InterlockedCompareExchange, dest, exch, cmp); +#endif } } #endif