From: Nicholas Clark Date: Sat, 21 Feb 2009 18:04:08 +0000 (+0000) Subject: In S_init_perllib(), correct errors in the MACOS_TRADITIONAL conditional code. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3aaf6557bbee1b4253a365839e7074c1efc18213;p=p5sagit%2Fp5-mst-13.2.git In S_init_perllib(), correct errors in the MACOS_TRADITIONAL conditional code. (Errors that originated in a26c0e281cb6068a8d148933281d8186f1eb4206 and 50d61629dc7fe34f077b9f66c50287d839e06378) --- diff --git a/perl.c b/perl.c index 0aa8dfd..34f95de 100644 --- 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