summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-06-03 19:32:04 -0400
committerAndrew Morrow <acm@10gen.com>2013-06-04 12:32:53 -0400
commit3ec04acb1a7183b30533678e745a920389ec8d91 (patch)
tree4e949db40d1883e0298205d203b4a95ff0576342
parentd88d25240b06a71dd6221750d97c3e5dfa941e62 (diff)
downloadmongo-3ec04acb1a7183b30533678e745a920389ec8d91.tar.gz
SERVER-9408 Don't assume Vista aware SDK when selecting Interlocked64 implementation
-rw-r--r--src/mongo/platform/atomic_intrinsics_win32.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/platform/atomic_intrinsics_win32.h b/src/mongo/platform/atomic_intrinsics_win32.h
index 91ecc8fce2c..f66e648d0c5 100644
--- a/src/mongo/platform/atomic_intrinsics_win32.h
+++ b/src/mongo/platform/atomic_intrinsics_win32.h
@@ -87,7 +87,12 @@ namespace mongo {
template <typename T>
class AtomicIntrinsics<T, typename boost::enable_if_c<sizeof(T) == sizeof(LONGLONG)>::type> {
public:
- static const bool kHaveInterlocked64 = (_WIN32_WINNT >= _WIN32_WINNT_VISTA);
+
+#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
+ static const bool kHaveInterlocked64 = true;
+#else
+ static const bool kHaveInterlocked64 = false;
+#endif
static T compareAndSwap(volatile T* dest, T expected, T newValue) {
return InterlockedImpl<kHaveInterlocked64>::compareAndSwap(dest, expected, newValue);