From nobody Sat Aug 15 17:30:29 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 4hMmMW3hqCz6p5y0; Sat, 15 Aug 2026 17:30:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4hMmMW31wWz3P7L; Sat, 15 Aug 2026 17:30:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786815031; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tzgBdX8FqtsLsqOzUa2nxaA1o4CL0xoJHsTsBId5k/M=; b=XLiOLbm4CRs1bISD0cveQVOb6wfd0ykWz5MnS0+ZlkmWT+OlBbQWeSb8UxlR6yiLYFt7Uy nCsCenzsswP9v5696pYXavkfe7iypwhwqUPxXyJ6bJ3SBiGeK1XC6US5qTOKSn7uKQrlms 5YMCclLHJx8jdgpDvuipL+hbL7ZictyJO1aZ6fgbFmpS97YhoB441O6CKEHGD0st9An4Os 1QlPoeohKOLS2/vSB0pRM1LuJ7fbV5JMPkV9sUrHfoDgWTpPnXKSF5ptpF2zuKSl1dCWxU 5KgHocNtXsMJtshO0fex1/w8Sh6iUNyCHngfXryJA8sma+Bx2IhaNHbdDFnmdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786815031; a=rsa-sha256; cv=none; b=hi2R8VzbMPkPnlvsjYSvfXHwnUWPF1n3t/qQFr5yaLo2UpNUGN774TdNSzG05lSYvO76Lm ofUFm+I5zZrLKAaumXL26aMhiwZnTq1U88W9OJOZCYFfIykuFFR2AI3kKm+Wj5lg9K9q5x uZtJPnpIxpy2vqS2dJMdVeGeXYM4fRzystgM6X6fEhiUeiPQsq9ihWcY+YFM/qyh7d03Wr Wves/JSIYEG6q+R05qJ+i1hDZxndezveZn3ZsGUugTjltPBEfioZlnIG1uU1ZizjZJ1JGK n7cJ3abUtkzIG6O9epBYt0lr6EyHjibtlgoF2z5mq3s+vSgJb1EaC8syq9bWzA== 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=1786815031; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tzgBdX8FqtsLsqOzUa2nxaA1o4CL0xoJHsTsBId5k/M=; b=uf49i1uVWiLm/EYl0YCkdWzzGPqZrf2RBb+n6DUaf0ewTyUeQmB1p2eq5UwMWYwvoiCBlR VUmC/WyMbpzFq9wuhddo+WdeCeLHUli/UaI/3WEfdYxrPv3RhiX56QLUC+eIJMyQWbh/QI fz6ozKKrCXepaAOBHXSp6dFZV925B8DFvc9cQoeobHNB4XT/A19T5pXIh8AObVZZhC6PnT gU1vTHZRiswLeUFdtcmpLJe6ID0JwqDJoE6K4vHTbJ3nqf8vKWdJWoPKznsvcD62E8y5i4 FSlcSa8PwIA4B6lS+WTZ+R9qGjYt8zCeid/FM78/s23fTi829kfTnwbX6aeFeQ== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 ECDSA (prime256v1) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "YE2" (not verified)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4hMmMW0xrDzr7m; Sat, 15 Aug 2026 17:30:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (bladnoch.home.andric.com [192.168.0.20]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EA1B1306D5; Sat, 15 Aug 2026 19:30:29 +0200 (CEST) Content-Type: text/plain; charset=us-ascii 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 \(3826.700.81.1.8\)) Subject: Re: git: cd0727ec709b - main - libc: Add C23 feature test macro From: Dimitry Andric In-Reply-To: Date: Sat, 15 Aug 2026 19:30:29 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <6a7f6d6a.372ae.3079abac@gitrepo.freebsd.org> To: Faraz Vahedi X-Mailer: Apple Mail (2.3826.700.81.1.8) > On 15 Aug 2026, at 19:23, Dimitry Andric wrote: >=20 > On 14 Aug 2026, at 21:32, Faraz Vahedi wrote: >>=20 >> The branch main has been updated by kfv: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcd0727ec709bb54f8f82104f6113284a= 15dd3464 >>=20 >> commit cd0727ec709bb54f8f82104f6113284a15dd3464 >> Author: Faraz Vahedi >> AuthorDate: 2026-08-14 12:22:00 +0000 >> Commit: Faraz Vahedi >> CommitDate: 2026-08-14 19:31:54 +0000 >>=20 >> libc: Add C23 feature test macro >>=20 >> Define the __STDC_VERSION_STDIO_H__ feature test macro now that >> the header fully conforms to C23. >>=20 >> Reviewed by: fuz >> Approved by: fuz (mentor) >> MFC after: 1 month >> Differential Revision: https://reviews.freebsd.org/D58842 > ... >> diff --git a/include/stdio.h b/include/stdio.h >> index ea016d65095d..50e3ff2d1c34 100644 >> --- a/include/stdio.h >> +++ b/include/stdio.h >> @@ -32,8 +32,8 @@ >> * SUCH DAMAGE. >> */ >>=20 >> -#ifndef _STDIO_H_ >> -#define _STDIO_H_ >> +#ifndef __STDC_VERSION_STDIO_H__ >> +#define __STDC_VERSION_STDIO_H__ 202311L >>=20 >> #include >> #include >=20 > This particular change appears to have broken the math/gmp port, which > hasn't functionally changed since 2023. >=20 > It has this construct to detect the existence of FILE: >=20 > /* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, > defines EOF but not FILE. */ > #if defined (FILE) \ > || defined (H_STDIO) \ > || defined (_H_STDIO) /* AIX */ \ > || defined (_STDIO_H) /* glibc, Sun, SCO */ \ > || defined (_STDIO_H_) /* BSD, OSF */ \ > || defined (__STDIO_H) /* Borland */ \ > || defined (__STDIO_H__) /* IRIX */ \ > || defined (_STDIO_INCLUDED) /* HPUX */ \ > || defined (__dj_include_stdio_h_) /* DJGPP */ \ > || defined (_FILE_DEFINED) /* Microsoft */ \ > || defined (__STDIO__) /* Apple MPW MrC */ \ > || defined (_MSL_STDIO_H) /* Metrowerks */ \ > || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ > || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ > || defined (__STDIO_LOADED) /* VMS */ \ > || defined (_STDIO) /* HPE NonStop */ \ > || defined (__DEFINED_FILE) /* musl */ > #define _GMP_H_HAVE_FILE 1 > #endif >=20 > Now that _STDIO_H_ has been removed, the detection fails and another > part of the port falls over due to an incorrect prototype. >=20 > I guess we could patch the math/gmp port with another > __STDC_VERSION_STDIO_H__ macro, but it might be good to do an exp-run = to > see if there are more GNU projects which rely on the existence of the > _STDIO_H_ macro? FWIW, I would prefer something like this: diff --git a/include/stdio.h b/include/stdio.h index 50e3ff2d1c34..07ed71035e84 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -32,8 +32,12 @@ * SUCH DAMAGE. */ +#ifndef _STDIO_H_ +#define _STDIO_H_ + #ifndef __STDC_VERSION_STDIO_H__ #define __STDC_VERSION_STDIO_H__ 202311L +#endif #include #include @@ -540,4 +544,4 @@ extern int __isthreaded; __END_DECLS __NULLABILITY_PRAGMA_POP -#endif /* !__STDC_VERSION_STDIO_H__ */ +#endif /* !_STDIO_H_ */ -Dimitry