In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/097f20eca6789e9416aedff17ae062386d3c2d98?hp=4ad0d3b9f11b33230f285a6e28f55f54490d90d8>
- Log ----------------------------------------------------------------- commit 097f20eca6789e9416aedff17ae062386d3c2d98 Author: Craig A. Berry <craigbe...@mac.com> Date: Sun Sep 4 21:13:28 2016 -0500 Make the "where install" directories Unix-format on VMS. These paths will get converted to Unix format for loading into @INC anyway, but since 483efd0abe3 they really need to start out that way. Otherwise, when running under a Unix shell, the path delimiter will be ':' and the absolute VMS specs will get split in half in S_incpush_use_sep(), which kicks in before the conversion to Unix format. M configure.com commit 83269cedf6d56458a3fbea611ea3c56c444bde50 Author: Craig A. Berry <craigbe...@mac.com> Date: Sun Sep 4 21:10:06 2016 -0500 Tainted dirs on VMS when not under DCL. Since 483efd0abe3 the path delimiter is a ':' instead of '|' on VMS when running under a Unix shell. So use that as a guide to whether we should use a colon or a slash to detect relative directories that should be tainted. M mg.c ----------------------------------------------------------------------- Summary of changes: configure.com | 63 +++++++++++++++++++++++++++++------------------------------ mg.c | 11 +++++++---- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/configure.com b/configure.com index 1d11fe1..a886f6f 100644 --- a/configure.com +++ b/configure.com @@ -2498,7 +2498,7 @@ $ EOD $ ENDIF $ IF F$TYPE(privlib) .NES. "" $ THEN dflt = privlib -$ ELSE dflt = "''vms_prefix':[lib]" +$ ELSE dflt = "/''vms_prefix'/lib" $ ENDIF $ rp = "Pathname where the private library files will reside? " $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") @@ -2567,7 +2567,7 @@ $ EOD $ ENDIF $ IF F$TYPE(archlib) .NES. "" $ THEN dflt = archlib -$ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]" +$ ELSE dflt = privlib + "/" + archname + "/" + version $ ENDIF $ rp = "Where do you want to put the public architecture-dependent libraries? " $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") @@ -2596,7 +2596,7 @@ $ EOD $ ENDIF $ IF F$TYPE(sitelib) .NES. "" $ THEN dflt = sitelib -$ ELSE dflt = privlib - "]" + ".SITE_PERL]" +$ ELSE dflt = privlib + "/site_perl" $ ENDIF $ rp = "Pathname for the site-specific library files? " $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") @@ -2614,7 +2614,7 @@ $ EOD $ ENDIF $ IF F$TYPE(sitearch) .NES. "" $ THEN dflt = sitearch -$ ELSE dflt = sitelib - "]" + "." + archname + "]" +$ ELSE dflt = sitelib + "/" + archname $ ENDIF $ rp = "Pathname for the site-specific architecture-dependent library files? " $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") @@ -2626,7 +2626,6 @@ $! $!: determine where public executables go $ IF F$TYPE(bin) .NES. "" $ THEN dflt = bin -$! ELSE dflt = prefix - ".]" + ".BIN]" $ ELSE dflt = "/''vms_prefix'" $ ENDIF $ rp = "Pathname where the public executables will reside? " @@ -2637,7 +2636,7 @@ $! $!: determine where add-on public executables go $ IF F$TYPE(sitebin) .NES. "" $ THEN dflt = sitebin -$ ELSE dflt = "''vms_prefix':[bin.''archname']" +$ ELSE dflt = "/''vms_prefix'/bin/''archname'" $ ENDIF $ rp = "Pathname where the add-on public executables should be installed? " $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") @@ -2653,58 +2652,58 @@ $!: see what memory models we can support $! $ ELSE ! skipping "where install" questions, we must set some symbols $ IF F$TYPE(archlib).EQS."" THEN - - archlib="''vms_prefix':[lib.''archname'.''version']" + archlib="/''vms_prefix'/lib/''archname'/''version'" $ IF F$TYPE(bin) .EQS. "" THEN - bin="/''vms_prefix'" $ IF F$TYPE(privlib) .EQS. "" THEN - - privlib ="''vms_prefix':[lib]" + privlib ="/''vms_prefix'/lib" $ IF F$TYPE(sitearch) .EQS. "" THEN - - sitearch="''vms_prefix':[lib.site_perl.''archname']" + sitearch="/''vms_prefix'/lib/site_perl/''archname'" $ IF F$TYPE(sitelib) .EQS. "" THEN - - sitelib ="''vms_prefix':[lib.site_perl]" + sitelib ="/''vms_prefix'/lib/site_perl" $ IF F$TYPE(sitebin) .EQS. "" THEN - - sitebin="''vms_prefix':[bin.''archname']" + sitebin="/''vms_prefix'/bin/''archname'" $ ENDIF !%Config-I-VMS, skip "where install" questions $! $! These derived locations can be set whether we've opted to $! skip the where install questions or not. $! $ IF F$TYPE(archlibexp) .EQS. "" THEN - - archlibexp="''vms_prefix':[lib.''archname'.''version']" + archlibexp="/''vms_prefix'/lib/''archname'/''version'" $ IF F$TYPE(binexp) .EQS. "" THEN - - binexp ="''vms_prefix':[000000]" + binexp ="/''vms_prefix'" $ IF F$TYPE(builddir) .EQS. "" THEN - - builddir ="''vms_prefix':[000000]" + builddir ="/''vms_prefix'" $ IF F$TYPE(installarchlib) .EQS. "" THEN - - installarchlib="''vms_prefix':[lib.''archname'.''version']" + installarchlib="/''vms_prefix'/lib/''archname'/''version'" $ IF F$TYPE(installbin) .EQS. "" THEN - - installbin ="''vms_prefix':[000000]" + installbin ="/''vms_prefix'" $ IF F$TYPE(installscript) .EQS. "" THEN - - installscript ="''vms_prefix':[utils]" + installscript ="/''vms_prefix'/utils" $ IF F$TYPE(installman1dir) .EQS. "" THEN - - installman1dir ="''vms_prefix':[man.man1]" + installman1dir ="/''vms_prefix'/man/man1" $ IF F$TYPE(installman3dir) .EQS. "" THEN - - installman3dir ="''vms_prefix':[man.man3]" + installman3dir ="/''vms_prefix'/man/man3" $ IF F$TYPE(installprivlib) .EQS. "" THEN - - installprivlib ="''vms_prefix':[lib]" + installprivlib ="/''vms_prefix'/lib" $ IF F$TYPE(installsitearch) .EQS. "" THEN - - installsitearch="''vms_prefix':[lib.site_perl.''archname']" + installsitearch="/''vms_prefix'/lib/site_perl/''archname'" $ IF F$TYPE(installsitelib) .EQS. "" THEN - - installsitelib ="''vms_prefix':[lib.site_perl]" + installsitelib ="/''vms_prefix'/lib/site_perl" $ IF F$TYPE(oldarchlib) .EQS. "" THEN - - oldarchlib="''vms_prefix':[lib.''archname']" + oldarchlib="/''vms_prefix'/lib/''archname'" $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN - - oldarchlibexp="''vms_prefix':[lib.''archname']" + oldarchlibexp="/''vms_prefix'/lib/''archname'" $ IF F$TYPE(privlibexp) .EQS. "" THEN - - privlibexp ="''vms_prefix':[lib]" + privlibexp ="/''vms_prefix'/lib" $ IF F$TYPE(scriptdir) .EQS. "" THEN - - scriptdir ="''vms_prefix':[utils]" + scriptdir ="/''vms_prefix'/utils" $ IF F$TYPE(sitearchexp) .EQS. "" THEN - - sitearchexp ="''vms_prefix':[lib.site_perl.''archname']" + sitearchexp ="/''vms_prefix'/lib/site_perl/''archname'" $ IF F$TYPE(sitelib_stem) .EQS. "" THEN - - sitelib_stem ="''vms_prefix':[lib.site_perl]" + sitelib_stem ="/''vms_prefix'/lib/site_perl" $ IF F$TYPE(sitelibexp) .EQS. "" THEN - - sitelibexp ="''vms_prefix':[lib.site_perl]" + sitelibexp ="/''vms_prefix'/lib/site_perl" $! $! determine whether to use malloc wrapping $ echo "" @@ -6585,7 +6584,7 @@ $ WC "installbin='" + installbin + "'" $ WC "installman1dir='" + installman1dir + "'" $ WC "installman3dir='" + installman3dir + "'" $ WC "installprefix='" + vms_prefix + "'" -$ WC "installprefixexp='" + vms_prefix + ":'" +$ WC "installprefixexp='/" + vms_prefix + "'" $ WC "installprivlib='" + installprivlib + "'" $ WC "installscript='" + installscript + "'" $ WC "installsitearch='" + installsitearch + "'" @@ -6678,7 +6677,7 @@ $ WC "perl_verb='" + perl_verb + "'" ! VMS specific $ WC "pgflquota='" + pgflquota + "'" $ WC "pidtype='" + pidtype + "'" $ WC "prefix='" + vms_prefix + "'" -$ WC "prefixexp='" + vms_prefix + ":'" +$ WC "prefixexp='/" + vms_prefix + "'" $ WC "privlib='" + privlib + "'" $ WC "privlibexp='" + privlibexp + "'" $ WC "procselfexe=' '" @@ -6748,7 +6747,7 @@ $ WC "sitelib='" + sitelib + "'" $ WC "sitelib_stem='" + sitelib_stem + "'" $ WC "sitelibexp='" + sitelibexp + "'" $ WC "siteprefix='" + vms_prefix + "'" -$ WC "siteprefixexp='" + vms_prefix + ":'" +$ WC "siteprefixexp='/" + vms_prefix + "'" $ WC "sizesize='" + sizesize + "'" $ WC "sizetype='size_t'" $ WC "so='" + so + "'" diff --git a/mg.c b/mg.c index 8b182e6..85e3175 100644 --- a/mg.c +++ b/mg.c @@ -1212,8 +1212,8 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) char tmpbuf[256]; Stat_t st; I32 i; -#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */ - const char path_sep = '|'; +#ifdef __VMS /* Hmm. How do we get $Config{path_sep} from C? */ + const char path_sep = PL_perllib_sep; #else const char path_sep = ':'; #endif @@ -1221,8 +1221,11 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) s, strend, path_sep, &i); s++; if (i >= (I32)sizeof tmpbuf /* too long -- assume the worst */ -#ifdef VMS - || !strchr(tmpbuf, ':') /* no colon thus no device name -- assume relative path */ +#ifdef __VMS + /* no colon thus no device name -- assume relative path */ + || (PL_perllib_sep != ':' && !strchr(tmpbuf, ':')) + /* Using Unix separator, e.g. under bash, so act line Unix */ + || (PL_perllib_sep == ':' && *tmpbuf != '/') #else || *tmpbuf != '/' /* no starting slash -- assume relative path */ #endif -- Perl5 Master Repository