FilePosition checked fgetpos and fsetpos only on a freshly written
stream. It now reads three bytes and requires fgetpos to give 3, reads
to end of file and requires fsetpos back to 3 to clear the end-of-file
indicator (C11 7.21.9.3) so the next fgetc returns the fourth byte, and
requires fsetpos to -1 to fail with EINVAL as FreeBSD's fseeko does.
A rejected seek on Windows still moves the stream, because the UCRT
drops its read buffer before the failing lseek: recorded in libc's
technical debt instead of asserted.
Co-Authored-By: Claude Opus 5.5 <[email protected]>