fdopendir: detect FreeBSD bug
authorEric Blake <eblake@redhat.com>
Sat, 5 Feb 2011 04:52:40 +0000 (21:52 -0700)
committerEric Blake <eblake@redhat.com>
Sat, 5 Feb 2011 04:59:36 +0000 (21:59 -0700)
commite7455b30d0245d14619edf5298b98d523e6f1465
treecbe26ddc5f14c00115df5af74191cc975e2e7de4
parentb17cb243b286b6d45fcdf518718f136bd4a36c6a
fdopendir: detect FreeBSD bug

FreeBSD fdopendir(fd) always consumes fd, even if it fails with
ENOTDIR.  The code that works around the GNU Hurd bug also fixes this;
we just need to detect it.

* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Detect bug.
* doc/posix-functions/fdopendir.texi (fdopendir): Document it.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/posix-functions/fdopendir.texi
m4/fdopendir.m4