Mail Archives: djgpp-workers/2001/01/22/15:37:45
Robert (==I) wrote:
> Eli wrote:
> > So, what happens if you simply try to rename e:/djgpp/tmp/foo to
> > e:/temp/bar with a simple call to _rename on that machine, and
> > e:/temp/bar already exists? Does it fail with the same error code
> > 183? And what happens if e:/temp/bar does not exist?
> Testing shows that _rename gives an error when the targetfile already
> exists.
_doserrno == 0xB7 (network segment error...)
So treating 0xB7 && fileexist the same as 0x2 && fileexist gives the
following
patch to _rename.c, and then it works:
--- Begin of Patch ---
*** src/libc/ansi/stdio/_rename.c~ Thu Jun 3 13:27:34 1999
--- src/libc/ansi/stdio/_rename.c Sun Jan 21 21:29:04 2001
***************
*** 108,114 ****
if(r.x.flags & 1)
{
if (i == 0
! && (r.x.ax == 5 || (r.x.ax == 2 && __file_exists(old))))
remove(new); /* and try again */
else
{
--- 108,114 ----
if(r.x.flags & 1)
{
if (i == 0
! && (r.x.ax == 5 || ((r.x.ax == 2 || r.x.ax==0xB7) &&
__file_exists(old))))
remove(new); /* and try again */
else
{
--- End of Patch ---
Another thing I noticed was that the following text (or better: all texts
without \n):
"Reversed (or previously applied) patch detected! Assume -R? [n]"
don't show up _before_ you press a valid key, but only _after_ you
press y/n/space. It seems like fflush isn't working either (but it does work
if I'm in GDB. "W2K is a pain in the lower posterior" (tm)
Greetings,
Robert
- Raw text -