2001-10-24 Christopher Faylor <cgf@redhat.com>
* libc/stdio/fseek.c: Reset pointer to buffer base when forced to seek outside of current buffer contents. This prevents the code from erroneously thinking there is anything in the current buffer.
This commit is contained in:
parent
a830378213
commit
d0504c353f
|
@ -1,3 +1,10 @@
|
||||||
|
2001-10-24 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* libc/stdio/fseek.c: Reset pointer to buffer base
|
||||||
|
when forced to seek outside of current buffer contents.
|
||||||
|
This prevents the code from erroneously thinking there is
|
||||||
|
anything in the current buffer.
|
||||||
|
|
||||||
2001-10-22 Geoffrey Keating <geoffk@redhat.com>
|
2001-10-22 Geoffrey Keating <geoffk@redhat.com>
|
||||||
|
|
||||||
* libc/include/math.h: The C++ standard adds the single-precision
|
* libc/include/math.h: The C++ standard adds the single-precision
|
||||||
|
|
|
@ -278,6 +278,7 @@ fseek (fp, offset, whence)
|
||||||
if ((*seekfn) (fp->_cookie, curoff, SEEK_SET) == POS_ERR)
|
if ((*seekfn) (fp->_cookie, curoff, SEEK_SET) == POS_ERR)
|
||||||
goto dumb;
|
goto dumb;
|
||||||
fp->_r = 0;
|
fp->_r = 0;
|
||||||
|
fp->_p = fp->_bf._base;
|
||||||
if (HASUB (fp))
|
if (HASUB (fp))
|
||||||
FREEUB (fp);
|
FREEUB (fp);
|
||||||
fp->_flags &= ~__SEOF;
|
fp->_flags &= ~__SEOF;
|
||||||
|
|
Loading…
Reference in New Issue