From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27175 invoked from network); 31 May 2023 09:24:32 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 31 May 2023 09:24:32 -0000 Received: (qmail 1321 invoked by uid 550); 31 May 2023 09:23:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 1031 invoked from network); 31 May 2023 09:23:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=x5LDOaiF+rgW00tPeb3iN7VnDFfsbqpkPEuQkeXa7ME=; b=kwIdRWigeAlNswoRI4XQgSgRtiM+a7Bz6zVGVe6pQCbR9k0VvoB1/OVq JBJ/eD9kceMIEFy5cjL7LD7UrKgwCIizjlxWxeUAM76Y+zfN7pcIW9Byw 1Bu1T5CFYHjJCpNe/xl9LETbdbu4UKXcm0tl2Mpu5mAsScpq/g5+DAm55 w=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=Jens.Gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.00,205,1681164000"; d="scan'208";a="57428746" From: Jens Gustedt To: musl@lists.openwall.com Date: Wed, 31 May 2023 11:22:56 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [C23 divers headers 09/17] C23: update stdbool.h C23 has false, true and bool as keywords, so this file is basically not needed for modern applications. It is only provided for backwards compatibility. Implementations may also provide macros in addition to the keywords, so we do that because some user code may rely on these. --- include/stdbool.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/stdbool.h b/include/stdbool.h index a9d7ab78..d9df7524 100644 --- a/include/stdbool.h +++ b/include/stdbool.h @@ -1,11 +1,17 @@ -#ifndef _STDBOOL_H -#define _STDBOOL_H +#ifndef __STDC_VERSION_STDBOOL_H__ +#define __STDC_VERSION_STDBOOL_H__ 202311L #ifndef __cplusplus +#if __STDC_VERSION__ >= 202311L +#define true true +#define false false +#define bool bool +#else #define true 1 #define false 0 #define bool _Bool +#endif #endif -- 2.34.1