Mercurial > hg > octave-jordi > gnulib-hg
diff doc/posix-functions/fdopendir.texi @ 12127:bda9467a9d66
fdopendir: fix GNU/Hurd bug
fdopendir(open("file",O_RDONLY)) mistakenly succeeded, with
subsequent readdir() failing with ENOTDIR.
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Check for Hurd bug in
allowing non-directory fds.
* lib/fdopendir.c (rpl_fdopendir): Work around it.
* m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness.
* modules/dirent (Makefile.am): Substitute it.
* lib/dirent.in.h (fdopendir): Declare replacement.
* doc/posix-functions/fdopendir.texi (fdopendir): Document this.
* tests/test-fdopendir.c (main): Test something other than
/dev/null, since on Hurd that behaves like a directory.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Tue, 06 Oct 2009 06:58:08 -0600 (2009-10-06) |
parents | 80567a8f98f8 |
children | c47c56095752 |
line wrap: on
line diff
--- a/doc/posix-functions/fdopendir.texi +++ b/doc/posix-functions/fdopendir.texi @@ -16,6 +16,10 @@ is not multithread-safe. Also, the replacement does not guarantee that @samp{dirfd(fdopendir(n))==n} (dirfd might fail, or return a different file descriptor than n). +@item +This function does not reject non-directory file descriptors on some +platforms: +GNU/Hurd. @end itemize Portability problems not fixed by Gnulib: