summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-11-21 21:01:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-21 21:01:45 +0000
commitfae6793e446a46318496910a9e0f1336f815c0bc (patch)
tree836bfe2d79f716f091f4c9746ee232db198c266b /doio.c
parent2a06dd0083251f74ae7366e8653ef3ad67cd49c6 (diff)
parent83b075c35b61a28ca7e2629bb5d6e26f9e0354fe (diff)
downloadperl-fae6793e446a46318496910a9e0f1336f815c0bc.tar.gz
Integrate perlio:
[ 7796] Win32 builds and runs (mostly) with USE_PERLIO. PERLIO=perlio passes all tests. PERLIO=stdio (sadly the default) hangs in t.pragma/warnings.t #319 [ 7790] If we use (aTHX_ ...) then put Perl_ on the front. (Or drop the aTHX_). [ 7788] Make extra buffer layer work (dummy crlf layer) p4raw-link: @7796 on //depot/perlio: 83b075c35b61a28ca7e2629bb5d6e26f9e0354fe p4raw-link: @7790 on //depot/perlio: efeab7a8047d7136a0235c1cc7329f57d6a8bfdd p4raw-link: @7788 on //depot/perlio: 88b61e10dfef3b0642d1458a9fff93e5000f86b0 p4raw-id: //depot/perl@7797
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/doio.c b/doio.c
index a4a55b085e..1fdedc2f07 100644
--- a/doio.c
+++ b/doio.c
@@ -433,16 +433,16 @@ Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
IoTYPE(io) = IoTYPE_RDONLY;
/*SUPPRESS 530*/
for (; isSPACE(*name); name++) ;
+ mode[0] = 'r';
+ if (in_raw)
+ strcat(mode, "b");
+ else if (in_crlf)
+ strcat(mode, "t");
if (strEQ(name,"-")) {
fp = PerlIO_stdin();
IoTYPE(io) = IoTYPE_STD;
}
else {
- mode[0] = 'r';
- if (in_raw)
- strcat(mode, "b");
- else if (in_crlf)
- strcat(mode, "t");
fp = PerlIO_open(name,mode);
}
}
@@ -453,8 +453,7 @@ Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
Perl_warner(aTHX_ WARN_NEWLINE, PL_warn_nl, "open");
goto say_false;
}
- if (IoTYPE(io) &&
- IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD) {
+ if (IoTYPE(io) && IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD) {
dTHR;
if (PerlLIO_fstat(PerlIO_fileno(fp),&PL_statbuf) < 0) {
(void)PerlIO_close(fp);