Windows has a somewhat different sitelib layout, and needs
Gurusamy Sarathy [Tue, 8 Feb 2000 06:59:55 +0000 (06:59 +0000)]
$sitelib/archname added as well

p4raw-id: //depot/perl@5037

perl.c

diff --git a/perl.c b/perl.c
index 0cde0ac..1da8b0e 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3119,6 +3119,9 @@ S_init_perllib(pTHX)
     incpush(PRIVLIB_EXP, FALSE);
 #endif
 
+#if defined(WIN32)
+    incpush(SITELIB_EXP, TRUE);        /* XXX Win32 needs inc_version_list support */
+#else
 #ifdef SITELIB_EXP
     {
        char *path = SITELIB_EXP;
@@ -3132,6 +3135,7 @@ S_init_perllib(pTHX)
        }
     }
 #endif
+#endif
 #if defined(PERL_VENDORLIB_EXP)
 #if defined(WIN32) 
     incpush(PERL_VENDORLIB_EXP, TRUE);
@@ -3231,6 +3235,12 @@ S_incpush(pTHX_ char *p, int addsubdirs)
                  S_ISDIR(tmpstatbuf.st_mode))
                av_push(GvAVn(PL_incgv), newSVsv(subdir));
 
+           /* .../archname if -d .../archname */
+           Perl_sv_setpvf(aTHX_ subdir, "%"SVf"/%s", libdir, ARCHNAME);
+           if (PerlLIO_stat(SvPVX(subdir), &tmpstatbuf) >= 0 &&
+                 S_ISDIR(tmpstatbuf.st_mode))
+               av_push(GvAVn(PL_incgv), newSVsv(subdir));
+
 #ifdef PERL_INC_VERSION_LIST
            for (incver = incverlist; *incver; incver++) {
                /* .../xxx if -d .../xxx */