Message-Id: Date: Tue, 23 Jun 98 15:58:34 MET DST From: Michel de Ruiter To: dj AT delorie DOT com cc: djgpp-workers AT delorie DOT com Subject: rewind-bug fixed Precedence: bulk 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.