summaryrefslogtreecommitdiff
path: root/c/call_python.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2017-01-13 11:02:44 +0100
committerArmin Rigo <arigo@tunes.org>2017-01-13 11:02:44 +0100
commit57f16e1dc600e4e91d3b260c03f985e0dff41aed (patch)
tree8c49b401583a5b31d77fa81239afb2934d1bf5ea /c/call_python.c
parent0112ad819e177a51abdb5378fd933d4c577aa6ae (diff)
downloadcffi-57f16e1dc600e4e91d3b260c03f985e0dff41aed.tar.gz
Use __sync_synchronize() only if setup.py detects we have it. Fix for
people using an incredibly old gcc.
Diffstat (limited to 'c/call_python.c')
-rw-r--r--c/call_python.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/call_python.c b/c/call_python.c
index ecff127..0de556b 100644
--- a/c/call_python.c
+++ b/c/call_python.c
@@ -177,7 +177,7 @@ static int _update_cache_to_call_python(struct _cffi_externpy_s *externpy)
#if (defined(WITH_THREAD) && !defined(_MSC_VER) && \
!defined(__amd64__) && !defined(__x86_64__) && \
!defined(__i386__) && !defined(__i386))
-# if defined(__GNUC__)
+# if defined(HAVE_SYNC_SYNCHRONIZE)
# define read_barrier() __sync_synchronize()
# elif defined(_AIX)
# define read_barrier() __lwsync()