From a67f63f00811de2a7af3b419a8fb354c059badc7 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 23 Feb 2019 11:42:13 -0800 Subject: fixes #890 Windows mingw interlocked exchange not quite right --- src/platform/windows/win_thread.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/platform/windows/win_thread.c') diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c index f9037f7d..158b8133 100644 --- a/src/platform/windows/win_thread.c +++ b/src/platform/windows/win_thread.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2019 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -14,9 +14,10 @@ #ifdef NNG_PLATFORM_WINDOWS -//mingw does not define InterlockedAddNoFence64, use the mingw equivelent -#ifdef __MINGW32__ || __MINGW64__ -#define InterlockedAddNoFence64(a,b) __atomic_add_fetch(a,b,__ATOMIC_RELAXED) +// mingw does not define InterlockedAddNoFence64, use the mingw equivelent +#if defined(__MINGW32__) || defined(__MINGW64__) +#define InterlockedAddNoFence64(a, b) \ + __atomic_add_fetch(a, b, __ATOMIC_RELAXED) #endif #include -- cgit v1.2.3-70-g09d2