From nobody Sat Aug 15 18:37:36 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 4hMnsF5JYYz6pB3r; Sat, 15 Aug 2026 18:37:53 +0000 (UTC) (envelope-from kfv@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hMnsF43Vwz3crn; Sat, 15 Aug 2026 18:37:53 +0000 (UTC) (envelope-from kfv@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786819073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CG29z5AH2+qTn08zCD+tCjLCIEmhtjJUtm+0sdvvCCw=; b=O0/2JNXpa7M2xsgzQJVQEgW9p7nLbnbyvcj5cKA1HVKpC1reNRFxihagoEdn8UR8bEmmeR c7C9SgD6OO8PF8iojreMzHDqy8oZeU7Owf78WIhx5/Y52O/QjF9cRHgG/eAkO0wnn6/VIQ aPqxGQ0zYzcT11kDgpjmlRXNz0vtTCYRfbIbYQ1xCHWwDWWZRYty8MJc69Bx3JvXyWuw8S IKU8tpVDGkrdie12pChSvp75nNXshmMPd6KcMFc0Nb6CSHKJAnNcC/1quf4G1L5coJOcPD L1W9nFDdrbf69ch07+aUO0JooqGftJ+/wm1otolh6mqo94tmHPdwaEHSOWHNFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786819073; a=rsa-sha256; cv=none; b=o/EwtzWGAd6pMTzI6JuCocifIrMlNJ2lvDuK62F5k14bXalolwLQVgaFoKp1f0LuNCPH/V d1EisBbkhyRmTH/y2OfYZaZqYgW5flZ3t3T0ufv31Q8wIw/BlfvU2McprUncZ1iHRWPw7z p22XT+MJal6aYtIWJjM9dfrVBzT07E79SHwzjZKj3C05MVD95z1YgO7242GoilWnjAkGCK 7WrtCeUTpo3kWJH4n7tTCaypsoTms3GOfafnG7eD+uTXpz/QUEshvurLYM7CprBFtxwHxW Qtn2+ROr9kdahKKSUTvVAZw3z64PnWzAoeQARDR104SYMIKT3geWN1FetypYBw== 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=1786819073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CG29z5AH2+qTn08zCD+tCjLCIEmhtjJUtm+0sdvvCCw=; b=rMEQP8prepZCighPXNIZCPbsXv8j9rp64IPDCWuFpMTCG0DJSbmVFnuUec8qg1gKyhMrGQ vSE5m1M4oOLaqOUke/9peresSh4azs0x4ZC/zC+1hSNZDuwL59qXdS821ycktiU1esoldK JcdbMWDGleyUdWD1PvooASjYc8Rf1TPrVrfpUeh3iIIPuyAwy9pRDrZ3iJL+6T/lsAtmso xtiV4KasOz4f5pQnVuthG3QMfjVDoKIw6lhSXjHErCDJhst3SWe1v44appbO4spzqfXrCJ UZOz1xNnRwPmovXPbAQ8LVkOg9gzJnUhkDOUuuw6yil3WwOZkbZ1XMADHsanxQ== Received: from smtpclient.apple (unknown [194.29.79.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: kfv/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4hMnsC6TdpzsTp; Sat, 15 Aug 2026 18:37:50 +0000 (UTC) (envelope-from kfv@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_328A51A4-E3A2-416E-82E1-75D6116CF38E"; protocol="application/pgp-signature"; micalg=pgp-sha256 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 (Mac OS X Mail 16.0 \(3864.100.1.1.5\)) Subject: Re: git: cd0727ec709b - main - libc: Add C23 feature test macro From: Faraz Vahedi In-Reply-To: <3521D35A-40D0-48B6-808C-E18C15FC69D8@FreeBSD.org> Date: Sat, 15 Aug 2026 22:07:36 +0330 Cc: Robert Clausecker , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <27042403-75C3-42B2-B41D-743FAC40885F@FreeBSD.org> References: <6a7f6d6a.372ae.3079abac@gitrepo.freebsd.org> <3521D35A-40D0-48B6-808C-E18C15FC69D8@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3864.100.1.1.5) --Apple-Mail=_328A51A4-E3A2-416E-82E1-75D6116CF38E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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__? >=20 > 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=E2=80=99t 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= --Apple-Mail=_328A51A4-E3A2-416E-82E1-75D6116CF38E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEnunneCmADnpNx8ZMLdpU9MVz/74FAmqAsfAACgkQLdpU9MVz /76zOg/+OHsw3VPpNY+kGL2BVlZCd1rQewZn78DwW7wT5GVK0oX9pQc4t6gJNoa0 TjWGzojbvNcdRssTQ5HPpgFrNzIrwSf+UjT1AkQ2lM1rIuOzMy7hs+vkgwLPc7Z/ oHFgSn0/B/zW50SUQleYdfePAuj0jc20G07lC5ccy+PHFM8M3KmgtlL5mY5ehWgU uZ9jZyxi+1rvhtz/X9pCx5PhGwjlgYaqitGfliOononZ8iRoRcl0a6mQVJWPieia ExvlYCD4tkBvzjY7hrh8GdeW4qvqXP+6f/LycoMm6HISl0wwD+q76iZcJ81e40GP o59KTTkIpheuGcd9J90ERYPhfoT8Nc1S6Y/zpwlLeCnJRG1OLicux5ZC5PByIz8W XQarFncvIItvGI73gaIDBhlSHjMXCluUHJbkRvZbrDEYLsS72j+chlQaFDOTp5wK kvsG51vWbqoMVnC6B4M/I1BCk4MXJz8TrMfKHNFv1qYRQm8cM7M1VcStJJRLQ4RF 0HntKuTF9P3aoDtPLiPVEFkdCEV3RYjUpx7jVn2IiSYaykXx+JhPieGUwoP2nrop 1F6rIUJiFF2aO5dHZ9toJiKHMlQEZ1z5qOH5A5T7+A7vy+RF7zvN/k4ZlOZ4RJXi 6o9mZ2Fg6OxMadw0tEMjlphdw7EVOy1Dv/y2hfwBaQ2ufS/ZFvE= =ZYnj -----END PGP SIGNATURE----- --Apple-Mail=_328A51A4-E3A2-416E-82E1-75D6116CF38E--