freebsd_amp_hwpstate/lib/libc
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
..
amd64 Reenable sigsetjmp.S. Preserve the FP state. Rearrange offsets 1994-10-25 14:08:13 +00:00
compat-43
db
gen
gmon
i386 Fix memchr(p, 0, 0) to return NULL instead of p. 1994-10-27 11:36:11 +00:00
locale
net >Description: 1994-10-27 16:33:49 +00:00
quad
regex
rpc
stdio Date: Wed, 26 Oct 1994 15:44:49 -0600 1994-11-05 18:49:34 +00:00
stdlib
stdtime
string
sys
xdr
yp
Makefile