This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RENAME with different disk units


Actually, libf2c/libU77/rename_.c is a part of the gcc distribution, not
even part of the libf2c, so it is maintained by us.  Whether it should
work across drives, and to what extent this is target dependent, I don't
know.  I would investigate, but I'm not able to spend time on this the
next 2 weeks.  On first look, it depends on the C library rename()
function, so then it would be an issue for the maintainers of the run
time library including the instance of that function for the target in
question.

Tim Prince
----- Original Message -----
From: "Eli Zaretskii" <eliz@delorie.com>
To: <heviaop@ssdfe.com.ar>
Cc: <gcc-bugs@gcc.gnu.org>; <bug-gcc@gnu.org>
Sent: Thursday, July 20, 2000 8:24 AM
Subject: Re: RENAME with different disk units


> > From: "Orlando P. Hevia" <heviaop@ssdfe.com.ar>
> > Date: Thu, 20 Jul 2000 09:29:49 -0300
> >
> > C FOR DOS DJGPP, THE SAMPLE WORKS IF BOTH UNITS
> > C ARE THE SAME AS THE COMMENTED LINE
>
> This is not the right place to post such reports: your problem has
> nothing to do with the compiler.  The function `rename' is a library
> function, so please report any potential bugs to the
> comp.os.msdos.djgpp news group.
>
> > C I TRIED THE SAME SOURCE WITH LINUX: THE SAME RESULT
> > C OK IF THE SAME DISK, NOT WORKS IF DIFFERENT DISKS.
> > C
> > C WITH MINGW32 VERSION, THE ROUTINE WORKS OK WITH
> > C DIFFERENT DISK UNITS
> > C
> > C UNTIL NOW I AM USING THE MV (LINUX) AND MV.EXE
> > C (DOS-WIN32) TO MOVE THE FILES, VIA CALL SYSTEM
> > C
> > C
> > CHARACTER*60 FILE1,FILE2
> > FILE1='D:\\LLL'
> > C      FILE2='D:\\HEVIA.DBG'
> > FILE2='C:\\HEVIA.DBG'
> > CALL RENAME(FILE1,FILE2)
> > STOP
> > END
> >
> > I don't know if this is a bug, or if this problem can be
> > solved.
>
> This is not a bug, but a well-documented intentional behavior.
> The documentation of `rename' in the DJGPP library (from the
> command line, type "info libc alpha rename" and read there)
> says, among other things:
>
>    ... [the files] must reside on the same logical device (otherwise,
>    `errno' will be set to EXDEV)
>
> This is so because DJGPP's library emulates the Posix behavior where
> a file cannot be renamed between different filesystems.
>
> I don't know why this works with Mingw, but the library used in Mingw
> programs is different (in particular, it doesn't claim Posix
> compatibility).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]