From cf11f4bfc3057837b3293e13b8edc0381b78e551 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 14 May 1999 19:55:04 +0000 Subject: [PATCH] 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 --- win32/win32.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.7.4