diff options
author | Hans Mulder <hansmu@xs4all.nl> | 1998-07-21 05:42:20 -0700 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-22 07:55:35 +0000 |
commit | 4119ab016d0560936307b2cf3ff5fda644a62a9a (patch) | |
tree | 5c6d3593f4c303ab521f39a9e751f9b3ee9d54ee /doio.c | |
parent | 8c3ad6a18eed4decec506dcaa734e6a7dbcf5553 (diff) | |
download | perl-4119ab016d0560936307b2cf3ff5fda644a62a9a.tar.gz |
Fix inplace editing for VMS
Message-Id: <3.0.5.32.19980721124220.00a82a20@ous.edu>
p4raw-id: //depot/perl@1634
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -493,8 +493,13 @@ nextargv(register GV *gv) sv_setpvn(sv,">",!PL_inplace); sv_catpvn(sv,PL_oldname,oldlen); SETERRNO(0,0); /* in case sprintf set errno */ +#ifdef VMS + if (!do_open(PL_argvoutgv,SvPVX(sv),SvCUR(sv),PL_inplace!=0, + O_WRONLY|O_CREAT|O_TRUNC,0,Nullfp)) { +#else if (!do_open(PL_argvoutgv,SvPVX(sv),SvCUR(sv),PL_inplace!=0, O_WRONLY|O_CREAT|OPEN_EXCL,0666,Nullfp)) { +#endif warn("Can't do inplace edit on %s: %s", PL_oldname, Strerror(errno) ); do_close(gv,FALSE); |