[PATCH] Add feature test macros for POSIX.1-2024.
Collin Funk
collin.funk1@gmail.com
Mon Jun 16 17:49:08 GMT 2025
Collin Funk <collin.funk1@gmail.com> writes:
> * include/features.h (_POSIX_C_SOURCE): Document the value of 202405L
> for POSIX.1-2024. Set it to 202405L when _GNU_SOURCE or _DEFAULT_SOURCE
> is defined.
> (_XOPEN_SOURCE): Document the value of 800 for POSIX-1.2024. Set it to
> 800 when _GNU_SOURCE is defined.
> (__USE_XOPEN2K24, __USE_XOPEN2K24XSI): New internal macros. Set them
> when _POSIX_C_SOURCE is 202405L or greater and/or when _XOPEN_SOURCE is
> 800 or greater.
> * manual/creature.texi (Feature Test Macros): Document the new values
> for _POSIX_C_SOURCE and _XOPEN_SOURCE.
>
> Signed-off-by: Collin Funk <collin.funk1@gmail.com>
> ---
> include/features.h | 30 +++++++++++++++++++++++-------
> manual/creature.texi | 6 +++++-
> 2 files changed, 28 insertions(+), 8 deletions(-)
Hi Carlos,
I saw you are reviewer for this on patchwork. Do you think it is better
to delay this until after the next release?
Maybe it is a bit weird to have the new value for _POSIX_C_SOURCE and
then never use it for declarations.
Collin
More information about the Libc-alpha
mailing list