Mail Archives: djgpp-workers/2000/12/31/13:51:29
> From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> Date: Sun, 31 Dec 2000 15:46:04 +0100 (MET)
>
> According to Eli Zaretskii:
> > I thought Windows 98 was supposed to report 7.20, at least in some of
> > its releases, no? We have a couple of functions, like _rename and
> > mkdir, which depend on that: they call special functions of Int 21h
> > that support path names up to 128 characters.
>
> Perhaps that is the SECOND EDITION?
Richard says that the 2nd edition also says DOS 7.10. Strange...
> > Also, if you have access to Windows ME, could you see what goes wrong
> > with _rename on that OS? We had in the past a few reports about
> > linking which fails with EINVAL due to that.
>
> I've tried running "mv a b" with success. Doesn't mv use rename()?
It does. But the problems I was told about seemed to happen when the
target of the rename already existed. Did you try the above when `b'
already exists?
I'm attaching below a copy of a message sent to c.o.m.d. by a person
who tried to debug this, where you can find more details.
Thanks for working on this.
From: "ObiGuan Kenobi" <jgfw AT iname DOT com>
To: <djgpp AT delorie DOT com>
Subject: Re: DJGPP on Windows ME
Date: Mon, 21 Aug 2000 03:23:05 +0800
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com
Precedence: bulk
Content-Type: text/plain;
charset="Windows-1252"
Content-Length: 1780
> > From: "ObiGuan Kenobi" <jgfw AT iname DOT com>
> > Date: Sun, 20 Aug 2000 15:47:33 +0800
> >
> > I have downloaded djlsr203.zip and did as you instructed and tried to
> > compile it. The compiler complains that stub.h is missing. Where can I find
> > this file?
>
> Sorry, that's my bad: I forgot about that file.
>
> This file is generated by the library build procedure, but since you
> didn't invoke that procedure, it was not created. I attach the file
> below; simply cut it out and put it on stub.h in the same directory
> where you are working on this.
It seems that _rename( ) function from libc has some problems after using gdb. And one thing I forgotten to tell you.
Windows ME uses DOS 8.0, rather than DOS 7.1 that Win95b and Win98 uses. Not just stubify.exe is effected but ar.exe which
uses _rename () is effected too.
This is what I found out. I think the _rename( ) function has no problem renaming from filename X to Y if Y doesn't exist.
If Y exist, then _rename() will fail. Below is the output of the test I did. The words in the brackets are my own comments.
Hope it is useful.
(test.exe doesn't exist at this point)
D:\>stubify test.000
(a test.exe was created from test.000)
D:\>stubify test.000
rename of test.001 to test.exe failed.
The error was: Invalid argument (EINVAL)
(renaming failure and test.exe from test.000 was deleted)
D:\>stubify test.000
(renaming success)
D:\>stubify test.000
rename of test.002 to test.exe failed.
The error was: Invalid argument (EINVAL)
(renaming failure and previous test.exe was deleted)
D:\>stubify test.000
(renaming success)
D:\>stubify test.000
rename of test.003 to test.exe failed.
The error was: Invalid argument (EINVAL)
(renaming failure and previous test.exe was deleted)
(and it goes on and on)
- Raw text -