summaryrefslogtreecommitdiff
path: root/iperlsys.h
diff options
context:
space:
mode:
authorPaul Green <Paul.Green@stratus.com>2002-04-01 10:15:00 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-01 20:13:49 +0000
commit75e258e97985e881c3ecf10011cdd639fc68778c (patch)
tree0227da488231f3d61609cd00b31d6393d9e4cbfa /iperlsys.h
parent993efc3202899d2173273b9bc2bb586f5474abb4 (diff)
downloadperl-75e258e97985e881c3ecf10011cdd639fc68778c.tar.gz
VOS-specific patch to iperlsys.h to work around errno bu
Message-Id: <200204012048.PAA05178@mailhub2.stratus.com> p4raw-id: //depot/perl@15666
Diffstat (limited to 'iperlsys.h')
-rw-r--r--iperlsys.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/iperlsys.h b/iperlsys.h
index b2b21727e4..7ed5862822 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -275,9 +275,16 @@ struct IPerlStdIOInfo
#define PerlSIO_stdout stdout
#define PerlSIO_stderr stderr
#define PerlSIO_fopen(x,y) fopen(x,y)
+#ifdef __VOS__
+/* Work around VOS bug posix-979, wrongly setting errno when at end of file. */
+#define PerlSIO_fclose(f) (((errno==1025)?errno=0:0),fclose(f))
+#define PerlSIO_feof(f) (((errno==1025)?errno=0:0),feof(f))
+#define PerlSIO_ferror(f) (((errno==1025)?errno=0:0),ferror(f))
+#else
#define PerlSIO_fclose(f) fclose(f)
#define PerlSIO_feof(f) feof(f)
#define PerlSIO_ferror(f) ferror(f)
+#endif
#define PerlSIO_clearerr(f) clearerr(f)
#define PerlSIO_fgetc(f) fgetc(f)
#ifdef FILE_base