Date: Wed, 17 Jun 1998 17:40:29 +0300 (IDT) From: Eli Zaretskii To: Michel de Ruiter cc: dj AT delorie DOT com, djgpp-workers AT delorie DOT com Subject: Re: rewind and 2.02 alpha In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.