freebsd-nq/lib
Nate Williams 692a99c012 Date: Wed, 26 Oct 1994 15:44:49 -0600
From: Chris Torek <torek@bsdi.com>
Here is a semi-official patch (apply to /usr/src/lib/libc/stdio/fseek.c,
rebuild libc, install).  The current code fails when the seek:

  - is optimized, and
  - is to just past the end of the block currently in the buffer, and
  - is followed by another seek with no intervening read operation, and
  - the destination of subsequent seek is within the block left in the
    buffer (seeking to the beginning of a block does not force a read,
    so the buffer still contains the previous block)

so it is indeed rather obscure.

I may have a different `final' fix, as this one `loses' the buffer
contents on a seek that goes just past the end of the current block.

[Footnote: seeks are optimized only on read-only opens of regular
files that are buffered by the file's optimal I/O size.  This is
what you get with fopen(path, "r") and no call to setvbuf().]

Obtained from: [ BSDI mailing list ]
1994-11-05 18:49:34 +00:00
..
csu/i386 Call reduced (8-bit only) startup_setlocale() 1994-09-24 16:01:30 +00:00
libc Date: Wed, 26 Oct 1994 15:44:49 -0600 1994-11-05 18:49:34 +00:00
libcompat Add sanity check for "no previous regular expression" state, 1994-09-14 22:25:15 +00:00
libcrypt Fix afterinstall rule for generating links to the real libcrypt 1994-08-20 18:13:59 +00:00
libcurses Add const to termcap prototypes to help libg++ 2.6.1 compiling, 1994-11-04 15:14:03 +00:00
libedit Add LDADD+= -ltermcap 1994-10-12 02:06:02 +00:00
libf2c Use -DNON_UNIX_STDIO as our FILE doesn't have the usual fields. 1994-10-26 18:53:13 +00:00
libF77 Library for f2c (part 2 of 2) 1994-10-26 18:17:41 +00:00
libI77 Library for f2c. (part 1 of 2) 1994-10-26 18:15:35 +00:00
libkvm Fix from Gary Jennejohn - use 'cp' not 'buf' in read call. Oops. 1994-11-02 16:38:51 +00:00
libm Declare huge and tiny as volatile so that gcc doesn't evaluate huge*huge 1994-09-08 11:19:43 +00:00
libmd Clean up beforeinstall 1994-11-01 09:14:39 +00:00
libmytinfo More verbose diagnostic, if fails 1994-10-31 03:03:18 +00:00
libncurses __386BSD__ -> __FreeBSD__ 1994-11-04 02:14:13 +00:00
libpam/modules Add skey supprot 1994-08-21 19:26:22 +00:00
libresolv BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
librpc Make up for the fact that rpc headers are now installed from include. 1994-08-05 01:59:40 +00:00
librpcsvc Use ${ECHO} instead of echo' so that make -s' is fairly quiet. 1994-08-28 17:48:43 +00:00
libskey Remove extra newline. 1994-10-27 18:15:42 +00:00
libtelnet The big crypt removal - make libtelnet exportable. 1994-08-12 22:41:29 +00:00
libterm Correct the man page extent. 1994-08-08 19:26:23 +00:00
libtermcap Oops, back out ospeed fix, I forget that flushing can occurse _after_ 1994-10-06 21:02:21 +00:00
libutil Added $Id$ 1994-09-24 02:59:15 +00:00
liby BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
msun Install math.h. 1994-09-08 10:40:23 +00:00
ncurses/ncurses Add -I${.CURDIR} 1994-10-28 06:58:04 +00:00
rpcsvc Makefile to build librpcsvc. (All sources automatically generated.) 1994-08-07 23:21:08 +00:00
Makefile Added libf2c, the library for f2c. 1994-10-27 11:07:34 +00:00
Makefile.inc From 1.1.5: define default shared library versions. For 2.0, use version 1994-08-04 22:44:00 +00:00