[klibc] stdio: don't cache the file pointer

Caching the file pointer is incorrect for append streams, and if we
have to make system calls for append streams we might as well not
bother maintaining the file pointer at all... the biggest win came
from the fact the ftell() could be inlined.

A fully optimized libc can maintain the cached pointer for non-append
streams, but for klibc, don't bother maintaining the file pointer at
all, and just let the kernel worry about that.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
7 files changed