cjkelly1 wrote: ↑Sat Feb 16, 2019 2:11 am
readdir_r() was removed in "changeset 44 - 0027fc4da658" because it is deprecated in glibc. Since there is no way to know when deprecated will turn into removed, I would not recommend adding it back in.
I need to look into this. I’m seeing the glibc mention about deprecation, but a POSIX-1.2008 reference still declares readdir() thread-unsafe even with serialized access to the DIR* stream. Perhaps I can find a preprocessor cue to detect older environments where it is unsafe.
_R
[edit: the recent update to the
POSIX specification does not mention the elimination of the readdir_r() API. It also still says that readdir()
need not be thread safe. I wonder if glibc will retain the entry point as a shim around the base implementation of readdir()]