From nobody Fri Nov 20 14:38:46 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 4jWHyZ73rgz71tV4 for ; Fri, 20 Nov 2026 14:38:46 +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 4jWHyZ54kTz4dDG for ; Fri, 20 Nov 2026 14:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795185526; 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=2L2+GvIWWERwW7lTjelQvmd1Cuv0PVSkSoXMB/o/sE0=; b=NjM6aFQjh9vnF3+o83APqJderE0gC5U8TpzCz1FSYAVe8HuKsQTFjuNU6r5TM1yL7FhLlx Kyh2w7hQiC6Sl4D8qNGURH9oP3lZJM9J9b1pme3X9qz/hnQo7keYzkHlQEd4QmpSBqe+sf G0YU8+kfXen/JqsZG5M/BOgC+HsbitGA5u9seHe7R2kYOQrkyHxJhhEUJnBF1E8XK98G2e 32lbHLAzyIveUlZMB6XMweTAWQzNe3sJyPy6MrlKAHEabVX7dpl5eY6EiP4Iy6KoJuljP8 pj+Dkc2kNjkqVq38GslGtT7z94iEBX9Hz8JBEh3enYaop2QQpmwv75oTF1oyrQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795185526; b=y4vdEQTVnwsFM4JLo4qVfFukY+8ngDpa70nMcZI1uyTKbK3V2gGPrHn/ov6/ch1JgrPN6g PwaDx7/O2SNYSZg6A6Gg9SXusWoB5XtoDMa9RO6gONSYkbTRgT4JFFJMiZgmqjfb1bAuDx HfIZh5FTniQG6slDxjGhPdEqAIJ7WdKZTzlhkt3l0Hu2mgXiCvUhgaO+Njo2RaAjO5SQ6d 5bMT+j6OTrufcx0ZimiZXItGKLzVoNqRck2aPu0pSns8dnO02sPLOX1FlP6EPwHqABOOji JKJW6rfoZN+9x8dFAY65agEwN8v/ROSCeBCAKkSfGxeMCss27++NocPMCUVLqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795185526; 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=2L2+GvIWWERwW7lTjelQvmd1Cuv0PVSkSoXMB/o/sE0=; b=qgYrDBijeL5KxKKSZ7/oVNf1mqp60maeTByYKKNokHjKQwn2Ur1F7Yznc9siw1Ohj0xPgg F5ro5dOqtxHbuF/RICIEogt+YpercMmcjSrQTAgIzgm9nzno7BiBQdpW+FoQQK/TCYzpBa LtU45QYFFUGbF/MiakMgdDUOUQ+MD6dwdQgliK0g5jCa84vmDftzvb/+1APE+iTs7O9c5U /IYfbjCALwJLXwCQcDwK57WPHLRs/6IP5R/FOCVQpgWm0zczVuGuKIAQGnkOlU4CUGcsgX k/ewuiFrqyRopPxqcpibERowVcCBpimhL3S1qHCoeGz4dym7+O9OBytHLMyh0w== 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 4jWHyZ43ytzsfg for ; Fri, 20 Nov 2026 14:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 14122 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 14:38:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b5a5feb60d96 - main - libsysdecode: Avoid non-portable \> word end boundary in mktables 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5a5feb60d96d7db472bcc3a4562b76ad3b09c2c Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 14:38:46 +0000 Message-Id: <6b005b76.14122.2333444f@gitrepo.freebsd.org> The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b5a5feb60d96d7db472bcc3a4562b76ad3b09c2c commit b5a5feb60d96d7db472bcc3a4562b76ad3b09c2c Author: Jessica Clarke AuthorDate: 2026-11-20 14:37:14 +0000 Commit: Jessica Clarke CommitDate: 2026-11-20 14:37:14 +0000 libsysdecode: Avoid non-portable \> word end boundary in mktables Whilst we bootstrap our own sed when building on non-FreeBSD, it uses the system regex(3) implementation, and so inherits its extensions, not our own. Our implementation and glibc's both include this extension to POSIX, but macOS's does not, and so even with our bootstrap sed we cannot use the \> extension when built and run on macOS. Unfortunately, there is no alternative form we can use; whilst macOS implements [[:>:]] as an extension that provides this same feature, and so do we, the regex(3) implementation in glibc does not, and the only alternative glibc offers is \b, which neither us nor macOS implement. We could make the form used conditional on the OS, but that starts to get messy once other Linux libcs enter the picture, which in theory we somewhat support. Rewrite both uses to avoid the need for \>. For gen_table, use a pattern to match the identifier that is precisely the (non-extended) C99 identifier pattern, and therefore by virtue of longer submatches being preferred left-to-right will capture the entire identifier before the .* matches anything, with no need to check for a boundary. However, for gen_table_enum, the input pattern (${grep}) can be more specific, so we should check for a word boundary, which we can do by explicitly matching on a non-identifier character (or the end of the line). With and without this patch applied to releng/15.2 at time of writing, building on both FreeBSD 15.1 and Ubuntu 22.04, make tinderbox produces identical tables.h files across all four possible such configurations; specifically: find $MAKEOBJDIRPREFIX -path '*/libsysdecode/tables.h' -exec md5sum {} + | LC_ALL=C sort is identical for the four OS * patched configurations. Additionally, make tinderbox for the same patched tree on macOS 27.2.1 (noting the unpatched tree doesn't build) also identical produces identical tables.h files to these four configurations. Reviewed by: des Fixes: 8b197806dcdf ("libsysdecode: Teach mktables to handle enums") MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D61783 --- lib/libsysdecode/mktables | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index bb784c853e48..61dc089a42c4 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -64,7 +64,7 @@ _EOF_ sed -nE ${excl:+-e "/${excl}/d"} \ -e "/^#[[:space:]]*define[[:space:]]+${grep}/p" \ "${include_dir}/${file}" | \ - sed -Ee 's/.*define[[:space:]]+([^[:space:]]+)\>.*/TABLE_ENTRY(\1)/' + sed -Ee 's/.*define[[:space:]]+([_[:alpha:]][_[:alnum:]]*).*/TABLE_ENTRY(\1)/' fi cat <<_EOF_ TABLE_END @@ -95,7 +95,7 @@ _EOF_ awk '/^(typedef[[:space:]]*)?enum([[:space:]].*)?\{/, /^\}([[:space:]].*)?;/' | # pick out the constants we want - sed -Ene 's/^[[:space:]]*('"${grep}"')\>.*/TABLE_ENTRY(\1)/p' + sed -Ene 's/^[[:space:]]*('"${grep}"')([^_[:alnum:]].*|$)/TABLE_ENTRY(\1)/p' fi cat <<_EOF_ TABLE_END