On Wed, Apr 26, 2017 at 21:59:35 +0100, Richard Ipsum wrote:
I couldn't find mention of thread safety in the FreeBSD man page
readdir, and Solaris's man page says it's unsafe.
We can just #ifdef if that's what you'd prefer, I don't know how important
maintaining thread safety on BSDs and Solaris is to you.
At least for now, maintaining the current capabilities are more important
to me than eliminating warnings about possible future deprecation on one
One thing that just occurred to me is since it is possible on some
that d_name may not be null-terminated when the length of the name exceeds
NAME_MAX, then the existing code might be broken anyway since lua_pushstring
expects a null terminated string and luxio doesn't check whether the string
is null terminated or not before passing it.
What do you think?
I think this null-termination thing is way more interesting to me as a bugfix/patch
than the warning cleanup. If Nix requires that everything compiles warning-free then
they're going to be in an interesting position every time the compiler or libc
I'd very much like to see a patch resolving what you see as the issue regarding
a name exceeding NAME_MAX. TBH I'd be quite satisfied with something which
caused an error return if the d_name array lacked a terminator, though if you
can come up with something which can recover things, that'd be awesome too.
I think this might be related to https://trello.com/c/BeeWV4Ej/50
In the meantime, I've filed https://trello.com/c/yGjQipfG/52
related to readdir_r()
Daniel Silverstone http://www.digital-scurf.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69