delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/24/19:50:36

X-Authentication-Warning: new-smtp2.ihug.com.au: Host p17-max12.syd.ihug.com.au [203.173.155.145] claimed to be acceleron
Message-ID: <001701c12cf6$91d92a70$0a02a8c0@acceleron>
From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
To: <eliz AT is DOT elta DOT co DOT il>, "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Cc: <djgpp-workers AT delorie DOT com>
References: <10108231331 DOT AA18728 AT clio DOT rice DOT edu>
Subject: Re: Fseek on STDIN problem on Win 2K
Date: Sat, 25 Aug 2001 09:43:24 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Reply-To: djgpp-workers AT delorie DOT com

> > > does the 2.03 library not call the is_executable?
> >
> > Yes, it does.
>
> My brain hurts.  Why oh why does it work with 2.03?

I just re-installed my original DJGPP 203 setup on my Win 98 box that I
previously downloaded from SIMTEL (except I have used the latest RHIDE) and
re-compiled the sample app and guess what I did NOT work. I got the same
result as with CVS 204 code. Enabling the test workaround works, ie adding
the 4200 no op call still fixes the issues with 203. The results were:

DJGPP_204 D:\dj204\work\seek\203>seek <test
seek.c 31
seek.c 44 4200, pos = 0x0000:0000
seek.c 49 4200, fh = 0, read pos = 0x0000:0000
seek.c 61 4200, goto zero pos = 0x0000:0000
seek.c 105 0x3F00 call result flags regs.x.ax = 0x0002
seek.c 123 4200, fh = 0, fpos_high= 0, fpos_low = 0
seek.c 136 4200 results, flags = 2, fh = 0, fpos_high= 0, fpos_low = 0
seek.c 156
magic_number = 0x3231
Char at offset [0] = (3)
Char at offset [0] = (4)
Char at offset [1] = (5)
Char at offset [2] = (6)
Char at offset [3] = (7)
Char at offset [4] = (8)
Char at offset [5] = (9)
seeker = 5


Just to make sure I didn't make a mistake this is the first few lines for
the seek.exe file that I built with 203.  As you can see it looks like a 203
app.

MZ  ?     '     `.  T
stub.h generated from stub.asm by djasm, on Thu Dec  9 10:59:31 1999
The STUB.EXE stub loader is Copyright (C) 1993-1995 DJ Delorie.
Permission granted to use for any purpose provided this copyright
remains present and unmodified.
This only applies to the stub, and not necessarily the whole program.

$Id: stub.asm built 12/09/99 10:59:31 by djasm $

@(#) stub.asm built 12/09/99 10:59:31 by djasm


>
> > > fstat() doesn't cause this problem in 2.03 which might explain why
> > > it's more rare).
> >
> > So perhaps we should find out which change since v2.03 triggers this.
>
> Yes.
From my test above 203 also exhibits the problem. Probably the reason 203
does not show up the problem in is_executable() is that thre are other calls
somewhere else in the code that "fix" the problem, in a similar way to when
the extra call to 4200 is inserted into the sample code.

I wonder if the 3700 call is broken in Windows 2K. I am going to have a look
at this and get back with my results in a few hours.
I may be going off on a tangent, but it will only take a few hours to check
and satisfy my hunch.



- Raw text -


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