rename: fix another cygwin 1.5 bug
authorEric Blake <ebb9@byu.net>
Thu, 1 Oct 2009 17:57:47 +0000 (11:57 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 2 Oct 2009 12:26:37 +0000 (06:26 -0600)
commit33790590664b279853404bd753849b71a382ea0a
tree40c9c5d1c374f5d1e955b9465a377258be79791f
parent130023629006f4f08a04efa4a1564208ad8ed340
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>
ChangeLog
lib/rename.c
m4/rename.m4
modules/rename