Back out read buffer invalidating via __SMOD.

It was correct, but not needed because internal buffer cleared on each seek
outside of it.
This commit is contained in:
Andrey A. Chernov
2001-10-23 23:52:11 +00:00
parent fc16d270b7
commit 3f498bf72b
2 changed files with 2 additions and 7 deletions
+2 -2
View File
@@ -225,8 +225,8 @@ _fseeko(fp, offset, whence, ltest)
goto dumb;
/*
* If the buffer was modified or the file position was changed,
* we have to skip this; see fgetln.c, stdio.c.
* (If the buffer was modified, we have to
* skip this; see fgetln.c.)
*/
if (fp->_flags & __SMOD)
goto abspos;
-5
View File
@@ -164,11 +164,6 @@ _sseek(fp, offset, whence)
errret = errno;
if (errno == 0)
errno = serrno;
if (errret == 0 && (offset != 0 || whence != SEEK_CUR))
/* Disallow fseek() optimization inside read buffer */
fp->_flags |= __SMOD;
/*
* Disallow negative seeks per POSIX.
* It is needed here to help upper level caller