Restore errno after VMS hack in S_sv_gets_read_record.
In
596a6cbd6bcaa8e6a4 I added a somewhat desperate hack to detect
if a file is record-oriented so that we preserve record semantics
when PL_rs has beeen set. I did it by calling fstat(), which is
already a pretty icky thing to be doing on every record read, but
it turns out things are even worse becaseu fstat() sets errno in
some conditions where it's successful, specifically when the file
is a Process-Permanent File (PPF), i.e., standard input or output.
So save errno before the fstat and restore it before doing the
read so if the read fails we get a proper errno. This gets
t/io/errno.t passing.
Side note: instead of fstat() here, we probably need to store a
pointer to the FAB (File Access Block) in the PerlIO struct so all
the metadata about the file is always accessible. This would
require setting up completion routines in PerlIOUnix_open and
PerlIOStdio_open.