]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man7/feature_test_macros.7: Add _ISOC23_SOURCE, _ISOC2X_SOURCE
authorMark Harris <mark.hsj@gmail.com>
Wed, 28 Jan 2026 06:46:23 +0000 (22:46 -0800)
committerAlejandro Colomar <alx@kernel.org>
Tue, 10 Feb 2026 22:46:31 +0000 (23:46 +0100)
_ISOC2X_SOURCE has been recognized since glibc 2.31 (2020).[1]
_ISOC23_SOURCE has been recognized since glibc 2.40 (2024).[2]

[1] <https://sourceware.org/git/?p=glibc.git;a=commit;h=777d75fbc07b>
[2] <https://sourceware.org/git/?p=glibc.git;a=commit;h=42cc619dfbc4>

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Message-ID: <c52b599edf72f3e536ff6a5b846232ab15bc83d7.1769581650.git.mark.hsj@gmail.com>
[alx: srcfix]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man7/feature_test_macros.7

index 16f804441619bea40cc1388286197bf2d8e7de7b..ddb66465e2b142310a17d186a75815dc30267104 100644 (file)
@@ -359,6 +359,25 @@ Invoking the C compiler with the option
 .I \-std=c11
 produces the same effects as defining this macro.
 .TP
+.BR _ISOC23_SOURCE " (since glibc 2.40)"
+Exposes declarations consistent with the ISO C23 standard.
+.IP
+Since glibc 2.31,
+an equivalent macro named
+.B _ISOC2X_SOURCE
+was recognized
+(because the C23 standard had not then been finalized).
+Although the use of this macro is obsolete,
+glibc continues to recognize it for backward compatibility.
+.IP
+Defining
+.B _ISOC23_SOURCE
+also enables C11, C99, and C95 features.
+.IP
+Invoking the C compiler with the option
+.I \-std=c23
+produces the same effects as defining this macro.
+.TP
 .B _LARGEFILE64_SOURCE
 Expose definitions for the alternative API specified by the
 LFS (Large File Summit) as a "transitional extension" to the
@@ -693,6 +712,8 @@ If any of
 .BR _ISOC99_SOURCE ,
 .B _ISOC11_SOURCE
 (since glibc 2.18),
+.B _ISOC23_SOURCE
+(since glibc 2.40),
 .BR _POSIX_SOURCE ,
 .BR _POSIX_C_SOURCE  ,
 .BR _XOPEN_SOURCE ,
@@ -877,6 +898,10 @@ main(int argc, char *argv[])
     printf("_ISOC11_SOURCE defined\[rs]n");
 #endif
 \&
+#ifdef _ISOC23_SOURCE
+    printf("_ISOC23_SOURCE defined\[rs]n");
+#endif
+\&
 #ifdef _XOPEN_SOURCE
     printf("_XOPEN_SOURCE defined: %d\[rs]n", _XOPEN_SOURCE);
 #endif