Files
MINGW-packages/mingw-w64-git-git/0001-Don-t-redefine-_ReadWriteBarrier-in-malloc.c.h.patch

28 lines
1007 B
Diff

From db7d89068e976a97b2067e9d3ceaa4672f003ea3 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Tue, 22 Jul 2014 00:58:19 +0100
Subject: [PATCH 01/16] Don't redefine _ReadWriteBarrier in malloc.c.h
---
compat/nedmalloc/malloc.c.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compat/nedmalloc/malloc.c.h b/compat/nedmalloc/malloc.c.h
index f216a2a..6aeac26 100644
--- a/compat/nedmalloc/malloc.c.h
+++ b/compat/nedmalloc/malloc.c.h
@@ -1382,7 +1382,9 @@ LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
/*** Atomic operations ***/
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- #define _ReadWriteBarrier() __sync_synchronize()
+ #if !defined(_ReadWriteBarrier)
+ #define _ReadWriteBarrier() __sync_synchronize()
+ #endif
#else
static __inline__ __attribute__((always_inline)) long __sync_lock_test_and_set(volatile long * const Target, const long Value)
{
--
2.1.2