rename: fix another cygwin 1.5 bug
Cygwin 1.5 sometimes, but not always, failed on rename("dir1","dir2")
when "dir2" exists. Beef up the m4 tests to more reliably
detect at least one of cygwin's bugs, in spite of not knowing
why the rename only failed sporadically (thankfully, cygwin 1.7
does not have the bug). Meanwhile, although NetBSD needs to
share the hard link workarounds, it does not need the trailing
dot and directory workarounds, so split the m4 test into two
separate feature checks.
* m4/rename.m4 (gl_FUNC_RENAME): Split cygwin bugs into two
checks.
* lib/rename.c (rpl_rename): Don't penalize NetBSD with
unnecessary cygwin workarounds. Also work around bug with moving
full directory onto an empty one.
* modules/rename (Depends-on): Add canonicalize-lgpl, rmdir.
Signed-off-by: Eric Blake <ebb9@byu.net>