From 11b11347a04310cce503dda5d49576dfa86a5d3e Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 17 Oct 2013 16:53:19 -0700 Subject: [PATCH] cmThread.c : Changed OS_64 cond. compilation to OS_VER_10_6. This needs more work to fix correctly. --- cmThread.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmThread.c b/cmThread.c index 18c5f0b..fc4bf3f 100644 --- a/cmThread.c +++ b/cmThread.c @@ -1290,6 +1290,8 @@ bool cmThFloatCAS( float* addr, float old, float new ) #endif } +#define OS_VER_10_6 + bool cmThPtrCAS( void* addr, void* old, void* neww ) { #ifdef OS_OSX @@ -1302,7 +1304,7 @@ bool cmThPtrCAS( void* addr, void* old, void* neww ) union { void* addr; -#ifdef OS_64 +#ifdef OS_VER_10_6 int64_t val; #else int val; @@ -1314,7 +1316,7 @@ bool cmThPtrCAS( void* addr, void* old, void* neww ) ov.u.addr = old; nv.u.addr = neww; -#ifdef OS_64 +#ifdef OS_VER_10_6 int rv = OSAtomicCompareAndSwap64Barrier(ov.u.val,nv.u.val,(int64_t*)addr); #else int rv = OSAtomicCompareAndSwap32Barrier(ov.u.val,nv.u.val,(int*)addr); @@ -1323,7 +1325,7 @@ bool cmThPtrCAS( void* addr, void* old, void* neww ) #endif #ifdef OS_LINUX -#ifdef OS_64 +#ifdef OS_VER_10_6 return __sync_bool_compare_and_swap((long long*)addr, (long long)old, (long long)neww); #else return __sync_bool_compare_and_swap((int*)addr,(int)old,(int)neww);