diff options
Diffstat (limited to 'vms/ext/Stdio')
-rw-r--r-- | vms/ext/Stdio/Stdio.pm | 6 | ||||
-rw-r--r-- | vms/ext/Stdio/Stdio.xs | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/vms/ext/Stdio/Stdio.pm b/vms/ext/Stdio/Stdio.pm index ad16af366f..516e678e2c 100644 --- a/vms/ext/Stdio/Stdio.pm +++ b/vms/ext/Stdio/Stdio.pm @@ -1,8 +1,8 @@ # VMS::Stdio - VMS extensions to Perl's stdio calls # # Author: Charles Bailey bailey@genetics.upenn.edu -# Version: 2.01 -# Revised: 10-Dec-1996 +# Version: 2.02 +# Revised: 15-Feb-1997 package VMS::Stdio; @@ -12,7 +12,7 @@ use Carp '&croak'; use DynaLoader (); use Exporter (); -$VERSION = '2.01'; +$VERSION = '2.02'; @ISA = qw( Exporter DynaLoader IO::File ); @EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ); diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs index 200268c7f1..b10fec0d48 100644 --- a/vms/ext/Stdio/Stdio.xs +++ b/vms/ext/Stdio/Stdio.xs @@ -1,8 +1,8 @@ /* VMS::Stdio - VMS extensions to stdio routines * - * Version: 2.0 + * Version: 2.02 * Author: Charles Bailey bailey@genetics.upenn.edu - * Revised: 28-Feb-1996 + * Revised: 15-Feb-1997 * */ @@ -127,7 +127,8 @@ flush(sv) CODE: FILE *fp = Nullfp; if (SvOK(sv)) fp = IoIFP(sv_2io(sv)); - ST(0) = fflush(fp) ? &sv_undef : &sv_yes; + if (fflush(fp)) { ST(0) = &sv_undef; } + else { clearerr(fp); ST(0) = &sv_yes; } char * getname(fp) @@ -157,7 +158,8 @@ sync(fp) FILE * fp PROTOTYPE: $ CODE: - ST(0) = fsync(fileno(fp)) ? &sv_undef : &sv_yes; + if (fsync(fileno(fp))) { ST(0) = &sv_undef; } + else { clearerr(fp); ST(0) = &sv_yes; } char * tmpnam() |