From nobody Mon Apr 4 22:56:01 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 718FA1A8FD2E; Mon, 4 Apr 2022 22:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXR2n2m0Wz3F4s; Mon, 4 Apr 2022 22:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649112961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pwrm1LruPR1zN2O8p8sVapV17jRb35K2uNzD7BYl+LU=; b=Z/vbRRDNq/C5gUwKV72soL/17GuY5MSDqR27aAarUHwLJiQ0wnJsGcnLxcE9xOi/q/6Agg GjtvTghOAzXagA7+Oyg9zPbEwVdmTtJxOUlVlXlTJf2UFMxjkHvURIi0hNoiAlIDT18kMY JgLVrHEDr+zIFMBwqiIynt91868M2EWnWzIasuDUDol9idNkGVDuoUTgq+A8PWpkJJbjfN /9pMQW/O3LndK8y7i3CXBiW7SAuvRwG9B1qDtSJ8g25QG0r/oLyBJLzaGpOGSiA4Qlm4C4 h7+6RZBGB9gFIJ1QlWmm7BjSmzoh4knBGdxRq+6YOO5pfCbWMmNgWK25/oRDCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E0BE1AD6F; Mon, 4 Apr 2022 22:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 234Mu1hf049716; Mon, 4 Apr 2022 22:56:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 234Mu1Tt049715; Mon, 4 Apr 2022 22:56:01 GMT (envelope-from git) Date: Mon, 4 Apr 2022 22:56:01 GMT Message-Id: <202204042256.234Mu1Tt049715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 123b4031e96d - stable/13 - sys/stdatomic.h: be nicer to c++ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 123b4031e96da7953704d027c41d72d8ec0bf77d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649112961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pwrm1LruPR1zN2O8p8sVapV17jRb35K2uNzD7BYl+LU=; b=iAdQFNN1pOMoAfKD1D6Td7nZwJLpFrsyOafY8xHHh7l5v3Mv7fwi9YkcBD/8vmrWfaJ2MN 4jqmFoQrHk5M8q6204+9AhzMAbRHunbOb98I9fZsw5hJKi8LnKubnS+Yy23JqeH+oKgZ81 kCHA91J9SMuyWEsIL2VBzcwDaEJ9sZ+DhUMgUqHHzZFr1rSWMVG30nc86CQcEdVxYrgJCQ MkzF4by/UNp5VJXAgk/bjTF4xV3HL8vY7tM6stakGsk37TCAZIeLFRW6Dtl1idFQG9WZGf MUOkDbr0PIW/TaWuH/xSWn5tPZat+p8r6ZT29jqpt5cqYcyk/DynGgc4bH3dyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649112961; a=rsa-sha256; cv=none; b=ptx7nSHXDW+LSe1WhB97x+F25rWWrBbuON8/GCdQ8ODlo9CadNUz6AXc9RskJYhWZ3GfVg SHEbWzd2yuiT7D4yb9k98mKo8cefwmx0/13VuEBnhwEevA3HBJkvr9742ny3xvXMqJGYfy ZQX/OqHJiOZFPVZXb18zO7u9cFwTODajuX43KSwqch0XDNiv3en9wmVMCM/pWcjHaUTMgm 6d/bwyGyfKOJ+7oTbVgn0qInZbnQZgbfuKtUpkyFFkV8RO4BNfrikU1H6HnPTDEHyhZpyh fU5nrXN8D+UN1Tu6t70qekNHbafHA1u/t57blSZdDCu/QiCjL1/Cyr0I8ovsUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=123b4031e96da7953704d027c41d72d8ec0bf77d commit 123b4031e96da7953704d027c41d72d8ec0bf77d Author: Konstantin Belousov AuthorDate: 2022-03-27 21:16:15 +0000 Commit: Konstantin Belousov CommitDate: 2022-04-04 22:55:33 +0000 sys/stdatomic.h: be nicer to c++ PR: 262683 (cherry picked from commit c1a24b9dbeade11bfeedc91996672582f6ea32f2) --- sys/sys/stdatomic.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index 4dc6d680f934..f4fd1c6ae60e 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -163,6 +163,11 @@ atomic_signal_fence(memory_order __order __unused) #endif } +#if defined(__cplusplus) && !defined(_Bool) +#define _Bool bool +#define __bool_locally_defined +#endif + /* * 7.17.5 Lock-free property. */ @@ -406,4 +411,9 @@ atomic_flag_clear(volatile atomic_flag *__object) } #endif /* !_KERNEL */ +#ifdef __bool_locally_defined +#undef _Bool +#undef __bool_locally_defined +#endif + #endif /* !_STDATOMIC_H_ */