aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-01-23 21:49:48 +0100
committerCorinna Vinschen <corinna@vinschen.de>2024-01-31 20:11:58 +0100
commit62ca95721a14f43c680f3c4d77a872a607b553a6 (patch)
tree697e14f91c5c234c570c48a42e002004877d10cd /newlib/libc
parent219b2dff771d01d7be8e03adf068ac3b69a89363 (diff)
downloadnewlib-62ca95721a14f43c680f3c4d77a872a607b553a6.zip
newlib-62ca95721a14f43c680f3c4d77a872a607b553a6.tar.gz
newlib-62ca95721a14f43c680f3c4d77a872a607b553a6.tar.bz2
Cygwin: posix_getdents: implement per SUS Base Specifications Issue 8 draft
- Basically maintain a hidden DIR* inside fhandlers. - lseek has to be tweaked to allow basic seeking on the directory descriptor. - the current implementation does not keep the dir positions between duplicated descriptor in sync. In fact, every descriptor keeps its own copy of the DIR* and after dup/fork/exec, the directory position is reset to 0, i. e., to the start of the directory, as if rewinddir() has been called on the new descriptors. While this behaviour isn't yet covered by the Issue 8 draft, a bug report along these lines exists and will probably be picked up for TC1. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/dirent.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/newlib/libc/include/dirent.h b/newlib/libc/include/dirent.h
index cdfa21f..cc7e9e0 100644
--- a/newlib/libc/include/dirent.h
+++ b/newlib/libc/include/dirent.h
@@ -80,6 +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
+ssize_t posix_getdents(int, void *, size_t, int);
+#endif /* __POSIX_VISIBLE >= 200809 */
__END_DECLS
#endif /*_DIRENT_H_*/