This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix rewind


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 */





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]