summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-06-16 20:39:34 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-07-27 06:30:09 +0000
commit6170680bfd1817febf6b13f65734e3e2e6e3f9bf (patch)
tree87a68c7db652aef9bf5d18ececb42a5ef889680e /pp_sys.c
parent31e5645579ece4c41b72ec55a303b796b7409118 (diff)
downloadperl-6170680bfd1817febf6b13f65734e3e2e6e3f9bf.tar.gz
applied suggested patch; added missing prototype changes to
opcode.pl along with documentation typos (feature still needs to be described in perlopentut.pod and summarized in perldelta.pod) Message-Id: <199906170439.AAA18154@monk.mps.ohio-state.edu> Subject: [PATCH 5.00557] 3-arg open p4raw-id: //depot/perl@3786
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index cbd5764a31..a849dbb82e 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -501,10 +501,16 @@ PP(pp_open)
djSP; dTARGET;
GV *gv;
SV *sv;
+ SV *name;
+ I32 have_name = 0;
char *tmps;
STRLEN len;
MAGIC *mg;
+ if (MAXARG > 2) {
+ name = POPs;
+ have_name = 1;
+ }
if (MAXARG > 1)
sv = POPs;
if (!isGV(TOPs))
@@ -537,6 +543,8 @@ PP(pp_open)
PUSHMARK(SP);
XPUSHs(SvTIED_obj((SV*)gv, mg));
XPUSHs(sv);
+ if (have_name)
+ XPUSHs(name);
PUTBACK;
ENTER;
call_method("OPEN", G_SCALAR);
@@ -546,7 +554,7 @@ PP(pp_open)
}
tmps = SvPV(sv, len);
- if (do_open(gv, tmps, len, FALSE, O_RDONLY, 0, Nullfp))
+ if (do_open9(gv, tmps, len, FALSE, O_RDONLY, 0, Nullfp, name, have_name))
PUSHi( (I32)PL_forkprocess );
else if (PL_forkprocess == 0) /* we are a new child */
PUSHi(0);