diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2025-01-28 12:42:37 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2025-01-28 12:43:03 +0100 |
commit | 6baa8484dbd47f66d9c2ea2c79c80f33b8ca172f (patch) | |
tree | 7f05db5559e913a98e31551547e0d5219e6a90a0 /newlib/libc | |
parent | fe6ddc15a35636ca7027c32e4c60ebb136fc9d7f (diff) | |
download | newlib-6baa8484dbd47f66d9c2ea2c79c80f33b8ca172f.zip newlib-6baa8484dbd47f66d9c2ea2c79c80f33b8ca172f.tar.gz newlib-6baa8484dbd47f66d9c2ea2c79c80f33b8ca172f.tar.bz2 |
unistd.h: declare posix_close
Declare posix_close, a new function defined by POSIX-1.2024, per
https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_close.html
Define POSIX_CLOSE_RESTART.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/sys/unistd.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 13b0c16..9dae4b3 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -26,6 +26,9 @@ int chown (const char *__path, uid_t __owner, gid_t __group); int chroot (const char *__path); #endif int close (int __fildes); +#if __POSIX_VISIBLE >= 202405 +int posix_close (int __fildes, int __flag); +#endif #if defined(__CYGWIN__) && (__BSD_VISIBLE || __GNU_VISIBLE) /* Available on FreeBSD (__BSD_VISIBLE) and Linux (__GNU_VISIBLE). */ int close_range (unsigned int __firstfd, unsigned int __lastfd, int __flags); @@ -342,6 +345,13 @@ int unlinkat (int, const char *, int); #define STDERR_FILENO 2 /* standard error file descriptor */ /* + * Flag values for posix_close per IEEE Std 1003.1, 2024 Edition + */ +#if __POSIX_VISIBLE >= 202405 +#define POSIX_CLOSE_RESTART 1 +#endif + +/* * sysconf values per IEEE Std 1003.1, 2008 Edition */ |