7083N/AIn-house (for now) patch to allow cffi 1.5.2 to compile with both
7083N/A@@ -150,7 +150,8 @@ static int _update_cache_to_call_python(
7083N/A #if (defined(WITH_THREAD) && !defined(_MSC_VER) && \
7083N/A !defined(__amd64__) && !defined(__x86_64__) && \
7083N/A !defined(__i386__) && !defined(__i386))
7083N/A-# define read_barrier() __sync_synchronize()
7083N/A+# define read_barrier() __compiler_barrier()
7083N/A # define read_barrier() (void)0
7083N/A@@ -32,12 +32,14 @@ static _cffi_call_python_fnptr _cffi_cal
7083N/A- /* --- Assuming a GCC not infinitely old --- */
7083N/A-# define cffi_compare_and_swap(l,o,n) __sync_bool_compare_and_swap(l,o,n)
7083N/A-# define cffi_write_barrier() __sync_synchronize()
7083N/A+# define cffi_compare_and_swap(l,o,n) \
7083N/A+ (atomic_cas_ptr((l), (o), (n)), *(l) == (n))
7083N/A+# define cffi_write_barrier() __compiler_barrier()
7083N/A # if !defined(__amd64__) && !defined(__x86_64__) && \
7083N/A !defined(__i386__) && !defined(__i386)
7083N/A-# define cffi_read_barrier() __sync_synchronize()
7083N/A+# define cffi_read_barrier() __compiler_barrier()
7083N/A # define cffi_read_barrier() (void)0