summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-03-23 10:20:46 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-03-23 10:20:46 +0000
commit5e334b7bcf49bf053aa25da896a1ff98c12dd228 (patch)
tree0cc1599952b1951c6462fe876868560778b13504 /perlio.c
parent6e60e805618a52942747f76233ecc85135a964e3 (diff)
downloadperl-5e334b7bcf49bf053aa25da896a1ff98c12dd228.tar.gz
Render -Duseperlio functional again.
- this is "quick fix" which calls PerlIO_apply_layers after opening, which is what old scheme did. New scheme needs to change that to make open(...,\$scalar) etc. work but this will do for now. p4raw-id: //depot/perlio@9304
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index d192892a0f..9c7e3cd319 100644
--- a/perlio.c
+++ b/perlio.c
@@ -808,7 +808,15 @@ PerlIO_openn(pTHX_ const char *layers, const char *mode, int fd, int imode, int
PerlIO_funcs *tab = (f && *f) ? PerlIOBase(f)->tab : PerlIO_top_layer(aTHX_ layers);
if (!_perlio)
PerlIO_stdstreams();
- return (*tab->Open)(aTHX_ tab,mode,fd,imode,perm,f,narg,args);
+ PerlIO_debug("openn(%s,'%s','%s',%d,%x,%o,%p,%d,%p)\n",
+ tab->name,layers,mode,fd,imode,perm,f,narg,args);
+ f = (*tab->Open)(aTHX_ tab,mode,fd,imode,perm,f,narg,args);
+ if (f)
+ {
+ if (layers && *layers)
+ PerlIO_apply_layers(aTHX_ f,mode,layers);
+ }
+ return f;
}