From ca31784fef301f5797bd29d33ceb2a3a9c1f0539 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 15 Aug 2024 18:27:28 +0200 Subject: [PATCH] Fix POSIX guards for POSIX.1-2024 extensions Signed-off-by: Corinna Vinschen --- newlib/libc/include/dirent.h | 4 ++-- newlib/libc/include/locale.h | 2 +- winsup/cygwin/include/sys/dirent.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/newlib/libc/include/dirent.h b/newlib/libc/include/dirent.h index cc7e9e0f0..239253ee6 100644 --- a/newlib/libc/include/dirent.h +++ b/newlib/libc/include/dirent.h @@ -80,9 +80,9 @@ int scandirat(int, const char *, struct dirent ***, const struct dirent **)); int versionsort(const struct dirent **, const struct dirent **); #endif -#if __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 202405 ssize_t posix_getdents(int, void *, size_t, int); -#endif /* __POSIX_VISIBLE >= 200809 */ +#endif /* __POSIX_VISIBLE >= 202405 */ __END_DECLS #endif /*_DIRENT_H_*/ diff --git a/newlib/libc/include/locale.h b/newlib/libc/include/locale.h index e3a702a5e..47b02e99a 100644 --- a/newlib/libc/include/locale.h +++ b/newlib/libc/include/locale.h @@ -90,7 +90,7 @@ locale_t duplocale (locale_t); locale_t uselocale (locale_t); #endif /* __POSIX_VISIBLE >= 200809 */ -#if __POSIX_VISIBLE >= 200809 /* FIXME? Starting with issue 8 */ +#if __POSIX_VISIBLE >= 202405 const char *getlocalename_l (int, struct __locale_t *); #endif diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h index 6272ea329..983b69dbf 100644 --- a/winsup/cygwin/include/sys/dirent.h +++ b/winsup/cygwin/include/sys/dirent.h @@ -37,7 +37,7 @@ struct dirent char d_name[NAME_MAX + 1]; }; -#if __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 202405 #define DT_FORCE_TYPE 0x01 /* Suggested by SUS Base Specs Issue 8 */ typedef __uint16_t reclen_t; @@ -54,13 +54,13 @@ struct posix_dent __uint32_t __d_internal1; char d_name[NAME_MAX + 1]; }; -#endif /* __POSIX_VISIBLE >= 200809 */ +#endif /* __POSIX_VISIBLE >= 202405 */ #define d_fileno d_ino /* BSD compatible definition */ typedef struct __DIR DIR; -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __BSD_VISIBLE || __POSIX_VISIBLE >= 202405 /* File types for `d_type'. */ enum { @@ -83,7 +83,7 @@ enum DT_WHT = 14 # define DT_WHT DT_WHT }; -#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ +#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 202405 */ #if __BSD_VISIBLE /* Convert between stat structure types and directory types. */