I disagree to your disagreement. In the man page you linked ENOENT is definitely mentioned under ERRORS:
ERRORS
The readdir() function shall fail if:
...
The readdir() function may fail if:
...
[ENOENT]
The current position of the directory stream is invalid.
I understand that this means an unexpected invalid position rather than a normal end of file (directory) indication. The man page also states:
RETURN VALUE
Upon successful completion, readdir() shall return a pointer to an object of
type struct dirent. When an error is encountered, a null pointer shall be returned
and errno shall be set to indicate the error. When the end of the directory
is encountered, a null pointer shall be returned and errno is not changed.
According to your description you receive ENOENT at the end of the directory which is clearly wrong, i.e. this is a bug in your libc (readdir ) implementation.
As I wrote before, if we changed this in our (FLTK) code we'd miss an error condition in a correct implementation of readdir(). I'm hesitating to do that.
BTW, you wrote:
DOS, OpenWatcom
DOS is not a supported FLTK platform. Which kind of DOS is this (FreeDOS)?
I'm also wondering what your graphics system is. The file in question is only compiled if USE_X11 is set. Are you using an X server as your display?
— 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 ] |