summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-10-23 23:52:11 +0000
committerache <ache@FreeBSD.org>2001-10-23 23:52:11 +0000
commit24245013268a99a0d94d53046ac8844b363fa0f8 (patch)
tree92896c472bd51c5e39d0a10d02fb811ee14f9f98 /lib/libc/stdio
parentf055c49bc35b69e2d0bcda325666c07a84ba5dac (diff)
downloadFreeBSD-src-24245013268a99a0d94d53046ac8844b363fa0f8.zip
FreeBSD-src-24245013268a99a0d94d53046ac8844b363fa0f8.tar.gz
Back out read buffer invalidating via __SMOD.
It was correct, but not needed because internal buffer cleared on each seek outside of it.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fseek.c4
-rw-r--r--lib/libc/stdio/stdio.c5
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index b8366f3..2278f31 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -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;
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
index c0860eb..4bee608 100644
--- a/lib/libc/stdio/stdio.c
+++ b/lib/libc/stdio/stdio.c
@@ -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
OpenPOWER on IntegriCloud