From nobody Sat Oct 31 10:06:48 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 4jGtt04XpDz6yLHK for ; Sat, 31 Oct 2026 10:06:48 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jGtt023Y6z4d7N for ; Sat, 31 Oct 2026 10:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793441208; 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; bh=+utaYpEmMrSL1jXhi0GA1wxUD9E9CapGY9pE9M6yXhM=; b=uS1/1GgVnFbpkRHUNGCst9tGnl435s7SfFpSve9IxsYScZ5rJz5sukQUcQxYPsOelU/LMm Ik1gefUb/s30Tu8P1qsfTr/Rk4ZRGHbQpdXileUf4PFCClq51Xmt1GUOVye1c9S1/X6jAc F+4K9uUsUsCbrcVVXvkoOJHf0dlA1m/l5NQ9d6aSgiJuKrcsx3VLnuakSvx2pcp6I2M2gy 13QBl87uwAWXkxGUP9mslBvqRMWkKCrDZYvE7FlJ24aUPS9ONjYShIKThUhENk77F97HwO 6TUQDewI5Bk4sHh4YF5MRhPVpf1Qacc0IdOlEovmhiwIsl3iZtY8p6RbcWkXtQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793441208; b=RmtncRJkP3Ga6+gLfoBCuyQyIS5DuRZwgUjvusZx9ONPOeMNIlF2Jl0M0rTWhrgVEHULXG nc3sdxwsExV+tArRb3XtCBFkPhrXpcj2A8GVU5Yd5KGvzniGU8zrRO2gg6dycwRozBmdko lqNhEfGWg2m6c9C+Qw7poHR7gYxoKEUimN0bqaQcSugz1dSu8IavrrHJ2E3X/tCy5dYEd1 BpWGzcOOHpS9sI6CRnXpfIfDdnmcGHwFVWg5IzEQLcSpXn3sv4cHbWIzOZr4T3+OO2abS6 RCiK1Q7wJOFIrGQeFCW2DfznpwGKEyVeqxtyjL6+uRdkbvLgGwvXCErEfbep4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793441208; 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; bh=+utaYpEmMrSL1jXhi0GA1wxUD9E9CapGY9pE9M6yXhM=; b=KlenEYwJZb1v8JZYBhkR3KqgOZ/HmxsFafRRY37bopEzLudpk6wGz6aKV80lwGmAnveIAk ZLfdR+vdcR1zUCFlAQS0DEvX106gygfw1pMbLnH+E+IaqBetjWvQQRBdMeF6syNnKViHpv RH0nl+xbb2P29/05k1ov3pYNBdF1mbuZVWwfOM8SAK1y+QxzhOTe7IQOfxn+ZJoN3BEG0W elBow+y8c037t5Ox5EVmvu/Jwb5zfKV/DO9ZpaINL9CopppZ0XrrdSPeVPsPuoqj11C3oJ iNHiYKlLGLWk4I3Ty+8fEwGODt8EHBDse8Cbo1bEAji9MYJTtXYipeDBnZT/mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jGtt012Bqz18FG for ; Sat, 31 Oct 2026 10:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c5a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 31 Oct 2026 10:06:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Faraz Vahedi Subject: git: 1a86e51f70e3 - stable/15 - libc: Fix C23 version macro visibility List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 1a86e51f70e37a4578d891433e4b4e51acd1fb71 Auto-Submitted: auto-generated Date: Sat, 31 Oct 2026 10:06:48 +0000 Message-Id: <6ae5bdb8.3c5a4.35f4fcdb@gitrepo.freebsd.org> The branch stable/15 has been updated by kfv: URL: https://cgit.FreeBSD.org/src/commit/?id=1a86e51f70e37a4578d891433e4b4e51acd1fb71 commit 1a86e51f70e37a4578d891433e4b4e51acd1fb71 Author: Dag-Erling Smørgrav AuthorDate: 2026-08-30 17:56:51 +0000 Commit: Faraz Vahedi CommitDate: 2026-10-31 10:03:35 +0000 libc: Fix C23 version macro visibility In headers that existed prior to C23, these should be visible only in C23 or BSD mode. Fixes: 0fe73dcf7c32 ("libc: Add C23 feature test macro") Fixes: 1f09e354297c ("sys/limits.h: Add BOOL_MAX, BITINT_MAXWIDTH, and C23 feature test macro") Fixes: cd0727ec709b ("libc: Add C23 feature test macro") Fixes: fc9d02cb29ed ("libc: Add C23 feature test macro") Fixes: 4aeed6e9d213 ("libc: Add C23 feature test macro") Reviewed by: fuz, kfv, dteske Differential Revision: https://reviews.freebsd.org/D59272 (cherry picked from commit 5076e9b5463afa47cf2e7689431d3dd33e5b15cb) --- include/assert.h | 2 ++ include/limits.h | 6 ++++-- include/setjmp.h | 6 ++++-- include/stdio.h | 6 ++++-- include/time.h | 6 ++++-- sys/sys/stdatomic.h | 6 ++++-- 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/include/assert.h b/include/assert.h index d474169719c6..06e771d24cf5 100644 --- a/include/assert.h +++ b/include/assert.h @@ -71,7 +71,9 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ +#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE #define __STDC_VERSION_ASSERT_H__ 202311L +#endif /* * Static assertions. In principle we could define static_assert for diff --git a/include/limits.h b/include/limits.h index 5e7e0317d42e..0ab58086cd2a 100644 --- a/include/limits.h +++ b/include/limits.h @@ -32,10 +32,12 @@ #ifndef _LIMITS_H_ #define _LIMITS_H_ -#define __STDC_VERSION_LIMITS_H__ 202311L - #include +#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE +#define __STDC_VERSION_LIMITS_H__ 202311L +#endif + #if __POSIX_VISIBLE #define _POSIX_ARG_MAX 4096 #define _POSIX_LINK_MAX 8 diff --git a/include/setjmp.h b/include/setjmp.h index 108b47771160..45a3beeec6ec 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -37,10 +37,12 @@ #ifndef _SETJMP_H_ #define _SETJMP_H_ -#define __STDC_VERSION_SETJMP_H__ 202311L - #include +#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE +#define __STDC_VERSION_SETJMP_H__ 202311L +#endif + /* The size of the jmp_buf is machine dependent: */ #include diff --git a/include/stdio.h b/include/stdio.h index 566dddb76925..1c7b0b3d0e8b 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -35,12 +35,14 @@ #ifndef _STDIO_H_ #define _STDIO_H_ -#define __STDC_VERSION_STDIO_H__ 202311L - #include #include #include +#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE +#define __STDC_VERSION_STDIO_H__ 202311L +#endif + __NULLABILITY_PRAGMA_PUSH typedef __off_t fpos_t; diff --git a/include/time.h b/include/time.h index fed2805e03f1..6b304b6dd03b 100644 --- a/include/time.h +++ b/include/time.h @@ -37,13 +37,15 @@ #ifndef _TIME_H_ #define _TIME_H_ -#define __STDC_VERSION_TIME_H__ 202311L - #include #include #include #include +#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE +#define __STDC_VERSION_TIME_H__ 202311L +#endif + #if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE /* * Frequency of the clock ticks reported by times(). Deprecated - use diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h index cc1e31f658a4..e57fe3538bea 100644 --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -30,11 +30,13 @@ #ifndef _STDATOMIC_H_ #define _STDATOMIC_H_ -#define __STDC_VERSION_STDATOMIC_H__ 202311L - #include #include +#if __ISO_C_VISIBLE >= 2023 || __BSD_VISIBLE +#define __STDC_VERSION_STDATOMIC_H__ 202311L +#endif + #if (__has_extension(c_atomic) || __has_extension(cxx_atomic)) && \ defined(__clang__) #define __CLANG_ATOMICS