From nobody Wed Aug 26 05:47:47 2026 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 4hVDFl2rdVz6qh8t for ; Wed, 26 Aug 2026 05:47:55 +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 4hVDFl0TYbz3ZR4 for ; Wed, 26 Aug 2026 05:47:55 +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=1787723273; bh=09Oh4muAra/7NeEEWAxlQ54VOnSnXA21T1hLO7IxluU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=DQYMl/a506IsP1CNC+oDFSDbp99HUXeF7wT2XM3SteakefVn0N2BJfUWiMtxY1W/+EX9HZRACNdjVdVKmzI1Seme/CHvGJabvdA2TqUFq2z4IXsDpz3aQxYKhTbkDm8rSOoPs4AJftccNjOxke1IRZB6jU7jql4iOdhZbnJNiBMmlSkjVsLAgmTe3BFvGMeOm5dJ7o4fqQwubIpIKOrVkzTSopq6pn8tvbCE+sfTIK30wx7mO7+BTw1wP62nwzRBMvjMdYVi2+6Ox2bu1/uW7kzDmjM67wXwZQHDLOHl0+JDM6AkABaf6MsEclzlQHRR3Ut5V4FhElhmwLCHIIttzg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1787723273; bh=UzQ0caOqWC1CDt4w2x32M5U8Eq3AQjxkixzJt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sddKN4OkvqNw_hAsRGKnpL_WUYbm1LbQknCrYXLRkcD H6k_jpbhJCGJNtxHlwnGau2DTDR9i778fb5f6M7_RqCl4UfLHtN3StMactCInn6N0QNZSym3PGTk tx5dlNw82OvMkkgHpaFCJG1JxNCncct1iFRc9aWdo_kpMtZRrghEGrYOuJKiB6Xb1r_mhj1DiCQa hFScLEWSNYxR1CAhSlx6ZauZiKr2Nwi.uzFykZ830Gq1WPEEeVSLf.AS0V.Ee3.g0KQwleP0DgP8 g9JrQXetJCRf5R6PJb8yz3QKwA0ihhdI1Estuv6ECtGV7iH61SQx.xEZnAvjnMe_XzR1VnmYhBP8 - X-Sonic-MF: X-Sonic-ID: da0999a9-23c5-4228-9b55-a4469ad7b53e Received: from sonic.gate.mail.ne1.yahoo.com by mail-asdoutdeli-p-cin-usea5-prod-sonicconsumer-svc-104 with HTTP; Wed, 26 Aug 2026 05:47:53 +0000 Received: from dip107.lsn.gq1.yahoo.com ([67.195.161.116]) by hello (SMTP) with SMTP ID 458c60856efbf0d5674d6909ad71df73; Wed, 26 Aug 2026 05:47:48 +0000 (UTC) Message-ID: Date: Tue, 25 Aug 2026 22:47:47 -0700 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 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: 8d29d2429649 - main - libc: Restore prior C23 include guards To: Devin Teske Cc: Faraz Vahedi , Warner Losh , "" , "" , =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= References: <6a85843a.3287f.2aec5cf8@gitrepo.freebsd.org> <865x0z6526.fsf@ltc.des.dev> <86wltf4mz8.fsf@ltc.des.dev> <86ik4y4gsv.fsf@ltc.des.dev> <730AFA99-F6E9-4D78-BE52-54E1DEE3ABF4@freebsd.org> <86ecfm3y0g.fsf@ltc.des.dev> <5E276341-DFB3-46A6-B533-CFBE2D35D762@freebsd.org> Content-Language: en-US From: Mark Millard In-Reply-To: <5E276341-DFB3-46A6-B533-CFBE2D35D762@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.26380 mail.core.serving.mcws.prd.acl:role.token.mcws.jsmtp.yahoo X-Rspamd-Queue-Id: 4hVDFl0TYbz3ZR4 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/25/26 19:51, Devin Teske wrote: > : at_start: {auth_results {shxd.cx}} > > >> On Aug 25, 2026, at 10:34 AM, Dag-Erling Smørgrav wrote: >> >> Devin Teske writes: >>> If someone uses __STDC_VERSION_*_H__ to inject C23 syntax of their >>> own, they are asking the advertisement to do visibility's job. I may >>> be missing a case where that is the right test; I have not found it in >>> 7.1.2p6 yet. >> >> Imagine a single-header library (i.e. a big collection of static inline >> functions) that uses __STDC_VERSION_FOO_H__ to choose between a C23 >> solution and a backward-compatible solution. This header is then >> included in a C99 program and fails because we are advertising C23 >> features to a C99 program. It's really not that hard to understand. >> >>> Your predicate (__ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE) would make >>> the macros mean "this compilation can see C23 semantics from this >>> header." That is a policy we can talk about on its own. I would >>> rather not fold it into the _FOO_H_ restore, which was only POLA after >>> gmp. >> >> I don't know what you mean with “fold it into the _FOO_H_ restore”. The >> “_FOO_H_ restore” has already happened and we're not going to rewrite >> history. I am asking for this feature to be implemented correctly. >> > > (combining my response to two people into one e-mail to limit branching of the thread) > > DES, > > You asked what I meant by "fold it into the _FOO_H_ restore," and you > wrote that we are not going to rewrite history. I never meant that we > would. A later commit can add the #if without touching 8d29d242; one > can even reverse a change that way. I did not want the new #if on > __STDC_VERSION_*_H__ handled together with putting the old > _STDIO_H_-style names back for gmp. > > DES and Warner, > > stdio.h defines the macro before it includes cdefs.h. cdefs.h would > come first; 77 other headers under /usr/include already test > __BSD_VISIBLE. Then the #if as you both named: > > #include > #if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE > #define __STDC_VERSION_STDIO_H__ 202311L > #endif > > Same pattern on the other headers. If you both agree that is the > approach, Faraz can put the Differential up. > > Devin > If __STDC_VERSION_STRING_H_, __STDC_VERSION_WCHAR_H__, or __STDC_VERSION_STDLIB_H__ ever get such it looks like . . . For: #if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE #define __STDC_VERSION_STRING_H__ 202311L #endif It looks like __BSD_VISIBLE would need to imply that memchr, strchr, strpbrk, strrchr, and strstr would have the new C23 Qualifier-Preserving macro behavior. For: #if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE #define __STDC_VERSION_WCHAR_H__ 202311L #endif It looks like __BSD_VISIBLE would need to imply that wmemchr, wcschr, wcspbrk, wcsrchr, and wcasstr would have the new C23 Qualifier-Preserving macro behavior. For: #if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE #define __STDC_VERSION_STDLIB_H__ 202311L #endif It looks like __BSD_VISIBLE would need to imply that bsearch and bsearch_s would have the new C23 Qualifier-Preserving macro behavior. (That includes the lack of such for (NAME) notation and function pointer use.) (I ignore here C++ contexts.) -- === Mark Millard marklmi at yahoo.com