delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/22/15:37:45

Message-ID: <000701c0848f$fc5b8560$cbed79c3@internet>
From: "Robert van der Boon" <rjvdboon AT europe DOT com>
To: <djgpp-workers AT delorie DOT com>
Subject: Re: patch.exe (fwd)
Date: Mon, 22 Jan 2001 17:25:04 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Reply-To: djgpp-workers AT delorie DOT com

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 -


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