diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2015-10-17 18:11:37 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2015-10-17 22:16:25 -0400 |
commit | bdae4172ce49ee233037d3e6af7dbeea521d0562 (patch) | |
tree | a49fd12b698873b1486ed9e4036aca3145272d0f /perlio.c | |
parent | 6aba156ffbafbf27a3ba4f313d90ed712fc4e5d4 (diff) | |
download | perl-bdae4172ce49ee233037d3e6af7dbeea521d0562.tar.gz |
rt.perl.org #123977 - clear errno in IRIX PERLIO=stdio
Under some circumstances IRIX stdio fgetc() and fread() set the errno
to ENOENT, which makes no sense according to either IRIX or POSIX docs.
Just clear such an errno.
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3332,6 +3332,12 @@ PerlIOStdio_read(pTHX_ PerlIO *f, void *vbuf, Size_t count) return -1; SETERRNO(0,0); /* just in case */ } +#ifdef __sgi + /* Under some circumstances IRIX stdio fgetc() and fread() + * set the errno to ENOENT, which makes no sense according + * to either IRIX or POSIX. [rt.perl.org #123977] */ + if (errno == ENOENT) SETERRNO(0,0); +#endif return got; } |