Hash :
33790590
Author :
Date :
2009-10-01T11:57:47
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>
Description:
rename() function: change the name or location of a file.
Files:
lib/rename.c
m4/rename.m4
Depends-on:
canonicalize-lgpl
dirname
lstat
rmdir
same-inode
stdbool
stdio
strdup
configure.ac:
gl_FUNC_RENAME
gl_STDIO_MODULE_INDICATOR([rename])
Makefile.am:
Include:
<stdio.h>
License:
GPL
Maintainer:
Jim Meyering