nonblocking: fix mingw test failures
authorEric Blake <eblake@redhat.com>
Thu, 31 Mar 2011 21:28:37 +0000 (15:28 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 31 Mar 2011 21:28:37 +0000 (15:28 -0600)
commitdec3475763be252103922a887920012eeb32dc26
treebc49e17cf6df9fc929203bcbc7d0f23791442a4d
parentf31ee76bd843ff9c940b51e14b9e49cfe774aed5
nonblocking: fix mingw test failures

Actually testing on mingw uncovered a few more problems.

* lib/nonblocking.c (set_nonblocking_flag): Succeed when clearing
non-blocking flag on regular file.
(get_nonblocking_flag): Set errno on invalid fd.
* tests/test-nonblocking.c (main): Avoid test failure on
directories if fchdir is not active.
* modules/nonblocking-tests (Depends-on): Drop unused dependency.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/nonblocking.c
modules/nonblocking-tests
tests/test-nonblocking.c