From nobody Tue Oct 20 08:12:10 2026 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 4j84rp4gm8z6wcT2 for ; Tue, 20 Oct 2026 08:12:10 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4j84rp3Wycz4Fgb for ; Tue, 20 Oct 2026 08:12:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792483930; 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=WIQieb4VkyalYQ69brKHQX5iGBni7svLFBlGtJl9TEs=; b=s4a9YqzMTENZvUxRabvSoxN+SKssyKbfbODf5LfAPaJe5PtOCZMO1iriS2LaPNXY8/+vXi rxVWu7NQZbUoGrpHvUwHoEUaTOB3tVXqrtand79smZB9BuJw+1+ZmPLu2C3plCJHKDNFbm 9lto1JiFloITJJ0SUlMKH5NUHXkQDOwoCp6TxxvQfpc4fXBchPQor8hI3FqHP6Z9PmwnQU icaNOjPDoqRkAsWM38A0Ca8WR/fciHzwkxbh6fMsIh3cNl2R4BXH3D7nEqkxOPUrTtuF8l Q96UhmfKAe2gN3WzqY5Gi2u3Tdn840h91QPeSIM4tPWdfCAMo0yIzaptoBTbJw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792483930; b=qZIgwXxli8D7Jt3jQ84N9F4wYs5TPJ4ACHZsIIwZtoLbZxH6JGBj92WSGWko6R2mcHtxxf fhxpE7m4VrDCfCOd3Lec1LWVn84qL9NUlm5L3W051j7riX5jhrDpAnD0vbZBQTVY3zDqTn S4dANkr82fgIhu/rFOs5hy/F/M08BZC/sv2/4H1wgkp54o/mFPIeuqOGDZJlm7wLvV+9Q3 7LDoc4nC0540Y87N0Woexp90g/npL0tkSN3uI4pushIzDSEAQ/WqWU8ZwcBw0Nhnxbdto3 xyZ7c3XcmtgltHRp5R1cQez11z2JnNI81/k4Nj4lmyX3dp51zxa1NniIqR5jEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792483930; 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=WIQieb4VkyalYQ69brKHQX5iGBni7svLFBlGtJl9TEs=; b=VgeD7l0grJWPTiQQ7ya0yz9HpxtNdSqSUgVS7pw49UGSt/HbaCnpGbD/Z5kDDtjoXY1ii1 qZk/IQd5G0DoevcPIs8G9wF24CEz4Icpqe7LF4dpSd6E9B87fu/qMMsN8vQJGJMNFppIl4 armrfmQxFBHwEUnl4/i1xe4Qajcwr+QxC4k90bLAg12ZuqiqTukmsnUT/e5ZJ3iItIaQDm lzSbIhfCZ7YGLhNgsa/NmvY3+GndoqsvQcQhIIk4UAHM4MakpLhoaCpGChHlbrO6Oskmjq zP+XLXFI/lEJpvvGkyTycsUO4cgUTXISfQII8KjHF4kaaIKolTztL8UCH6xkzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j84rp19Mjzyhd for ; Tue, 20 Oct 2026 08:12:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41f22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 20 Oct 2026 08:12:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Faraz Vahedi Subject: git: 6ab9d003a0ad - stable/15 - libc: Add PRIb*, PRIB*, and SCNb* macros as per C23 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 6ab9d003a0adc7c5d0353ccabbede9912be4c612 Auto-Submitted: auto-generated Date: Tue, 20 Oct 2026 08:12:10 +0000 Message-Id: <6ad7225a.41f22.51b4656a@gitrepo.freebsd.org> The branch stable/15 has been updated by kfv: URL: https://cgit.FreeBSD.org/src/commit/?id=6ab9d003a0adc7c5d0353ccabbede9912be4c612 commit 6ab9d003a0adc7c5d0353ccabbede9912be4c612 Author: Faraz Vahedi AuthorDate: 2026-09-02 14:56:58 +0000 Commit: Faraz Vahedi CommitDate: 2026-10-20 08:09:35 +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 (cherry picked from commit ab420c44bc7c45bf344cb03b289e60109f57aaee) --- 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_ */