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 7569 invoked from network); 31 May 2023 14:06:19 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 31 May 2023 14:06:19 -0000 Received: (qmail 21979 invoked by uid 550); 31 May 2023 14:05:58 -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 21894 invoked from network); 31 May 2023 14:05:57 -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=WicmkIOqxEWiotC1eEHFZGatgldoIq96iICPCtUv0TQ=; b=Xam8qsYiLfPdMTW+5FLZg/rMwj6aAfxpxjBIyoMp2utwYTjuB5whGs8s g/7XN0CUUX9dgLAr6SZWcl/HTVz/V0DbSwrAXcDzZDOOxTxPwQbu2PO3L gZ/WcvgtQkCXaOIPA+iD9yLDqX2y/yzvQXFykz6clMisvLOICNCf3ROoF w=; Authentication-Results: mail2-relais-roc.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,207,1681164000"; d="scan'208";a="110511562" From: Jens Gustedt To: musl@lists.openwall.com Date: Wed, 31 May 2023 16:05:42 +0200 Message-Id: <98097dad6143e2b487c8e20bbe2c17ddace3912d.1685536319.git.Jens.Gustedt@inria.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [C23 scanf 2/3] C23: add the SCNb macros --- include/inttypes.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/include/inttypes.h b/include/inttypes.h index 73a42e32..780c2bb0 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -1,5 +1,5 @@ -#ifndef _INTTYPES_H -#define _INTTYPES_H +#ifndef __STDC_VERSION_INTTYPES_H__ +#define __STDC_VERSION_INTTYPES_H__ 201711L #ifdef __cplusplus extern "C" { @@ -228,6 +228,21 @@ uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int); #define SCNoFAST32 "o" #define SCNoFAST64 __PRI64 "o" +#define SCNb8 "hhb" +#define SCNb16 "hb" +#define SCNb32 "b" +#define SCNb64 __PRI64 "b" + +#define SCNbLEAST8 "hhb" +#define SCNbLEAST16 "hb" +#define SCNbLEAST32 "b" +#define SCNbLEAST64 __PRI64 "b" + +#define SCNbFAST8 "hhb" +#define SCNbFAST16 "b" +#define SCNbFAST32 "b" +#define SCNbFAST64 __PRI64 "b" + #define SCNx8 "hhx" #define SCNx16 "hx" #define SCNx32 "x" @@ -243,12 +258,14 @@ uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int); #define SCNxFAST32 "x" #define SCNxFAST64 __PRI64 "x" +#define SCNbMAX __PRI64 "b" #define SCNdMAX __PRI64 "d" #define SCNiMAX __PRI64 "i" #define SCNoMAX __PRI64 "o" #define SCNuMAX __PRI64 "u" #define SCNxMAX __PRI64 "x" +#define SCNbPTR __PRIPTR "b" #define SCNdPTR __PRIPTR "d" #define SCNiPTR __PRIPTR "i" #define SCNoPTR __PRIPTR "o" -- 2.34.1