Cygwin: posix_getdents: implement per SUS Base Specifications Issue 8 draft
commit62ca95721a14f43c680f3c4d77a872a607b553a6
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 23 Jan 2024 20:49:48 +0000 (23 21:49 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 31 Jan 2024 19:11:58 +0000 (31 20:11 +0100)
tree697e14f91c5c234c570c48a42e002004877d10cd
parent219b2dff771d01d7be8e03adf068ac3b69a89363
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>
newlib/libc/include/dirent.h
winsup/cygwin/cygwin.din
winsup/cygwin/dir.cc
winsup/cygwin/fhandler/base.cc
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/include/sys/dirent.h
winsup/cygwin/local_includes/fhandler.h
winsup/cygwin/release/3.6.0
winsup/cygwin/syscalls.cc