diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-20 17:50:38 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-20 17:50:38 +0000 |
commit | 5a211162cd360449f2dbfb7ca9231c025909353f (patch) | |
tree | cb1e381023629ae2b3d383210f275f479afdb348 /pp_sys.c | |
parent | 649da0762311e9a19091946020dc56feadc1378c (diff) | |
download | perl-5a211162cd360449f2dbfb7ca9231c025909353f.tar.gz |
default mkdir() mode argument to 0777
p4raw-id: //depot/perl@5164
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -3376,12 +3376,19 @@ S_dooneliner(pTHX_ char *cmd, char *filename) PP(pp_mkdir) { djSP; dTARGET; - int mode = POPi; + int mode; #ifndef HAS_MKDIR int oldumask; #endif STRLEN n_a; - char *tmps = SvPV(TOPs, n_a); + char *tmps; + + if (MAXARG > 1) + mode = POPi; + else + mode = 0777; + + tmps = SvPV(TOPs, n_a); TAINT_PROPER("mkdir"); #ifdef HAS_MKDIR |