public
Created

Diff for issue #582: fixes a problem when compiling some versions of ArangoDB 1.3 on Raspberry PI

  • Download Gist
locks-posix.c.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
index 701c1b5..53c6f37 100644
--- a/lib/BasicsC/locks-posix.c
+++ b/lib/BasicsC/locks-posix.c
@@ -569,7 +569,8 @@ bool TRI_CompareAndSwapIntegerInt32 (volatile int32_t* theValue, int32_t oldValu
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
return OSAtomicCompareAndSwap32(oldValue, newValue, theValue);
#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ // FIXME return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ return false;
#else
#error No TRI_CompareAndSwapIntegerInt32 implementation defined
#endif
@@ -579,7 +580,8 @@ bool TRI_CompareAndSwapIntegerUInt32 (volatile uint32_t* theValue, uint32_t oldV
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
return OSAtomicCompareAndSwap32((int32_t)(oldValue), (int32_t)(newValue), (volatile int32_t*)(theValue));
#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ // FIXME return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ return false;
#else
#error No TRI_CompareAndSwapIntegerUInt32 implementation defined
#endif
@@ -593,7 +595,8 @@ bool TRI_CompareAndSwapIntegerInt64 (volatile int64_t* theValue, int64_t oldValu
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
return OSAtomicCompareAndSwap64(oldValue, newValue, theValue);
#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ // FIXME return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ return false;
#else
#error No TRI_CompareAndSwapIntegerInt64 implementation defined
#endif
@@ -603,7 +606,8 @@ bool TRI_CompareAndSwapIntegerUInt64 (volatile uint64_t* theValue, uint64_t oldV
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
return OSAtomicCompareAndSwap64((int64_t)(oldValue), (int64_t)(newValue), (volatile int64_t*)(theValue));
#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ // FIXME return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ return false;
#else
#error No TRI_CompareAndSwapIntegerUInt64 implementation defined
#endif
@@ -617,7 +621,8 @@ bool TRI_CompareAndSwapPointer(void* volatile* theValue, void* oldValue, void* n
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
return OSAtomicCompareAndSwapPtr(oldValue, newValue, theValue);
#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ // FIXME return __sync_val_compare_and_swap(theValue, oldValue, newValue);
+ return false;
#else
#error No TRI_CompareAndSwapPointer implementation defined
#endif

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.