Skip to content

Commit

Permalink
Fix inplace editing for VMS
Browse files Browse the repository at this point in the history
	Message-Id: <3.0.5.32.19980721124220.00a82a20@ous.edu>

p4raw-id: //depot/perl@1634
  • Loading branch information
Hans Mulder authored and Gurusamy Sarathy committed Jul 22, 1998
1 parent 8c3ad6a commit 4119ab0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doio.c
Expand Up @@ -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);
Expand Down

0 comments on commit 4119ab0

Please sign in to comment.