freebsd-skq/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
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
libresolv
librpc
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
libterm
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
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 Added libf2c, the library for f2c. 1994-10-27 11:07:34 +00:00
Makefile.inc