delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/06/17/10:41:14

Date: Wed, 17 Jun 1998 17:40:29 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michel de Ruiter <mdruiter AT cs DOT vu DOT nl>
cc: dj AT delorie DOT com, djgpp-workers AT delorie DOT com
Subject: Re: rewind and 2.02 alpha
In-Reply-To: <m0ymH42-000C5CC@sloep111.cs.vu.nl>
Message-ID: <Pine.SUN.3.91.980617173450.20468L-100000@is>
MIME-Version: 1.0

On Wed, 17 Jun 1998, Michel de Ruiter wrote:

> When a file is opened "wt+" (or "wb+"), it is written to, rewinded
> (whether with rewind() or fseek()) and read from, the latter doesn't
> work.

Are you sure fseek doesn't work as well?  They are quite different in 
v2.02.

(This difference between rewind and fseek might be also a bug, btw.  DJ, 
is this intentional, and if so, why?)

> It returns p = 0x0, where 2.01 would give "abcdefghi". An interesting
> point: it doesn't seem to work on Solaris 5.5.1 either (also returns
> NULL), and Linux.

Step with a debugger into the library functions involved and see what 
happens there.  I think this is a bug.

v2.02 had changed the buffering to some degree, to make it more efficient
both for programs which read sequentially and those which intersperse
reads with seeks, so something might be broken as a result.  I heard
reports about some really weird behavior of setvbuf, which might also be
connected. 

- Raw text -


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