From: Gurusamy Sarathy Date: Fri, 14 May 1999 19:55:04 +0000 (+0000) Subject: on win32, look for "site/5.XXX/lib" if "site/5.XXXYY/lib" isn't X-Git-Tag: accepted/trunk/20130322.191538~36434 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf11f4bfc3057837b3293e13b8edc0381b78e551;p=platform%2Fupstream%2Fperl.git on win32, look for "site/5.XXX/lib" if "site/5.XXXYY/lib" isn't found (brings sitelib intuition in line with privlib) p4raw-id: //depot/perl@3423 --- diff --git a/win32/win32.c b/win32/win32.c index 7dad2cf..858f86e 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -245,9 +245,10 @@ get_emd_part(char **prev_path, char *trailing_path, ...) Renew(*prev_path, newsize, char); (*prev_path)[oldsize-1] = ';'; strcpy(&(*prev_path)[oldsize], mod_name); + return *prev_path; } - return *prev_path; + return Nullch; } char * @@ -294,6 +295,12 @@ win32_get_sitelib(char *pl) * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/site/$]/lib"; */ sprintf(pathstr, "site/%s/lib", pl); str1 = get_emd_part(path1, pathstr, ARCHNAME, "bin", pl, Nullch); + if (!str1 && strlen(pl) == 7) { + /* pl may have been SUBVERSION-specific; try again without + * SUBVERSION */ + sprintf(pathstr, "site/%.5s/lib", pl); + str1 = get_emd_part(path1, pathstr, ARCHNAME, "bin", pl, Nullch); + } /* $HKCU{'sitelib'} || $HKLM{'sitelib'} . ---; */ path2 = &SvPVX(sv2);