fchdir: avoid extra chdir and fix test
On Linux, with a forced ac_cv_func_fchdir=no, the test failed
because dup2 was not replaced, all because the shell variable
ac_cv_func_dup2 had not been set yet.
Meanwhile, computing the canonical pathname of a directory on
mingw was rather expensive -- multiple chdir()! -- but nothing
cared whether the name was canonical, just that it was absolute.
* modules/fchdir (Depends-on): Add dosname, filenamecat-lgpl,
getcwd-lgpl.
* lib/fchdir.c (get_name): Any absolute name will do; it does not
have to be canonical.
* m4/dup2.m4 (gl_REPLACE_DUP2): Ensure dup2 is replaced.
Signed-off-by: Eric Blake <eblake@redhat.com>