diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2024-08-15 17:40:06 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-08-15 17:40:06 +0200 |
commit | 13c89a620bf6811bc7ad253dacb67774986ab681 (patch) | |
tree | 8834e45b912937f8b2331a7560b56160a1d268b3 | |
parent | c6f14f261a8b7e34b007b3041ee3f5b106d5125f (diff) | |
download | newlib-13c89a620bf6811bc7ad253dacb67774986ab681.zip newlib-13c89a620bf6811bc7ad253dacb67774986ab681.tar.gz newlib-13c89a620bf6811bc7ad253dacb67774986ab681.tar.bz2 |
features.h: support POSIX.1-2024
TBD: Align _GNU_SOURCE, too?
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | newlib/libc/include/sys/features.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h index 41c1d0d..43c029b 100644 --- a/newlib/libc/include/sys/features.h +++ b/newlib/libc/include/sys/features.h @@ -66,6 +66,9 @@ extern "C" { * _POSIX_C_SOURCE >= 200809L * POSIX.1-2008 * + * _POSIX_C_SOURCE >= 202405L + * POSIX.1-2024 + * * _XOPEN_SOURCE * POSIX.1-1990 and XPG4 * @@ -141,7 +144,7 @@ extern "C" { #undef _POSIX_SOURCE #define _POSIX_SOURCE 1 #undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 200809L +#define _POSIX_C_SOURCE 202405L #endif #if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \ @@ -194,6 +197,10 @@ extern "C" { * POSIX.1-2008; enabled by default, with _POSIX_C_SOURCE >= 200809L, * or _XOPEN_SOURCE >= 700. * + * __POSIX_VISIBLE >= 202405 + * POSIX.1-2024; enabled by default, with _POSIX_C_SOURCE >= 202405L, + * or _XOPEN_SOURCE >= 700. + * * __XSI_VISIBLE * XPG4 XSI extensions; enabled with any version of _XOPEN_SOURCE. * @@ -296,7 +303,9 @@ extern "C" { #define __MISC_VISIBLE 0 #endif -#if (_POSIX_C_SOURCE - 0) >= 200809L +#if (_POSIX_C_SOURCE - 0) >= 202405L +#define __POSIX_VISIBLE 202405 +#elif (_POSIX_C_SOURCE - 0) >= 200809L #define __POSIX_VISIBLE 200809 #elif (_POSIX_C_SOURCE - 0) >= 200112L #define __POSIX_VISIBLE 200112 @@ -422,7 +431,10 @@ extern "C" { #ifdef __CYGWIN__ -#if __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 202405 +#define _POSIX_VERSION 202405L +#define _POSIX2_VERSION 202405L +#elif __POSIX_VISIBLE >= 200809 #define _POSIX_VERSION 200809L #define _POSIX2_VERSION 200809L #elif __POSIX_VISIBLE >= 200112 |