freebsd-nq/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 gethostid.2 is now gethostid.3. Instal the correct one. 1994-08-28 17:08:36 +00:00
db First crack at making libc work with the new make macros. It compiles on 1994-08-05 01:19:12 +00:00
gen Nuke sigsetjmp.c. sigsetjmp() can't be implemented as a C function 1994-10-25 14:04:32 +00:00
gmon Added support for kernel profiling to mcount.c 1994-09-15 16:00:41 +00:00
i386 Fix memchr(p, 0, 0) to return NULL instead of p. 1994-10-27 11:36:11 +00:00
locale Sync with ctype.h (remove EOF handling) 1994-10-09 11:20:55 +00:00
net >Description: 1994-10-27 16:33:49 +00:00
quad BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
regex First crack at making libc work with the new make macros. It compiles on 1994-08-05 01:19:12 +00:00
rpc Fix comparison of int against unsigned when checking error return 1994-08-31 12:38:18 +00:00
stdio Date: Wed, 26 Oct 1994 15:44:49 -0600 1994-11-05 18:49:34 +00:00
stdlib u_int -> unsigned int, so that we don't have to include <sys/types.h> 1994-09-05 13:26:40 +00:00
stdtime Use latest Arthur Olson timezone code rather than that supplied with 1994-09-13 21:26:08 +00:00
string Use latest Arthur Olson timezone code rather than that supplied with 1994-09-13 21:26:08 +00:00
sys Redo kernel NTP PLL support, user-mode interface. 1994-09-18 20:29:55 +00:00
xdr More directory cleanup after YP merge. 1994-08-07 22:21:14 +00:00
yp Add back in the YP code from 1.1.5. (This attribution brought to you 1994-08-07 23:04:55 +00:00
Makefile Use latest Arthur Olson timezone code rather than that supplied with 1994-09-13 21:26:08 +00:00