Mail Archives: djgpp-workers/1998/06/23/09:59:13
Hello, workers,
The problem with rewind and files opened "r+" turned out to be
very simple. Applying the following patch seems to fix things:
--- src/libc/ansi/stdio/rewind.old Mon Dec 26 15:34:52 1994
+++ src/libc/ansi/stdio/rewind.c Sat Jun 20 14:40:16 1998
@@ -8,6 +8,7 @@ void rewind(FILE *f)
{
fflush(f);
lseek(fileno(f), 0L, SEEK_SET);
+ f->_fillsize = 512; /* See comment in filbuf.c */
f->_cnt = 0;
f->_ptr = f->_base;
f->_flag &= ~(_IOERR|_IOEOF);
Hope this helps.
--
Groeten, Michel. http://www.cs.vu.nl/~mdruiter
____________
\ /====\ / "You know, Beavis, you need things that suck,
\/ \/ to have things that are cool", Butt-Head.
- Raw text -