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