From aee02d86abf8ccb168877ccbe685a8ce60a00833 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 27 Jun 2020 00:10:40 +0200 Subject: [PATCH] Workaround issue with CLANG++ on MAC --- m-atomic.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/m-atomic.h b/m-atomic.h index 0dc358e3..1e218996 100644 --- a/m-atomic.h +++ b/m-atomic.h @@ -29,11 +29,12 @@ it is hard to use this header directly with a C++ compiler like g++ or MSVC. (See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 ). - clang has no issue with this header. + clang++ has no issue with this header (except on MAC) GCC 4.9 doesn't have a working implementation of 'atomic' */ -#if defined(__cplusplus) && __cplusplus >= 201103L \ - && !defined(__clang__) && !(defined(__GNUC__) && __GNUC__ < 5) +#if defined(__cplusplus) && __cplusplus >= 201103L \ + && !(defined(__clang__) && !(defined(__APPLE__) && defined(__MACH__)) ) \ + && !(defined(__GNUC__) && __GNUC__ < 5) /* NOTE: This is what the stdatomic.h header shall do in C++ mode. */ #include