From nobody Wed Nov 11 15:09:58 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 4jPn4k6LQsz70L3v for ; Wed, 11 Nov 2026 15:09:58 +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 4jPn4k5f1kz4RfB for ; Wed, 11 Nov 2026 15:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794409798; 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=5bzncRMox9fC4+w6bVmTdR7Bq6TKIpzs0PinHaUU1yY=; b=KBx7qPhA6gOqGzEMPUtUzSix5Oo7IHhFPdFkodzRp7/C4Beb8UP3MOpeHUIDL5uRWHWjjX PYKK+3vCvw2aKkyagZeAyMMqGvQEz+eVgZ0LpmzGpJiZNOLGtrVfy8NC1qPaOcgSDIysrm XfFOcnzZRsaJz0p2GXZ6a2exmkmjqjqhbjF0xcBXdoDZGjYNXkENrY/ddy5uQOUZQGikb7 3FOqKSrRPPHpCYA1sukJFe2B8Cl2nb/NPj/KM4gtSGrPO38lqZDHmUDmTFupSKk1CYPkrn M17PjQ70LRfcaIvapjM4ksDawgU4v1e9FDspZBc5gsW9UnDJkjbgn8fSangZKg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794409798; b=U276W8z3aCuEyO5NX3Ol09uK9l7PcCFO6ziJSMEAF8XTvgpGCjaYHmH1V+ERgiU4G1ThpZ vKzD5ePJMEYhMWuj5zypXcGjmmcW0JWOEAIFssGeripwqGQmbzWfVH1FxVk+SfRNkCUi4Y YtcU7YJwOFJ4yRvN62kCtzuY62riICXfpM08IITaWZHYI4OD0b2192TK4I1Npj8DgLMbCj 3C5yved4x6kK9mZk5XplxmU33aJse8ZlQo01Og2BGbWZRcdEvvR22QZJq5uqkXqh0Iwa/X D9brpsOsb0BmPs+oibpJh4adGbvhsAWQlXKTbyvrlTFsARk85TsG/RnLibAf5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794409798; 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=5bzncRMox9fC4+w6bVmTdR7Bq6TKIpzs0PinHaUU1yY=; b=aqn/JeC2mbXY+U+kJuOHNMOrEJtOhlU0doBsKjTvdJmrD6d0qCj9+VqtPBlZ71TXWIh3go kmLM2NzW9+FBh8k54ouyICLnsWE+r/ixSauE1mMVJ/YOmC+VIdtGtv1VgIxAIMroBmBM0N upR3gXnSQ9ZIp6hDlPh1wOJ9DtUeXiXP24Qx6ME47BUDy3DbfhPEypyjv4UogJJeAE/UNt FbLJWSev9m6XJlux+D/tKkx2IGbI//vrROPaOZ3PKUIeWqf7t5r+Fq+n+wGmnuAlokRTJn YrRlpxABwogZo+rsfIWADNFoyY0VJi/NtLjwpAlTXx2oXSF61m0T614K7oh0Tw== 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 4jPn4k5HyyzK77 for ; Wed, 11 Nov 2026 15:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1087d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Nov 2026 15:09:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: df0fc3a43c48 - main - strto{u,}l.3: Fix base for which 0b prefix is accepted List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: 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: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df0fc3a43c48bce41be8305ed13671d2fbe04ab9 Auto-Submitted: auto-generated Date: Wed, 11 Nov 2026 15:09:58 +0000 Message-Id: <6af48546.1087d.2f4cfb2d@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=df0fc3a43c48bce41be8305ed13671d2fbe04ab9 commit df0fc3a43c48bce41be8305ed13671d2fbe04ab9 Author: Aymeric Wibo AuthorDate: 2026-11-11 15:08:40 +0000 Commit: Aymeric Wibo CommitDate: 2026-11-11 15:09:50 +0000 strto{u,}l.3: Fix base for which 0b prefix is accepted Fixes: 76edfabbecde ("libc: Document support for binary integers.") Sponsored by: Klara, Inc. --- lib/libc/stdlib/strtol.3 | 6 ++++-- lib/libc/stdlib/strtoul.3 | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3 index 4a148ad63a51..2a76be7590b1 100644 --- a/lib/libc/stdlib/strtol.3 +++ b/lib/libc/stdlib/strtol.3 @@ -104,10 +104,12 @@ or sign. If .Fa base -is zero or 16, +is zero or 2, the string may then include a .Dq Li 0b -prefix, and the number will be read in base 2; or it may include a +prefix, and the number will be read in base 2; if +.Fa base +is zero or 16, it may include a .Dq Li 0x prefix, and the number will be read in base 16; otherwise, a zero diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3 index b418f29ea0e0..931c6594ca36 100644 --- a/lib/libc/stdlib/strtoul.3 +++ b/lib/libc/stdlib/strtoul.3 @@ -104,10 +104,12 @@ or sign. If .Fa base -is zero or 16, +is zero or 2, the string may then include a .Dq Li 0b -prefix, and the number will be read in base 2; or it may include a +prefix, and the number will be read in base 2; if +.Fa base +is zero or 16, it may include a .Dq Li 0x prefix, and the number will be read in base 16; otherwise, a zero