From: Nicholas Clark Date: Mon, 16 Feb 2009 22:27:58 +0000 (+0000) Subject: As WIN32 is already using different flags to incpush_use_sep for SITELIB_EXP, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1fa74d9f2486a5a4ae9109d21458f9b93dfec557;p=p5sagit%2Fp5-mst-13.2.git As WIN32 is already using different flags to incpush_use_sep for SITELIB_EXP, VENDORLIB_EXP and PRIVLIB_EXP, requiring conditional compilation, it doesn't feel like extra complexity to make explict calls in S_init_perllib() to the 3 win32_*() functions they expand to, which allows a NULL pointer check. --- diff --git a/perl.c b/perl.c index 33dbcc6..bcc3843 100644 --- a/perl.c +++ b/perl.c @@ -4179,7 +4179,9 @@ S_init_perllib(pTHX_ U32 old_vers) #ifdef SITELIB_EXP # if defined(WIN32) /* this picks up sitearch as well */ - incpush_use_sep(SITELIB_EXP, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); + s = win32_get_sitelib(PERL_FS_VERSION); + if (s) + incpush_use_sep(s, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); # else incpush_use_sep(SITELIB_EXP, INCPUSH_CAN_RELOCATE); # endif @@ -4203,8 +4205,9 @@ S_init_perllib(pTHX_ U32 old_vers) #ifdef PERL_VENDORLIB_EXP # if defined(WIN32) /* this picks up vendorarch as well */ - incpush_use_sep(PERL_VENDORLIB_EXP, - INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); + s = win32_get_vendorlib(PERL_FS_VERSION); + if (s) + incpush_use_sep(s, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); # else incpush_use_sep(PERL_VENDORLIB_EXP, INCPUSH_CAN_RELOCATE); # endif @@ -4226,7 +4229,9 @@ S_init_perllib(pTHX_ U32 old_vers) #endif #if defined(WIN32) - incpush_use_sep(PRIVLIB_EXP, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); + s = win32_get_privlib(PERL_FS_VERSION); + if (s) + incpush_use_sep(s, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE); #else incpush_use_sep(PRIVLIB_EXP, INCPUSH_CAN_RELOCATE); #endif