From patchwork Fri Jun 24 14:52:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 1648032 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LV0W70scqz9s0w for ; Sat, 25 Jun 2022 00:53:52 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id CCDCF31E04C2; Fri, 24 Jun 2022 16:53:44 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by helium.openadk.org (Postfix) with ESMTPS id A53B931E026E for ; Fri, 24 Jun 2022 16:53:35 +0200 (CEST) Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.119]) with ESMTPSA (Nemesis) id 1M1qfu-1o6wXn0XAO-002EUi; Fri, 24 Jun 2022 16:53:35 +0200 From: Nicolas Cavallari To: devel@uclibc-ng.org Date: Fri, 24 Jun 2022 16:52:43 +0200 Message-Id: <20220624145243.8822-1-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:XgSyWkuHMnCgC9kFOvd7GRiiIzcPYoQ40oywx3i1ymLXfb4bFQR A2mO8MX8Q8mGEneDi+jCbXqfw+IchBqLt0mmCi1F+wTjuFKmdylFcm9S2elBs5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NC2W2CEVSVPX X-MailFrom: nicolas.cavallari@green-communications.fr X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH] assert: Add static_assert macro List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: See the C11 standard 7.2 ยง3 The definition is copied from glibc. --- include/assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/assert.h b/include/assert.h index ee8e85fa2..fd71e833b 100644 --- a/include/assert.h +++ b/include/assert.h @@ -76,3 +76,8 @@ __END_DECLS # endif #endif /* NDEBUG. */ + +#if defined __USE_ISOC11 && !defined __cplusplus +# undef static_assert +# define static_assert _Static_assert +#endif