This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: fix rewind
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Eric Blake <ebb9 at byu dot net>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 25 May 2007 11:43:11 -0400
- Subject: Re: fix rewind
- References: <loom.20070525T162559-519@post.gmane.org>
Yes, of course.
-- Jeff J.
Eric Blake wrote:
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 */