From nobody Fri May 30 16:07:22 2025 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 4b87Rb1hRkz5xqmt; Fri, 30 May 2025 16:07:23 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b87Rb13Jyz3YNn; Fri, 30 May 2025 16:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748621243; 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=EjJDaaANwHbVZ6NgeXsjQLRPAtIZp/700zwH5PWoYCk=; b=vLoqTJ3zxUAiktu8xy4HLdEVc0uDR/zNVFu6iLuew7GXQn2R/P4aExZ501/q6fQA0ueocV Zikprlix/luJKB90sL+OzySQPkjniW/U0/DsXmiNWJsE0zUfb5AykJiqkNvlE0J4T0Nd7A XimAkzj0hZyD1f8OzcreFWjUSyXUqyl5TSBnbazHLNfk+aqcrDRVCzVVNb/kPolUj6jxKF AmUjXvdwBpqqIKZWyZJiVtTIDeVmOVhwRCqcNDW0mchmS5iYFyHhkD0l2/kj3ul+nDikm1 UbpEEaEtO0L/L4TaUjkhY0Soj2G7gE96uE9ZAP4BBJgXc4N9PRNJgIhCH8CwUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748621243; a=rsa-sha256; cv=none; b=vN+1vrTeRxmqDyxxlcteh4VEB5XzqMl94ca87K+17NTdbWtVSxI5E3bBFiSG4tJGIA6a0g EYSOQzthNz39BxfBhLrZ6RSnMxju6d/pFHUt7cB6p/JLxUuJHwVmsQvNRKfxNvrcj3hzTK aqeq3AnVtb51DGPznzZYyI44vUCzIo9B0J5guF/e/QXcn0GxkiLPjra9hwqA71qv2qXU4t 3Z/r2S/Xk3bB3j2z/v4SczvaRsC4bw4uQHfrYpMXix4qU2Y49fCmS7ENGx3PhKbt1IvvE2 6RCVOcCm3BwNQCPpgOh58K5teDJ7BwDI9Q2YkjyJd6wECOi58yNjAZSwjt1FVw== 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=1748621243; 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=EjJDaaANwHbVZ6NgeXsjQLRPAtIZp/700zwH5PWoYCk=; b=BEZy9vhbaLLspHNgiW3xUZBSw8FNw18J5eSRFxj0wf8zMd43JfmmnUo1/wbdYjm/TpTUd4 X4gyaG1DBDpIUh4/DfvJNZYM8MwPo9LAbesH8MGF6/BAwEN/IzpGGdrfKlJnEUIZw3rBGY NoQ3Fz9UeyXaVauUoXdcNngpM9CnNXTYVjnNOb6g7XZPsefaTRF2oFDqH3vK7dpBbykZ93 Kp9Wfpn4sZAqk44/kMJodCx8RPm3GOzhd2Wz/vUtKiciWdc+nPmPIAiCIcM1C7N4WGmQ4p DHZXJB9T41Bcq9nDeEfO+k6LhtsssEdRpsFWrmH4ELy1v5+RFHEfZlw4HoAK0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4b87Rb0Lg2zylG; Fri, 30 May 2025 16:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54UG7MYo099270; Fri, 30 May 2025 16:07:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54UG7MNW099267; Fri, 30 May 2025 16:07:22 GMT (envelope-from git) Date: Fri, 30 May 2025 16:07:22 GMT Message-Id: <202505301607.54UG7MNW099267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d4f5d3a4eade - stable/14 - m4: Allow empty base argument in eval() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d4f5d3a4eade118694a537564e35c64fdd779f9a Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d4f5d3a4eade118694a537564e35c64fdd779f9a commit d4f5d3a4eade118694a537564e35c64fdd779f9a Author: Eric Blake AuthorDate: 2025-05-23 14:37:20 +0000 Commit: Ed Maste CommitDate: 2025-05-30 12:45:56 +0000 m4: Allow empty base argument in eval() POSIX specifies "The second argument, if specified, shall set the radix for the result; if the argument is blank or unspecified, the default is 10." Previously we reported an invalid PR: 287015 Reviewed by: emaste (cherry picked from commit ac196a5845757a4d92cdfc4927170576dce5de9d) --- usr.bin/m4/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 82218eb9ba1c..3170d52bfe2a 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -181,7 +181,7 @@ expand_builtin(const char *argv[], int argc, int td) int maxdigits = 0; const char *errstr; - if (argc > 3) { + if (argc > 3 && *argv[3] != '\0') { base = strtonum(argv[3], 2, 36, &errstr); if (errstr) { m4errx(1, "expr: base is %s: %s.",