From: Paul Green Date: Mon, 1 Apr 2002 15:15:00 +0000 (-0500) Subject: VOS-specific patch to iperlsys.h to work around errno bu X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=75e258e97985e881c3ecf10011cdd639fc68778c;p=p5sagit%2Fp5-mst-13.2.git VOS-specific patch to iperlsys.h to work around errno bu Message-Id: <200204012048.PAA05178@mailhub2.stratus.com> p4raw-id: //depot/perl@15666 --- diff --git a/iperlsys.h b/iperlsys.h index b2b2172..7ed5862 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