From owner-svn-src-stable-10@freebsd.org  Sun Jun 12 11:45:46 2016
Return-Path: <owner-svn-src-stable-10@freebsd.org>
Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id B198EAF012C;
 Sun, 12 Jun 2016 11:45:46 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 82BCB2DD4;
 Sun, 12 Jun 2016 11:45:46 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5CBjjOi047480;
 Sun, 12 Jun 2016 11:45:45 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5CBjjfD047479;
 Sun, 12 Jun 2016 11:45:45 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201606121145.u5CBjjfD047479@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org
 using -f
From: Dimitry Andric <dim@FreeBSD.org>
Date: Sun, 12 Jun 2016 11:45:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r301839 - stable/10/sys/sys
X-SVN-Group: stable-10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-10@freebsd.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: SVN commit messages for only the 10-stable src tree
 <svn-src-stable-10.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable-10>, 
 <mailto:svn-src-stable-10-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable-10/>
List-Post: <mailto:svn-src-stable-10@freebsd.org>
List-Help: <mailto:svn-src-stable-10-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10>, 
 <mailto:svn-src-stable-10-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 12 Jun 2016 11:45:46 -0000

Author: dim
Date: Sun Jun 12 11:45:45 2016
New Revision: 301839
URL: https://svnweb.freebsd.org/changeset/base/301839

Log:
  MFC r300967:
  
  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

Modified:
  stable/10/sys/sys/cdefs.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/sys/cdefs.h
==============================================================================
--- stable/10/sys/sys/cdefs.h	Sun Jun 12 11:13:38 2016	(r301838)
+++ stable/10/sys/sys/cdefs.h	Sun Jun 12 11:45:45 2016	(r301839)
@@ -273,7 +273,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.