Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2017-04-04 10:04:53 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-04-04 12:43:49 +0300
commite0dabc0e8dd6d9e2a21ceef124a1e4bf9f3d8aa3 (patch)
tree3914823920c1a699ba51d5ff1d0f2635095f19c7 /newlib/libc/include/sys
parent086730fb14c1c4171764e605d7510e33f0fc34ed (diff)
Stop exposing the C11 _Atomic() macro in <sys/cdefs.h>, when compiling for C++.
It clashes with the one in libc++'s <atomic> header. (Previously, the _Atomic() macro was defined in <stdatomic.h>, which is only for use with C11, but for various reasons it was moved to its current location in r251804.) Discussed with: bdrewery, ed MFC after: 2 weeks
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/cdefs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index 1e3c6b043..0c8fced27 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.h
@@ -295,7 +295,8 @@
#define _Alignof(x) __alignof(x)
#endif
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#if !defined(__cplusplus) && !__has_extension(c_atomic) && \
+ !__has_extension(cxx_atomic)
/*
* No native support for _Atomic(). Place object in structure to prevent
* most forms of direct non-atomic access.