From 9fcaef134fbaa7ad2a1d92a6281db8c1fcda0010 Mon Sep 17 00:00:00 2001 From: Mark Florisson Date: Sat, 16 Feb 2013 00:21:36 +0000 Subject: [PATCH] Disable atomic refcounting on windows with GCC --- Cython/Utility/MemoryView_C.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cython/Utility/MemoryView_C.c b/Cython/Utility/MemoryView_C.c index 2748a25..573995c 100644 --- a/Cython/Utility/MemoryView_C.c +++ b/Cython/Utility/MemoryView_C.c @@ -23,8 +23,9 @@ typedef struct { #define __pyx_atomic_int_type int /* todo: Portland pgcc, maybe OS X's OSAtomicIncrement32, libatomic + autotools-like distutils support? Such a pain... */ -#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 || \ - (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) +#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 || \ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) && \ + !defined(WIN32) && !defined(MS_WINDOWS) /* gcc >= 4.1.2 */ #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1) -- 2.7.4