Date: Sun, 29 May 2016 17:32:19 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300967 - head/sys/sys Message-ID: <201605291732.u4THWJMD053819@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Sun May 29 17:32:19 2016 New Revision: 300967 URL: https://svnweb.freebsd.org/changeset/base/300967 Log: 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 Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun May 29 17:26:40 2016 (r300966) +++ head/sys/sys/cdefs.h Sun May 29 17:32:19 2016 (r300967) @@ -275,7 +275,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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605291732.u4THWJMD053819>