summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 09:06:18 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 09:06:18 +0000
commit491527d0220de34ec13035d557e288c9952d1007 (patch)
tree683ef586eb7bbf72dee104e2b0fd44cc8298b444 /pp_sys.c
parenta3cb178b0bad32fa8be934503d051b96a3cb1fea (diff)
downloadperl-491527d0220de34ec13035d557e288c9952d1007.tar.gz
[win32] merge change#886 from maintbranch
p4raw-link: @886 on //depot/maint-5.004/perl: 6dba07070c2cb08ffbc6e00eff60e8f5fc9a7ee8 p4raw-id: //depot/win32/perl@936
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c39
1 files changed, 8 insertions, 31 deletions
diff --git a/pp_sys.c b/pp_sys.c
index ce32fc5767..d841d04247 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -485,40 +485,10 @@ PP(pp_binmode)
if (!(io = GvIO(gv)) || !(fp = IoIFP(io)))
RETPUSHUNDEF;
-#ifdef DOSISH
-#ifdef atarist
- if (!PerlIO_flush(fp) && (fp->_flag |= _IOBIN))
+ if (do_binmode(fp,IoTYPE(io),TRUE))
RETPUSHYES;
else
RETPUSHUNDEF;
-#else
- if (PerlLIO_setmode(PerlIO_fileno(fp), OP_BINARY) != -1) {
-#if defined(WIN32) && defined(__BORLANDC__)
- /* The translation mode of the stream is maintained independent
- * of the translation mode of the fd in the Borland RTL (heavy
- * digging through their runtime sources reveal). User has to
- * set the mode explicitly for the stream (though they don't
- * document this anywhere). GSAR 97-5-24
- */
- PerlIO_seek(fp,0L,0);
- fp->flags |= _F_BIN;
-#endif
- RETPUSHYES;
- }
- else
- RETPUSHUNDEF;
-#endif
-#else
-#if defined(USEMYBINMODE)
- if (my_binmode(fp,IoTYPE(io)) != NULL)
- RETPUSHYES;
- else
- RETPUSHUNDEF;
-#else
- RETPUSHYES;
-#endif
-#endif
-
}
@@ -2603,6 +2573,13 @@ PP(pp_chdir)
if (svp)
tmps = SvPV(*svp, na);
}
+#ifdef VMS
+ if (!tmps || !*tmps) {
+ svp = hv_fetch(GvHVn(envgv), "SYS$LOGIN", 9, FALSE);
+ if (svp)
+ tmps = SvPV(*svp, na);
+ }
+#endif
TAINT_PROPER("chdir");
PUSHi( PerlDir_chdir(tmps) >= 0 );
#ifdef VMS