|
|
DOS, OpenWatcom
For reference, you can also see the posix man page
https://pubs.opengroup.org/onlinepubs/009695399/functions/readdir_r.html
On Tue, Jun 15, 2021 at 7:19 AM Albrecht Schlosser ***@***.***>
wrote:
> Further investigation reveals a conflict which I don't know how to solve.
> It's maybe only a theoretical problem but anyway, here it is: The POSIX
> man page of readdir(3p)
> <https://man7.org/linux/man-pages/man3/readdir.3p.html> states under
> "ERRORS":
>
> ENOENT The current position of the directory stream is invalid.
>
> This would be considered an *error* and scandir should return -1.
> However, your suggestion would turn this error into an *End of Directory*
> condition and return as many files as have been read up to the error.
>
> So, what would be the correct behavior?
>
> We can *assume* that our implementation is only used if the "POSIX
> scandir()" *calling interface* is not available, but this doesn't
> automatically mean that readdir() does not conform to POSIX.
>
> Solving the issue as you @markjolesen <https://github.com/markjolesen>
> propose might break on other systems in unforeseen ways. :-(
>
> Any comments or suggestions?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/fltk/fltk/issues/238#issuecomment-861491481>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AA6DEU42D6JEE4HUW5KJT2LTS5HP5ANCNFSM46WEVEKA>
> .
>
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |