Mail Archives: djgpp/2000/08/21/01:27:09
> > 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 -