This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
fix rewind
- From: Eric Blake <ebb9 at byu dot net>
- To: newlib at sources dot redhat dot com
- Date: Fri, 25 May 2007 14:27:48 +0000 (UTC)
- Subject: fix rewind
Ever since _rewind_r was introduced, rewind fails to clear the error marker on
a stream. OK to apply?
2007-05-25 Eric Blake <ebb9@byu.net>
* libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.
$ cvs diff libc/stdio/rewind.c
Index: libc/stdio/rewind.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/rewind.c,v
retrieving revision 1.3
diff -u -p -r1.3 rewind.c
--- libc/stdio/rewind.c 23 Apr 2004 20:01:55 -0000 1.3
+++ libc/stdio/rewind.c 25 May 2007 14:27:10 -0000
@@ -75,7 +75,7 @@ _VOID
_DEFUN(rewind, (fp),
register FILE * fp)
{
- _CAST_VOID _fseek_r (_REENT, fp, 0L, SEEK_SET);
+ _rewind_r (_REENT, fp);
}
#endif /* !_REENT_ONLY */