Mail Archives: djgpp-workers/1998/06/17/10:41:14
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 -