diff --git a/man7/feature_test_macros.7 b/man7/feature_test_macros.7 index e6b9fba47..82502fb98 100644 --- a/man7/feature_test_macros.7 +++ b/man7/feature_test_macros.7 @@ -529,16 +529,37 @@ and .BR _SVID_SOURCE . .TP .B _REENTRANT -Historically, -defining this macro exposed definitions of certain reentrant functions. -However, already for many years this macro has had few effects, -and since glibc 2.3, no effects that were not also achieved by defining -.BR _POSIX_C_SOURCE -with a value of 199606L or greater. -This macro is now deprecated; since glibc 2.25, -defining it has the same effect as defining +Historically, it was necessary to define this macro in all +multithreaded code. +(Some C libraries may still require this.) +In glibc, +this macro also exposed definitions of certain reentrant functions. + +However, glibc has been thread-safe by default for many years; +since glibc 2.3, the only effect of defining +.BR _REENTRANT +has been to enable one or two of the same declarations that +are also enabled by defining .BR _POSIX_C_SOURCE with a value of 199606L or greater. + +In glibc 2.25 and later, +.B _REENTRANT +is deprecated. +Defining it is equivalent to defining +.B _POSIX_C_SOURCE +with the value 199606L. +If a higher POSIX conformance level is +selected by any other means (such as +.B _POSIX_C_SOURCE +itself, +.BR _XOPEN_SOURCE , +.BR _DEFAULT_SOURCE , +or +.BR _GNU_SOURCE ), +then +.B _REENTRANT +has no effect. .TP .B _THREAD_SAFE Synonym for the (deprecated)