diff --git a/man7/feature_test_macros.7 b/man7/feature_test_macros.7 index 9f1db40b9..9db8974fa 100644 --- a/man7/feature_test_macros.7 +++ b/man7/feature_test_macros.7 @@ -192,6 +192,46 @@ plus the XSI extension) and C99 definitions. definitions for SUSv4 (i.e., the POSIX.1-2008 base specification plus the XSI extension). .RE +.IP +If +.B __STRICT_ANSI__ +is not defined, or +.BR _XOPEN_SOURCE +is defined with a value greater than or equal to 500 +.I and +neither +.B _POSIX_SOURCE +not +.B _POSIX_C_SOURCE +is explicitly defined, then +the following macros are implicitly defined: +.RS +.IP \(bu 3 +.B _POSIX_SOURCE +is defined with the value 1. +.IP \(bu +.B _POSIX_C_SOURCE +is defined, according to the value of +.BR _XOPEN_SOURCE : +.RS 7 +.TP +.BR _XOPEN_SOURCE " < 500" +.B _POSIX_C_SOURCE +is defined with the value 2. +.TP +.RB "500 <= " _XOPEN_SOURCE " < 600" +.B _POSIX_C_SOURCE +is defined with the value 199506L. +.TP +.RB "600 <= " _XOPEN_SOURCE " < 700" +.B _POSIX_C_SOURCE +is defined with the value 200112L. +.TP +.RB "700 <= " _XOPEN_SOURCE " (since glibc 2.10)" +.B _POSIX_C_SOURCE +is defined with the value 200809L. +.RE +.RE .TP .B _XOPEN_SOURCE_EXTENDED If this macro is defined, and