fchdir: fix logic bugs
authorEric Blake <ebb9@byu.net>
Tue, 8 Dec 2009 13:13:05 +0000 (06:13 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 8 Dec 2009 13:32:18 +0000 (06:32 -0700)
commit2966d0d21fdc455b705e1b477dfe7e1b37f5f8e9
tree09ad5a3feb230e3c409ebd7ed3f2722e58a418ab
parent21a0a9e3ef07b457b04d483f8dd216bbdf06e860
fchdir: fix logic bugs

Configuring with ac_cv_func_fchdir=no on a system that has fchdir
and where open handles directories, just to test out the replacement
capabilities, uncovered an m4 test bug and a link failure on rpl_fstat.

* m4/fchdir.m4 (gl_FUNC_FCHDIR): Fix logic bug.
* tests/test-fchdir.c (main): Enhance test.
* lib/fchdir.c (rpl_fstat): Always provide if fchdir replacement
is in use.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/fchdir.c
m4/fchdir.m4
tests/test-fchdir.c