From nobody Sat Aug 15 21:21:55 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 4hMsVn4xMbz6X4sC for ; Sat, 15 Aug 2026 21:22:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic.asd.mail.yahoo.com (sonic-usea5-0027.asd.mail.yahoo.com [34.2.70.26]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4hMsVn46gGz3vrq for ; Sat, 15 Aug 2026 21:22:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1786828923; bh=09hAmZK456wE67O9+G1Gq5rCHZ7SjO1Pg4bGUYH4TZw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=FbIMJJmfiAv9Yzgz2X/Q8kM/Yg57l/m5O0Wmn+1seG4RgBa0dt4+hS9KnJJvGyIBpuE1eIYIJ2vLzLgYCuJrdOO/8oBOHnjljO00IvyJu0nwUDya37B6yMsrBSyb2BeZ8OjIEKNigJ7HAySZ7P//b9dmaqpckAyJuBLhQ/+IdYp5S34wmP4x/zfn6YhlvAOWzV7NP38SGQjr9hdImMUAtEoP4dVEL0NSNquxw5NfUnqJJix7q31LwQLF5HiBNOOkMAMYRwlemVUn16cyvergr6AHjPsZxSLXneIz/PE7JgLHe/rpTsq6TBLAk7CQV5XKymVqUAzeCKAhzsQN7cVd1g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1786828923; bh=m6hen7xchp69uCoT1e3TK3lD06qBMVm20lq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Wfvitqx4vZqT_nUc9W8O62XyRj73Yix58PrzrtgLjMmOytF4jwTnnZhMb2iHMLdJPqUVZaJLm LMbAeEDCa8JLAVJuuG0kTt41TdjEMqKVKZRjgjtbSj_swAkev3ZCoU3kvT1gJfeyYfd7eYpqEjnR 9MApkld1jQDXVlMxoi0VnbzwSM_jzViuF7FV9OG7hfqafxAXIzmpMR2TQtB7eGZNBU81yD.S3Rpl JfHiZrMOK_WeRpmRzUlPdWbLKqWp_gf2vvwAQ1uoQcyAWJfQOO2GspmZYC4tAyfMl0asTsd4FCJ2 JHzSGqmpCTsVEpNRBZqwCIyWOxL3Iul.w.hky4vOfk55Wlp8- X-Sonic-MF: X-Sonic-ID: e637d624-2dbd-4268-8f64-7fe7d78ba02c Received: from sonic.gate.mail.ne1.yahoo.com by mail-asdoutdeli-p-cin-usea5-prod-sonicconsumer-svc-106 with HTTP; Sat, 15 Aug 2026 21:22:03 +0000 Received: from dip83.lsn.gq1.yahoo.com ([67.195.161.92]) by hello (SMTP) with SMTP ID ab8947e5c946b05ac0a59222763e0512; Sat, 15 Aug 2026 21:21:57 +0000 (UTC) Message-ID: <1b320a93-e6b9-4645-a6b2-37788cb84913@yahoo.com> Date: Sat, 15 Aug 2026 14:21:55 -0700 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 User-Agent: Mozilla Thunderbird Subject: Re: git: cd0727ec709b - main - libc: Add C23 feature test macro To: Faraz Vahedi , Dimitry Andric Cc: Robert Clausecker , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <6a7f6d6a.372ae.3079abac@gitrepo.freebsd.org> <3521D35A-40D0-48B6-808C-E18C15FC69D8@FreeBSD.org> <27042403-75C3-42B2-B41D-743FAC40885F@FreeBSD.org> Content-Language: en-US From: Mark Millard In-Reply-To: <27042403-75C3-42B2-B41D-743FAC40885F@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.26276 mail.core.serving.mcws.prd.acl:role.token.mcws.jsmtp.yahoo X-Rspamd-Queue-Id: 4hMsVn46gGz3vrq X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:34.2.70.0/23, country:US] X-Spamd-Bar: ---- On 8/15/26 11:37, Faraz Vahedi wrote: > Hello Dimitry, > > Thanks for the report. > >>> The test used by this package seems defective. >>> I don't think we should try to support such defective code. >>> Perhaps the gmp source can be patched to check for >>> __STDC_VERSION_STDIO_H__? >> >> Of course it could, and the patch is pretty simple. But I do not agree >> that the code is "defective". Before C23, there was no standard way of >> checking whether you had FILE declared. > > The approach is neither portable nor standard, and therefore I believe we > should not contaminate our libc with an unnecessary compatibility macro. > If gmp requires FILE, including would be sufficient, and if for any > reason it prefers not to include it and instead relies on some indication, > that issue should be addressed therein. We can patch the port and, in > parallel, submit a fix upstream. > > I honestly expected that we might encounter a case like this, but I would > appreciate it if we could avoid defining an unnecessary macro solely to > accommodate an approach that is not standards-compliant. > >> That said, I have applied such a patch locally, and it seems to work. >> But obviously a maintainer of a port would say "this has worked for 20 >> years, why change it now" ? :) > > I agree that it is a reasonable argument for a port maintainer, but it doesn’t > really establish that the approach is correct or portable. It only establishes > that the particular set of libc implementations the port has encountered > happened to expose the macro it was looking for. > > If the port is relying on an implementation-defined include guard, then a libc > changing that guard is not, strictly speaking, breaking a supported interface. > Consequently, the appropriate fix is for the port to fix it rather than for libc to > preserve it indefinitely as a compatibility interface that is neither established > nor widely recognised. > > Cheers, > Faraz I might put it another way: if there is now a standard compliant way to do the detection for some range of C standards (even a singleton), gmp upstream should likely be updated to allow that way to work for it for that range. That would involve continuing the historical-examples based tests technique otherwise. It might be that __STDC_VERSION_STDIO_H__ should be tested by gmp for even when compiled for a C predating C23. (Not likely to have inappropriate matching activity.) But FreeBSD might not be the only context for the older _STDIO_H_ reference in gmp, so gmp likely would not remove that usage. I view all that as separate from if the include/stdio.h (or the like) for FreeBSD should have _STDIO_H_ removed from being in the historically-accessible programming interface. I do not know if the principle of least astonishment should win here. -- === Mark Millard marklmi at yahoo.com