Date: Wed, 22 Aug 2001 09:20:18 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: sandmann AT clio DOT rice DOT edu Message-Id: <8011-Wed22Aug2001092018+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: <10108211727.AA15437@clio.rice.edu> (sandmann@clio.rice.edu) Subject: Re: Fseek on STDIN problem on Win 2K References: <10108211727 DOT AA15437 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 Precedence: bulk > From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > Date: Tue, 21 Aug 2001 12:27:59 -0500 (CDT) > > It seems a simple fix is to put a relative seek of 0 (which gets the > current position) right after the 2 byte read in _get_magic. After this > the seek sets seem to work (at least on NT 4) Does this mean we need to `lseek (fd, SEEK_SET, 0L)' inside _read, to avoid breaking following seeks? Do we need to do that only for handle 0, or for any handle? What about seeks after a write? do they have the same problems (with redirected stdout or elsewhere)?