From nobody Mon Aug 24 14:52:23 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 4hTDRG4hmHz6pTfw; Mon, 24 Aug 2026 14:52:42 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hTDRG3lHnz3m91; Mon, 24 Aug 2026 14:52:42 +0000 (UTC) (envelope-from kfv@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787583162; 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=oQMZRaWfgso0XkgSzLhp7ja5le2etlnuvqKU3bbmTgs=; b=H4I6sGrFhisT0gzdQRndWx/VYqHVx1LzpW+AUrtnxPlb8z5HHrpdxMDOzbsUJCeUMPy0jf Dg8DhglZTmejajApQcNFaJu2gP0OM7eL4B+LWbWV9slHTkY0SCzJrrq30a3GRW39BhIZ+j SKZ4K3T4hnjff3WaeulKS8iZbXDZspOVE8ZkwiPfK0NdHunvk+wp2uzOoMNy/6mDqUxHDo ddb5rud/Y7JBycBDdR6yFj8bmv9cuVCdAlIYVVwHoG042nESXYhrMST8njuNiXytU+/amJ YcUso6h6tWMLUApA4lsUNnpZndUexNVt3e9sjSrznlxRQD1g5BYVDFzQUSm0KQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787583162; a=rsa-sha256; cv=none; b=SavHfC6HZo4/FbiVyL58UnJDDANtubPGW6e06kTYuOuha71P7C600XtCJLBj27vS0is0w/ 74hJfI0AZj6uO51W7ohG4unH/87Bhfgp19o+81471i/FhIaMQREBArUtK24As4auwEHuE8 fNjYUA5uFS93o0us3FgDBUUqNSQNa3ZOkQnZtZo3MOSIWDvuCVvrSBc/IzBaSgS6EBtMz/ RZl/Z6BpY9hrzeXE+IjJ3++WsyDaF3Txcwi4swNhjK7EVYPCxfD0Jot6sUhX7J65OV8dAJ 1G1fAIqkAcV8lllLgmYmNRDVkSa0kaJGr0FppH75JHTIa2QGPJqh5L4QgbIZBA== 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=1787583162; 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=oQMZRaWfgso0XkgSzLhp7ja5le2etlnuvqKU3bbmTgs=; b=XzYG78Hlj1lj4J3whSUAR4sMPAd7O0BaBrgVOPvutnj3t1W84JcCWrI79RwYrDmIgeCNwY OYD1M0T+lUt0X+JuzSO9msx4qYsW9EzcGOl+bMRzwPr5B9jONuBwW49uf0IytcBzExafS4 x7buqfR8BwmE8bCRkNR5tDkUgJNT35ECOTxQ/msy6XaoYgla23fyUp1SB842utI7tWF49d WGrMiku9qweKGkvk4Q3+XGrEdETksQdoxlzBatRnYX+q/I4JzlbejDlA58W8ooPIHKibyj 9/TSvydwADfUb9946KJicvVh60LkKV5hkj296xqanNu7gwOtdLOxycdZtG+g9g== Received: from smtpclient.apple (unknown [135.136.39.202]) (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 4hTDRD3XdxzG8g; Mon, 24 Aug 2026 14:52:39 +0000 (UTC) (envelope-from kfv@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_09DE3E49-BE2C-496C-B46A-1538740CDE21"; 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: 8d29d2429649 - main - libc: Restore prior C23 include guards From: Faraz Vahedi In-Reply-To: <86wltf4mz8.fsf@ltc.des.dev> Date: Mon, 24 Aug 2026 18:22:23 +0330 Cc: Warner Losh , src-committers , "" , "" Message-Id: References: <6a85843a.3287f.2aec5cf8@gitrepo.freebsd.org> <865x0z6526.fsf@ltc.des.dev> <86wltf4mz8.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3864.100.1.1.5) --Apple-Mail=_09DE3E49-BE2C-496C-B46A-1538740CDE21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 24, 2026, at 17:52, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Warner Losh writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> Shouldn't these be conditional on the visibility macros? >> Seems fine to me since it's in the implementation namespace. Maybe >> you could share your reasoning. >=20 > Imagine a library which is is written to be backward compatible with = C99 > but offers additional functionality which requires a C23 compiler and > uses one of these __STDC_VERSION_* macros to control its visibility in > the header. An application written in C99 uses this library and = builds > with -std=3Dc99. Because we set __STDC_VERSION_* unconditionally, the > library now exposes C23-only code to the C99 program, which therefore > fails to build. Therefore, these macros should only be defined if > __BSD_VISIBLE || __ISO_C_VISIBLE >=3D 2023. Since these macros solely advertise which revision of the header our = libc implements and are neither a language-mode nor visibility switch, I believe we=E2=80=99= re fine. C23-only identifiers are already gated on our visibility macros, and exposure of = these feature test macros per se are not of any harm, even for libraries targeting = modes prior to C23. For the same very reason, it is also fine to have these as include = guards (which brand new C23 headers like and still do). My restoration of traditional guards was just to avoid any possible POLA = violation for those depending on them (albeit wrong) as reported by dim for math/gmp = port as an example. Cheers, Faraz= --Apple-Mail=_09DE3E49-BE2C-496C-B46A-1538740CDE21 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/74FAmqMWqcACgkQLdpU9MVz /75sGA/7Ba5Hu6l0rJdp/caQMGIJu+bHD6oJalePbDemxzBegHlsM5JrPM24bwMh 6RAFErphBxn5ram6BZcpn+aiFnqnDO4Cv0PeT6hW33TyeYPq7yaFBPt/ayuDvOTC zrUgaIlOTU7IP1PPFGqQNpqLLB81zqrLZeBvbAPgJTcsQgaxvRhu3J1BrpfRy48S 1YkTW9A0QAH8Cw0I9V7VtB4z3TUKloa1kyorsc01gDZ4rO1z+mQ6n7ZyfaOyIn6i LqjewTDgzpNmhJM8ai1OuTdLDQk5LX62ecMiIOnbuazrcwAPe3aWrqhoB/sdfhp9 hCrtQLR3nCXsyqJOc+1puGO06+OLGhA/ycxarWdWtMjzkyS8SPfFcpYVYH8ndcnO Jx2ho1VSEJP6mJ2Xi3aTlzz6HpxNd1B9epUsekyWwIEr4GQT9lIaK1UQHTvot2nW dUT7x6h2T4+3qPMqKWv3Tm+2ELrGe0g7687EjThIow5VKUbU2Mz6wWtZviu7wcFo A6XJQ6IEJAPMTWLIfMRUBG1gqI/ZlF7RkdGPJnJgc8v4aJuR34b833ai6zwOCeFM c8T7LK3TjyS2Ru6NC3hszYP2qSIyRZiqD0yI4IddU4fVP/ERF6Q39Cdh58trmQxE PXy6jJVv+rMKAIYSb9LtxE+X3mFPQjhSBQ5rEndgcESUlf4k0+o= =9iQt -----END PGP SIGNATURE----- --Apple-Mail=_09DE3E49-BE2C-496C-B46A-1538740CDE21--