www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/25/07:21:33

Date: Tue, 25 Mar 1997 13:03:47 +0100
From: Teun Burgers <burgers AT ecn DOT nl>
Subject: Re: ANNOUNCE: RCS version 5.7, patch 13
To: djgpp AT delorie DOT com
Message-id: <9703251203.AA16673@joost.ecn.nl>
MIME-version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019