diff options
author | dim <dim@FreeBSD.org> | 2017-04-04 09:04:53 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-04-04 11:43:49 +0200 |
commit | e0dabc0e8dd6d9e2a21ceef124a1e4bf9f3d8aa3 (patch) | |
tree | 3914823920c1a699ba51d5ff1d0f2635095f19c7 /newlib | |
parent | 086730fb14c1c4171764e605d7510e33f0fc34ed (diff) | |
download | cygnal-e0dabc0e8dd6d9e2a21ceef124a1e4bf9f3d8aa3.tar.gz cygnal-e0dabc0e8dd6d9e2a21ceef124a1e4bf9f3d8aa3.tar.bz2 cygnal-e0dabc0e8dd6d9e2a21ceef124a1e4bf9f3d8aa3.zip |
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')
-rw-r--r-- | newlib/libc/include/sys/cdefs.h | 3 |
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. |