From nobody Wed Sep 02 15:00:26 2026 X-Original-To: dev-commits-src-main@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 4hZmB32WfVz6qBr3 for ; Wed, 02 Sep 2026 15:00:27 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hZmB25zwgz3ZJX for ; Wed, 02 Sep 2026 15:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788361226; 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=rd2nrichUaXNMWeO8iiVxCMYS8MusfbEmyf1o/aEaJc=; b=fKOv+9yp+Wt/hTSBjr5/YPIjZXyntWJv80MBSxdolOqYHfIjuB8u0JI6D0R6Jb+m5yCt5I EFKZd/Pbh/nnjH4P/BdxKSYhF39g9vDAMwqdGyYuhqo+yhDQSjBWtFS5ZWIghP2atfKcbO jRUr+Qc9BJUoXNQn5ed3XKSdyLXZvt/WueJaTSXstB+Z18qAs1ehgrrn3NgzYTnVbrMDdS Besw0VvONOtMHq6NTGkpoFF16Q0EirnuJBgShgit3OxwbGj3XP20MSOCqldFlcDvsSSiXV V2/lqnfIVYTknZpMtkZJ6KnDgc6p2Z3Yg3gfW8gYGD73+tibYDGDSZGGgy1E8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788361226; a=rsa-sha256; cv=none; b=rYwq3VBvmwSdVM3SohuhNUj0mfhJSzNZip1na20TJqzQeNOzEggHjNZs5BKIk8/l81Uve7 LTIGqS1Lsrh+Wh6EaHRUe05dKzmcUfWgq/FIZSYbDapL2aLoDIcPecCwz4viyUJLpC1Hj3 fXTZEPKfG8549ISACJuFVccHoE7ALE3Mui0FbQJOv7NcYjNvuB0QSCReS0ZZbghEUfRg0B nKmc3ZcoBFW5xFEvk26yEbStDg2RF7FbnPdZ6s6NP+XC+ciGyqXF/bD0y5K8Fs/PgNe6Ev xTSEyXqS3n7KlCKy7IFqjoZ40SN//p46MTlQ/wM7hafhOjbGrWmqE5GatGagBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788361226; 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=rd2nrichUaXNMWeO8iiVxCMYS8MusfbEmyf1o/aEaJc=; b=NKZ2uGIj4noWWybkthltM9Bwpq7cVWKJ0W7+tKjvwTra1coJkpSjcMuarq5XxoVs1C/AYy 5a9TJXpCgxq+qbxNhQDK0Xa72SjAg5lOHHJ8vAwitK6Z4zwj6DoxVtJ4J3DXPWJcHVxpWK K4VH3SruOAtQtuOicvJesmmG5x0VQLG8E7/dZ9bjEKyOP9vje8OUlF5E8u/6wZ/KZwD+HR 5Ql/AY9Z7xMfecydWbdR+hXn07hgRdj/TEbHyWrV44TWpWU5dKq0YlMbOVPgGbodqN/uHQ k4xK4fA0hyxgvAjU2ZS2ObzTv0wkgg40IVFtRc7xpCBb8i+uZP9ZcLpVgxiqPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hZmB24mkvzpD3 for ; Wed, 02 Sep 2026 15:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 252e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 02 Sep 2026 15:00:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Faraz Vahedi Subject: git: ab420c44bc7c - main - libc: Add PRIb*, PRIB*, and SCNb* macros as per C23 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kfv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab420c44bc7c45bf344cb03b289e60109f57aaee Auto-Submitted: auto-generated Date: Wed, 02 Sep 2026 15:00:26 +0000 Message-Id: <6a983a0a.252e3.6a29e57a@gitrepo.freebsd.org> The branch main has been updated by kfv: URL: https://cgit.FreeBSD.org/src/commit/?id=ab420c44bc7c45bf344cb03b289e60109f57aaee commit ab420c44bc7c45bf344cb03b289e60109f57aaee Author: Faraz Vahedi AuthorDate: 2026-09-02 14:56:58 +0000 Commit: Faraz Vahedi CommitDate: 2026-09-02 14:56:58 +0000 libc: Add PRIb*, PRIB*, and SCNb* macros as per C23 Reviewed by: fuz Approved by: fuz (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D59293 --- sys/arm/include/_inttypes.h | 45 +++++++++++++++++++++++++++++++++++++++++ sys/arm64/include/_inttypes.h | 45 +++++++++++++++++++++++++++++++++++++++++ sys/powerpc/include/_inttypes.h | 45 +++++++++++++++++++++++++++++++++++++++++ sys/riscv/include/_inttypes.h | 45 +++++++++++++++++++++++++++++++++++++++++ sys/x86/include/_inttypes.h | 45 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 225 insertions(+) diff --git a/sys/arm/include/_inttypes.h b/sys/arm/include/_inttypes.h index ab51edc73ab6..8ccc9dd2893d 100644 --- a/sys/arm/include/_inttypes.h +++ b/sys/arm/include/_inttypes.h @@ -132,6 +132,36 @@ #define PRIXMAX "jX" /* uintmax_t */ #define PRIXPTR "X" /* uintptr_t */ +#define PRIb8 "b" /* uint8_t */ +#define PRIb16 "b" /* uint16_t */ +#define PRIb32 "b" /* uint32_t */ +#define PRIb64 "llb" /* uint64_t */ +#define PRIbLEAST8 "b" /* uint_least8_t */ +#define PRIbLEAST16 "b" /* uint_least16_t */ +#define PRIbLEAST32 "b" /* uint_least32_t */ +#define PRIbLEAST64 "llb" /* uint_least64_t */ +#define PRIbFAST8 "b" /* uint_fast8_t */ +#define PRIbFAST16 "b" /* uint_fast16_t */ +#define PRIbFAST32 "b" /* uint_fast32_t */ +#define PRIbFAST64 "llb" /* uint_fast64_t */ +#define PRIbMAX "jb" /* uintmax_t */ +#define PRIbPTR "b" /* uintptr_t */ + +#define PRIB8 "B" /* uint8_t */ +#define PRIB16 "B" /* uint16_t */ +#define PRIB32 "B" /* uint32_t */ +#define PRIB64 "llB" /* uint64_t */ +#define PRIBLEAST8 "B" /* uint_least8_t */ +#define PRIBLEAST16 "B" /* uint_least16_t */ +#define PRIBLEAST32 "B" /* uint_least32_t */ +#define PRIBLEAST64 "llB" /* uint_least64_t */ +#define PRIBFAST8 "B" /* uint_fast8_t */ +#define PRIBFAST16 "B" /* uint_fast16_t */ +#define PRIBFAST32 "B" /* uint_fast32_t */ +#define PRIBFAST64 "llB" /* uint_fast64_t */ +#define PRIBMAX "jB" /* uintmax_t */ +#define PRIBPTR "B" /* uintptr_t */ + /* fscanf(3) macros for signed integers. */ #define SCNd8 "hhd" /* int8_t */ @@ -211,4 +241,19 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR "x" /* uintptr_t */ +#define SCNb8 "hhb" /* uint8_t */ +#define SCNb16 "hb" /* uint16_t */ +#define SCNb32 "b" /* uint32_t */ +#define SCNb64 "llb" /* uint64_t */ +#define SCNbLEAST8 "hhb" /* uint_least8_t */ +#define SCNbLEAST16 "hb" /* uint_least16_t */ +#define SCNbLEAST32 "b" /* uint_least32_t */ +#define SCNbLEAST64 "llb" /* uint_least64_t */ +#define SCNbFAST8 "b" /* uint_fast8_t */ +#define SCNbFAST16 "b" /* uint_fast16_t */ +#define SCNbFAST32 "b" /* uint_fast32_t */ +#define SCNbFAST64 "llb" /* uint_fast64_t */ +#define SCNbMAX "jb" /* uintmax_t */ +#define SCNbPTR "b" /* uintptr_t */ + #endif /* !_MACHINE_INTTYPES_H_ */ diff --git a/sys/arm64/include/_inttypes.h b/sys/arm64/include/_inttypes.h index 67ae82fbf031..1df86d833793 100644 --- a/sys/arm64/include/_inttypes.h +++ b/sys/arm64/include/_inttypes.h @@ -134,6 +134,36 @@ #define PRIXMAX "jX" /* uintmax_t */ #define PRIXPTR "lX" /* uintptr_t */ +#define PRIb8 "b" /* uint8_t */ +#define PRIb16 "b" /* uint16_t */ +#define PRIb32 "b" /* uint32_t */ +#define PRIb64 "lb" /* uint64_t */ +#define PRIbLEAST8 "b" /* uint_least8_t */ +#define PRIbLEAST16 "b" /* uint_least16_t */ +#define PRIbLEAST32 "b" /* uint_least32_t */ +#define PRIbLEAST64 "lb" /* uint_least64_t */ +#define PRIbFAST8 "b" /* uint_fast8_t */ +#define PRIbFAST16 "b" /* uint_fast16_t */ +#define PRIbFAST32 "b" /* uint_fast32_t */ +#define PRIbFAST64 "lb" /* uint_fast64_t */ +#define PRIbMAX "jb" /* uintmax_t */ +#define PRIbPTR "lb" /* uintptr_t */ + +#define PRIB8 "B" /* uint8_t */ +#define PRIB16 "B" /* uint16_t */ +#define PRIB32 "B" /* uint32_t */ +#define PRIB64 "lB" /* uint64_t */ +#define PRIBLEAST8 "B" /* uint_least8_t */ +#define PRIBLEAST16 "B" /* uint_least16_t */ +#define PRIBLEAST32 "B" /* uint_least32_t */ +#define PRIBLEAST64 "lB" /* uint_least64_t */ +#define PRIBFAST8 "B" /* uint_fast8_t */ +#define PRIBFAST16 "B" /* uint_fast16_t */ +#define PRIBFAST32 "B" /* uint_fast32_t */ +#define PRIBFAST64 "lB" /* uint_fast64_t */ +#define PRIBMAX "jB" /* uintmax_t */ +#define PRIBPTR "lB" /* uintptr_t */ + /* fscanf(3) macros for signed integers. */ #define SCNd8 "hhd" /* int8_t */ @@ -213,6 +243,21 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR "lx" /* uintptr_t */ +#define SCNb8 "hhb" /* uint8_t */ +#define SCNb16 "hb" /* uint16_t */ +#define SCNb32 "b" /* uint32_t */ +#define SCNb64 "lb" /* uint64_t */ +#define SCNbLEAST8 "hhb" /* uint_least8_t */ +#define SCNbLEAST16 "hb" /* uint_least16_t */ +#define SCNbLEAST32 "b" /* uint_least32_t */ +#define SCNbLEAST64 "lb" /* uint_least64_t */ +#define SCNbFAST8 "b" /* uint_fast8_t */ +#define SCNbFAST16 "b" /* uint_fast16_t */ +#define SCNbFAST32 "b" /* uint_fast32_t */ +#define SCNbFAST64 "lb" /* uint_fast64_t */ +#define SCNbMAX "jb" /* uintmax_t */ +#define SCNbPTR "lb" /* uintptr_t */ + #endif /* !_MACHINE__INTTYPES_H_ */ #endif /* !__arm__ */ diff --git a/sys/powerpc/include/_inttypes.h b/sys/powerpc/include/_inttypes.h index 4d1b52da6cea..f07f20033c2c 100644 --- a/sys/powerpc/include/_inttypes.h +++ b/sys/powerpc/include/_inttypes.h @@ -140,6 +140,36 @@ #define PRIXMAX "jX" /* uintmax_t */ #define PRIXPTR __PRIptr"X" /* uintptr_t */ +#define PRIb8 "b" /* uint8_t */ +#define PRIb16 "b" /* uint16_t */ +#define PRIb32 "b" /* uint32_t */ +#define PRIb64 __PRI64"b" /* uint64_t */ +#define PRIbLEAST8 "b" /* uint_least8_t */ +#define PRIbLEAST16 "b" /* uint_least16_t */ +#define PRIbLEAST32 "b" /* uint_least32_t */ +#define PRIbLEAST64 __PRI64"b" /* uint_least64_t */ +#define PRIbFAST8 "b" /* uint_fast8_t */ +#define PRIbFAST16 "b" /* uint_fast16_t */ +#define PRIbFAST32 "b" /* uint_fast32_t */ +#define PRIbFAST64 __PRI64"b" /* uint_fast64_t */ +#define PRIbMAX "jb" /* uintmax_t */ +#define PRIbPTR __PRIptr"b" /* uintptr_t */ + +#define PRIB8 "B" /* uint8_t */ +#define PRIB16 "B" /* uint16_t */ +#define PRIB32 "B" /* uint32_t */ +#define PRIB64 __PRI64"B" /* uint64_t */ +#define PRIBLEAST8 "B" /* uint_least8_t */ +#define PRIBLEAST16 "B" /* uint_least16_t */ +#define PRIBLEAST32 "B" /* uint_least32_t */ +#define PRIBLEAST64 __PRI64"B" /* uint_least64_t */ +#define PRIBFAST8 "B" /* uint_fast8_t */ +#define PRIBFAST16 "B" /* uint_fast16_t */ +#define PRIBFAST32 "B" /* uint_fast32_t */ +#define PRIBFAST64 __PRI64"B" /* uint_fast64_t */ +#define PRIBMAX "jB" /* uintmax_t */ +#define PRIBPTR __PRIptr"B" /* uintptr_t */ + /* fscanf(3) macros for signed integers. */ #define SCNd8 "hhd" /* int8_t */ @@ -219,4 +249,19 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR __PRIptr"x" /* uintptr_t */ +#define SCNb8 "hhb" /* uint8_t */ +#define SCNb16 "hb" /* uint16_t */ +#define SCNb32 "b" /* uint32_t */ +#define SCNb64 __PRI64"b" /* uint64_t */ +#define SCNbLEAST8 "hhb" /* uint_least8_t */ +#define SCNbLEAST16 "hb" /* uint_least16_t */ +#define SCNbLEAST32 "b" /* uint_least32_t */ +#define SCNbLEAST64 __PRI64"b" /* uint_least64_t */ +#define SCNbFAST8 "b" /* uint_fast8_t */ +#define SCNbFAST16 "b" /* uint_fast16_t */ +#define SCNbFAST32 "b" /* uint_fast32_t */ +#define SCNbFAST64 __PRI64"b" /* uint_fast64_t */ +#define SCNbMAX "jb" /* uintmax_t */ +#define SCNbPTR __PRIptr"b" /* uintptr_t */ + #endif /* !_MACHINE_INTTYPES_H_ */ diff --git a/sys/riscv/include/_inttypes.h b/sys/riscv/include/_inttypes.h index fb2bb14e33a3..d001261ba550 100644 --- a/sys/riscv/include/_inttypes.h +++ b/sys/riscv/include/_inttypes.h @@ -130,6 +130,36 @@ #define PRIXMAX "jX" /* uintmax_t */ #define PRIXPTR "lX" /* uintptr_t */ +#define PRIb8 "b" /* uint8_t */ +#define PRIb16 "b" /* uint16_t */ +#define PRIb32 "b" /* uint32_t */ +#define PRIb64 "lb" /* uint64_t */ +#define PRIbLEAST8 "b" /* uint_least8_t */ +#define PRIbLEAST16 "b" /* uint_least16_t */ +#define PRIbLEAST32 "b" /* uint_least32_t */ +#define PRIbLEAST64 "lb" /* uint_least64_t */ +#define PRIbFAST8 "b" /* uint_fast8_t */ +#define PRIbFAST16 "b" /* uint_fast16_t */ +#define PRIbFAST32 "b" /* uint_fast32_t */ +#define PRIbFAST64 "lb" /* uint_fast64_t */ +#define PRIbMAX "jb" /* uintmax_t */ +#define PRIbPTR "lb" /* uintptr_t */ + +#define PRIB8 "B" /* uint8_t */ +#define PRIB16 "B" /* uint16_t */ +#define PRIB32 "B" /* uint32_t */ +#define PRIB64 "lB" /* uint64_t */ +#define PRIBLEAST8 "B" /* uint_least8_t */ +#define PRIBLEAST16 "B" /* uint_least16_t */ +#define PRIBLEAST32 "B" /* uint_least32_t */ +#define PRIBLEAST64 "lB" /* uint_least64_t */ +#define PRIBFAST8 "B" /* uint_fast8_t */ +#define PRIBFAST16 "B" /* uint_fast16_t */ +#define PRIBFAST32 "B" /* uint_fast32_t */ +#define PRIBFAST64 "lB" /* uint_fast64_t */ +#define PRIBMAX "jB" /* uintmax_t */ +#define PRIBPTR "lB" /* uintptr_t */ + /* fscanf(3) macros for signed integers. */ #define SCNd8 "hhd" /* int8_t */ @@ -209,4 +239,19 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR "lx" /* uintptr_t */ +#define SCNb8 "hhb" /* uint8_t */ +#define SCNb16 "hb" /* uint16_t */ +#define SCNb32 "b" /* uint32_t */ +#define SCNb64 "lb" /* uint64_t */ +#define SCNbLEAST8 "hhb" /* uint_least8_t */ +#define SCNbLEAST16 "hb" /* uint_least16_t */ +#define SCNbLEAST32 "b" /* uint_least32_t */ +#define SCNbLEAST64 "lb" /* uint_least64_t */ +#define SCNbFAST8 "b" /* uint_fast8_t */ +#define SCNbFAST16 "b" /* uint_fast16_t */ +#define SCNbFAST32 "b" /* uint_fast32_t */ +#define SCNbFAST64 "lb" /* uint_fast64_t */ +#define SCNbMAX "jb" /* uintmax_t */ +#define SCNbPTR "lb" /* uintptr_t */ + #endif /* !_MACHINE__INTTYPES_H_ */ diff --git a/sys/x86/include/_inttypes.h b/sys/x86/include/_inttypes.h index 4d1b52da6cea..f07f20033c2c 100644 --- a/sys/x86/include/_inttypes.h +++ b/sys/x86/include/_inttypes.h @@ -140,6 +140,36 @@ #define PRIXMAX "jX" /* uintmax_t */ #define PRIXPTR __PRIptr"X" /* uintptr_t */ +#define PRIb8 "b" /* uint8_t */ +#define PRIb16 "b" /* uint16_t */ +#define PRIb32 "b" /* uint32_t */ +#define PRIb64 __PRI64"b" /* uint64_t */ +#define PRIbLEAST8 "b" /* uint_least8_t */ +#define PRIbLEAST16 "b" /* uint_least16_t */ +#define PRIbLEAST32 "b" /* uint_least32_t */ +#define PRIbLEAST64 __PRI64"b" /* uint_least64_t */ +#define PRIbFAST8 "b" /* uint_fast8_t */ +#define PRIbFAST16 "b" /* uint_fast16_t */ +#define PRIbFAST32 "b" /* uint_fast32_t */ +#define PRIbFAST64 __PRI64"b" /* uint_fast64_t */ +#define PRIbMAX "jb" /* uintmax_t */ +#define PRIbPTR __PRIptr"b" /* uintptr_t */ + +#define PRIB8 "B" /* uint8_t */ +#define PRIB16 "B" /* uint16_t */ +#define PRIB32 "B" /* uint32_t */ +#define PRIB64 __PRI64"B" /* uint64_t */ +#define PRIBLEAST8 "B" /* uint_least8_t */ +#define PRIBLEAST16 "B" /* uint_least16_t */ +#define PRIBLEAST32 "B" /* uint_least32_t */ +#define PRIBLEAST64 __PRI64"B" /* uint_least64_t */ +#define PRIBFAST8 "B" /* uint_fast8_t */ +#define PRIBFAST16 "B" /* uint_fast16_t */ +#define PRIBFAST32 "B" /* uint_fast32_t */ +#define PRIBFAST64 __PRI64"B" /* uint_fast64_t */ +#define PRIBMAX "jB" /* uintmax_t */ +#define PRIBPTR __PRIptr"B" /* uintptr_t */ + /* fscanf(3) macros for signed integers. */ #define SCNd8 "hhd" /* int8_t */ @@ -219,4 +249,19 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR __PRIptr"x" /* uintptr_t */ +#define SCNb8 "hhb" /* uint8_t */ +#define SCNb16 "hb" /* uint16_t */ +#define SCNb32 "b" /* uint32_t */ +#define SCNb64 __PRI64"b" /* uint64_t */ +#define SCNbLEAST8 "hhb" /* uint_least8_t */ +#define SCNbLEAST16 "hb" /* uint_least16_t */ +#define SCNbLEAST32 "b" /* uint_least32_t */ +#define SCNbLEAST64 __PRI64"b" /* uint_least64_t */ +#define SCNbFAST8 "b" /* uint_fast8_t */ +#define SCNbFAST16 "b" /* uint_fast16_t */ +#define SCNbFAST32 "b" /* uint_fast32_t */ +#define SCNbFAST64 __PRI64"b" /* uint_fast64_t */ +#define SCNbMAX "jb" /* uintmax_t */ +#define SCNbPTR __PRIptr"b" /* uintptr_t */ + #endif /* !_MACHINE_INTTYPES_H_ */