Mail Archives: djgpp/1997/03/25/07:21:33
The problem is easily reproduced by the following
program.
#include <stdio.h>
main (int argc, char **argv){
printf("renaming %s to %s\n",argv[1],argv[2]);
printf("return code: %d\n",rename(argv[1],argv[2]));
}
On the networked drive (in this case a DEC-ultrix file system mounted by
DEC pathworks) rename fails if the target file already exists.
In all other cases I tried (also a DEC-VMS file system mounted by DEC pathworks)
rename is able to remove the target file.
Judging from the rcs source similar problems occur under some unix and NFS
implementations. The conf.h for rcs5712b.zip had the following line
#define bad_b_rename 0
Just setting this #define to 1 and recompiling forces an unlink of the target file
prior to the
rename, solving the problem in rcs.
I suspect the problem is somewhere in pathworks, but have not tried to debug libc sofar.
Teun Burgers
Drs A. R. Burgers Netherlands Energy Research Foundation ECN
Phone: +31-224-564703 BU Renewable Energy, Solar Energy
Fax : +31-224-563214 P.O. Box 1
email: burgers AT ecn DOT nl 1755 ZG Petten, The Netherlands
- Raw text -