diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2015-10-17 18:11:37 -0400 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2015-10-26 08:12:36 +0000 |
commit | e8e6832faf634ae8e2070943a88ebc61365ea548 (patch) | |
tree | 350e3cfb95a27ebf658ee1c90f0e635463bd6e23 | |
parent | 7a6095a56c9cd85ae9ff46603b117489e66f863b (diff) | |
download | perl-e8e6832faf634ae8e2070943a88ebc61365ea548.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.
(cherry picked from commit bdae4172ce49ee233037d3e6af7dbeea521d0562)
-rw-r--r-- | perlio.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3355,6 +3355,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; } |