delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/20/12:05:30

Date: Mon, 20 Aug 2001 19:02:27 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: sandmann AT clio DOT rice DOT edu
Message-Id: <9003-Mon20Aug2001190227+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: acottrel AT ihug DOT com DOT au, djgpp-workers AT delorie DOT com
In-reply-to: <10108201426.AA12428@clio.rice.edu> (sandmann@clio.rice.edu)
Subject: Re: Fseek on STDIN problem on Win 2K
References: <10108201426 DOT AA12428 AT clio DOT rice DOT edu>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> Date: Mon, 20 Aug 2001 09:26:07 -0500 (CDT)
> 
> > I can comment out all if the if (_USE_LFN) code in fstat that calls 71A6 and
> > it does not make a difference to the output..
> 
> Interesting.  That would indicate a problem with the get times (?) since
> that is the only other LFN usage?

I understood that that other LFN usage was also commented out.

> > In my testing I found that I can "fix" the problem by one of the following
> > methods:
> >     a) Commenting out the _is_executable() call in fstat.c
> >     b) Setting the  _STAT_EXEC_MAGIC bit in _djstat_flags
> 
> Avoids reading the magic number.
> 
> >     b) adding a _read() to the  _is_executable() function before or after
> > the second 4200 call.
> 
> Interesting.  Must do read before seek works?

I'm not sure: if you comment out _is_executable, you don't read the
file, but you still lseek (because fstat does that elsewhere in its
code, when it calls __filelength).  So the read-before-lseek
hypothesis should explain why seeking in __filelength works, while
seeking in _is_executable doesn't.

- Raw text -


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