In S_init_perllib(), correct errors in the MACOS_TRADITIONAL conditional code.
Nicholas Clark [Sat, 21 Feb 2009 18:04:08 +0000 (18:04 +0000)]
(Errors that originated in a26c0e281cb6068a8d148933281d8186f1eb4206 and
50d61629dc7fe34f077b9f66c50287d839e06378)

perl.c

diff --git a/perl.c b/perl.c
index 0aa8dfd..34f95de 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -4145,8 +4145,8 @@ S_init_perllib(pTHX_ U32 old_vers)
     }
 #endif
 
-    if (!old_vers) {
 #ifdef MACOS_TRADITIONAL
+    if (!old_vers) {
        Stat_t tmpstatbuf;
        SV * privdir = newSV(0);
        char * macperl = PerlEnv_getenv("MACPERL");
@@ -4164,12 +4164,14 @@ S_init_perllib(pTHX_ U32 old_vers)
            incpush_use_sep(SvPVX(privdir), SvCUR(privdir), INCPUSH_ADD_SUB_DIRS);
        Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl);
        if (PerlLIO_stat(SvPVX(privdir), SvCUR(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
-           incpush_use_sep(SvPVX(privdir), INCPUSH_ADD_SUB_DIRS);
+           incpush_use_sep(SvPVX(privdir), SvCUR(privdir), INCPUSH_ADD_SUB_DIRS);
        
        SvREFCNT_dec(privdir);
        if (!PL_tainting)
            S_incpush(aTHX_ STR_WITH_LEN(":"), 0);
+    }
 #else
+    if (!old_vers) {
 
 #ifdef SITEARCH_EXP
     /* sitearch is always relative to sitelib on Windows for