From nobody Wed Aug 19 10:23:54 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 4hQ2jW6K1Mz6njBy for ; Wed, 19 Aug 2026 10:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hQ2jW55m1z3cG0 for ; Wed, 19 Aug 2026 10:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787135039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3rNBd1gq/IGz0nxwHjVdXabqcZrD+F2cByg//IK8xM=; b=LI+cXYYiTcTQrFoWiV47je3PjPStbGjj+YgOjKHFH3yB1WJin2KNJqm1a4iptIXf1Q7j3p GPw38heOB5tQqbXN2t1ogO4H6Dn+2ilPzNkviMaxaskxsLruu3BfJ8AUK0hAGMuvCKCVZo Gg6ka6Stvp5FQZL9S31hU8k/v2+c2GT9oYLUJR6tbAMONZ1yhQ5U1Adz1mqA8dxZUJBuFW hvalGGt8gQuWZaRj1yfwlNUE5Zm85gf8xs/dy6FuTT6wHH9sF50j3g46UzdxbsnKqsa9p3 wm+nuDh8EYOaOR91xKON4Z50nzpTQvvNCDSsJ9B/3s+vyatcG4lxHoTcLzfoqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787135039; a=rsa-sha256; cv=none; b=mlULakpaB9oPR5dZm5aljqF8ToGBqXGFWUSCfEzJ89B+b9uzdsCV5xSPMD3fGMQZeZZd6u Fj48JTMa46w5l3bUYxZi6clIQ/yGugmBIZ4LCXZ1Ayl4KeRtm5JuY2Nj0kzUcwBEUItrOl hTZZygHmEi1pa2523u+u08/eZcL3sU7qsxK+8U7hupBXn5gFATzmvXfhQnOpb64EW1cXoK 2cRrQX2huVshs1J8bx5I2CtPegS805FlJ1HptQCzc6LzwM1S+2b4pkhK0yZ+VSZB9d9N75 daBh506NepqoXZKn5Us+9F5waVMmHvvUozmrvxMUGOAalkBC3ZkLPAoQx/q0tg== 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=1787135039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3rNBd1gq/IGz0nxwHjVdXabqcZrD+F2cByg//IK8xM=; b=tjpbf3kVgDu5vF6h9xbSwAH3nD1zzEyrQ9LZX+hrNISCTJmzlqPYSFl1IBRJ+CqUbBiA1V UQhWOIsveY+Hcgmedk+P88dtyisNDKbOPl5eCPJ32UHFSeAlmtTRlqkAFC6E5s1lhcfZUQ u7b7RsxyCuULZ3AtAdTJtjn6rkLh+30BnApDwueF11EnGPz+KsYbc9rk4hi6pR9t55wFlo Gq+LuJ52mUy2GMHqyTI0/uCy+4CBAqE7nN4P7XEyyAHjtPtQGYvB2rQEtpQhP9uG4u3WBu Ge3X2kqgOjTDe8WxnpeJlQ8abip+W8Sog4tF9gxbHDC8wXYOmxyh9Y9hVngRwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hQ2jW435dzBJk for ; Wed, 19 Aug 2026 10:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3287f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 19 Aug 2026 10:23:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Faraz Vahedi Subject: git: 8d29d2429649 - main - libc: Restore prior C23 include guards 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kfv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d29d242964976d9ffa89387d97de87d6cedc886 Auto-Submitted: auto-generated Date: Wed, 19 Aug 2026 10:23:54 +0000 Message-Id: <6a85843a.3287f.2aec5cf8@gitrepo.freebsd.org> The branch main has been updated by kfv: URL: https://cgit.FreeBSD.org/src/commit/?id=8d29d242964976d9ffa89387d97de87d6cedc886 commit 8d29d242964976d9ffa89387d97de87d6cedc886 Author: Faraz Vahedi AuthorDate: 2026-08-18 10:48:20 +0000 Commit: Faraz Vahedi CommitDate: 2026-08-19 10:21:21 +0000 libc: Restore prior C23 include guards To avoid any sort of POLA violation, this commit restores old guards and defines the C23 feature test macros in addition to them. This is to close off whole class of possible breakage, rather than patching it case by case. Reported by: dim Reviewed by: dim, dteske, fuz Approved by: dim, dteske (mentor), fuz (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D58911 --- include/assert.h | 8 +++++--- include/limits.h | 6 ++++-- include/rpc/xdr.h | 2 +- include/stdio.h | 6 ++++-- include/xlocale.h | 2 +- lib/libc/xdr/xdr.3 | 2 +- lib/libgeom/libgeom.h | 2 +- lib/libutil/libutil.h | 2 +- stand/libsa/geli/geliboot_internal.h | 8 +------- sys/sys/stdatomic.h | 6 ++++-- sys/sys/syslimits.h | 2 +- 11 files changed, 24 insertions(+), 22 deletions(-) diff --git a/include/assert.h b/include/assert.h index afbf2c1092e0..d474169719c6 100644 --- a/include/assert.h +++ b/include/assert.h @@ -68,8 +68,10 @@ #endif /* __BSD_VISIBLE */ #endif /* NDEBUG */ -#ifndef __STDC_VERSION_ASSERT_H__ -#define __STDC_VERSION_ASSERT_H__ 202311L +#ifndef _ASSERT_H_ +#define _ASSERT_H_ + +#define __STDC_VERSION_ASSERT_H__ 202311L /* * Static assertions. In principle we could define static_assert for @@ -92,4 +94,4 @@ __BEGIN_DECLS void __assert(const char *, const char *, int, const char *) __dead2; __END_DECLS -#endif /* !__STDC_VERSION_ASSERT_H__ */ +#endif /* !_ASSERT_H_ */ diff --git a/include/limits.h b/include/limits.h index 7b316e6e905d..5e7e0317d42e 100644 --- a/include/limits.h +++ b/include/limits.h @@ -29,7 +29,9 @@ * SUCH DAMAGE. */ -#ifndef __STDC_VERSION_LIMITS_H__ +#ifndef _LIMITS_H_ +#define _LIMITS_H_ + #define __STDC_VERSION_LIMITS_H__ 202311L #include @@ -148,4 +150,4 @@ #include #endif -#endif /* !__STDC_VERSION_LIMITS_H__ */ +#endif /* !_LIMITS_H_ */ diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index 1b480ca0dd34..4c75bcc5bbf7 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -332,7 +332,7 @@ __BEGIN_DECLS extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op); /* XDR using stdio library */ -#ifdef __STDC_VERSION_STDIO_H__ +#ifdef _STDIO_H_ extern void xdrstdio_create(XDR *, FILE *, enum xdr_op); #endif diff --git a/include/stdio.h b/include/stdio.h index 50e3ff2d1c34..566dddb76925 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -32,7 +32,9 @@ * SUCH DAMAGE. */ -#ifndef __STDC_VERSION_STDIO_H__ +#ifndef _STDIO_H_ +#define _STDIO_H_ + #define __STDC_VERSION_STDIO_H__ 202311L #include @@ -540,4 +542,4 @@ extern int __isthreaded; __END_DECLS __NULLABILITY_PRAGMA_POP -#endif /* !__STDC_VERSION_STDIO_H__ */ +#endif /* !_STDIO_H_ */ diff --git a/include/xlocale.h b/include/xlocale.h index b1c83592a619..cc2fc0839593 100644 --- a/include/xlocale.h +++ b/include/xlocale.h @@ -68,7 +68,7 @@ __BEGIN_DECLS #include #endif -#ifdef __STDC_VERSION_STDIO_H__ +#ifdef _STDIO_H_ #include #endif diff --git a/lib/libc/xdr/xdr.3 b/lib/libc/xdr/xdr.3 index 5d81a867ad66..65adb050fa44 100644 --- a/lib/libc/xdr/xdr.3 +++ b/lib/libc/xdr/xdr.3 @@ -572,7 +572,7 @@ This routine returns the amount of memory required to encode using filter .Fa func . .Pp -.It Li "#ifdef __STDC_VERSION_STDIO_H__" +.It Li "#ifdef _STDIO_H_" .It Li "/* XDR using stdio library */" .It Xo .Ft void diff --git a/lib/libgeom/libgeom.h b/lib/libgeom/libgeom.h index 713c49f0380c..2116645bd496 100644 --- a/lib/libgeom/libgeom.h +++ b/lib/libgeom/libgeom.h @@ -143,7 +143,7 @@ void geom_deletetree(struct gmesh *); struct gctl_req; -#ifdef __STDC_VERSION_STDIO_H__ /* limit #include pollution */ +#ifdef _STDIO_H_ /* limit #include pollution */ void gctl_dump(struct gctl_req *, FILE *); #endif void gctl_free(struct gctl_req *); diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index 679a213e64bf..17e4f1fba247 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -151,7 +151,7 @@ int uu_lock_txfr(const char *_ttyname, pid_t _pid); * Conditionally prototype the following functions if the include * files upon which they depend have been included. */ -#ifdef __STDC_VERSION_STDIO_H__ +#ifdef _STDIO_H_ char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, const char _delim[3], int _flags); #endif diff --git a/stand/libsa/geli/geliboot_internal.h b/stand/libsa/geli/geliboot_internal.h index 6b7b5742408e..50157f24c7f5 100644 --- a/stand/libsa/geli/geliboot_internal.h +++ b/stand/libsa/geli/geliboot_internal.h @@ -28,15 +28,9 @@ #ifndef _GELIBOOT_INTERNAL_H_ #define _GELIBOOT_INTERNAL_H_ -/* - * XXX: - * The following deliberate defines are to keep g_eli.h from including - * unnecessary headers. It would be preferable to conditionally include - * them in a _STANDALONE branch there instead. - */ #define _STRING_H_ #define _STRINGS_H_ -#define __STDC_VERSION_STDIO_H__ 202311L +#define _STDIO_H_ #include #include diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index 24be02e247a3..cc1e31f658a4 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -27,7 +27,9 @@ * SUCH DAMAGE. */ -#ifndef __STDC_VERSION_STDATOMIC_H__ +#ifndef _STDATOMIC_H_ +#define _STDATOMIC_H_ + #define __STDC_VERSION_STDATOMIC_H__ 202311L #include @@ -438,4 +440,4 @@ atomic_flag_clear(volatile atomic_flag *__object) #undef __bool_locally_defined #endif -#endif /* !__STDC_VERSION_STDATOMIC_H__ */ +#endif /* !_STDATOMIC_H_ */ diff --git a/sys/sys/syslimits.h b/sys/sys/syslimits.h index eb1520d98c89..84a39d36fda2 100644 --- a/sys/sys/syslimits.h +++ b/sys/sys/syslimits.h @@ -33,7 +33,7 @@ #define _SYS_SYSLIMITS_H_ #if !defined(_STANDALONE) && !defined(_KERNEL) && \ - !defined(__STDC_VERSION_LIMITS_H__) && !defined(_SYS_PARAM_H_) + !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_) #warning "No user-serviceable parts inside." #endif