Wietse Venema:
> It was certainly new to me that readdir() requires the caller to
> reset errno before the readdir() call, if they need to distinguish
> between "no more information" and "error".

I took some time to dig through old manpages at www.freebsd.org.
Generally, the description of readdir() results is vague. However,
The SunOS 4.1.3 manpage explicitly mentions that readdir() does not
change errno when it reaches the end of the directory.  And while
SunOS 5.5.1 contains the usual vague text, SunOS 5.6 and later have
the explicit text.

So I missed that. My apologies.

        Wietse

Reply via email to