diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/config.bc | 6 | ||||
-rw-r--r-- | win32/config.gc | 6 | ||||
-rw-r--r-- | win32/config.vc | 6 | ||||
-rw-r--r-- | win32/config_H.bc | 20 | ||||
-rw-r--r-- | win32/config_H.gc | 20 | ||||
-rw-r--r-- | win32/config_H.vc | 20 | ||||
-rw-r--r-- | win32/config_h.PL | 4 | ||||
-rw-r--r-- | win32/perlhost.h | 16 | ||||
-rw-r--r-- | win32/win32.c | 48 | ||||
-rw-r--r-- | win32/win32.h | 6 |
10 files changed, 127 insertions, 25 deletions
diff --git a/win32/config.bc b/win32/config.bc index fdd26dea8e..32fb9d82b7 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -349,6 +349,7 @@ d_umask='define' d_uname='define' d_union_semun='define' d_ustat='undef' +d_vendorarch='undef' d_vendorbin='undef' d_vendorlib='undef' d_vfork='undef' @@ -512,6 +513,7 @@ installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' installsitelib='~INST_TOP~\site~INST_VER~\lib' installstyle='lib' installusrbinperl='undef' +installvendorarch='' installvendorbin='' installvendorlib='' intsize='4' @@ -667,6 +669,7 @@ sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' sitelib='~INST_TOP~\site~INST_VER~\lib' +sitelib_stem='' sitelibexp='~INST_TOP~\site~INST_VER~\lib' siteprefix='~INST_TOP~\site~INST_VER~' siteprefixexp='~INST_TOP~\site~INST_VER~' @@ -751,9 +754,12 @@ uvsize='4' uvtype='unsigned long' uvuformat='"lu"' uvxformat='"lx"' +vendorarch='' +vendorarchexp='' vendorbin='' vendorbinexp='' vendorlib='' +vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' diff --git a/win32/config.gc b/win32/config.gc index 9df20c2761..950a3d7df8 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -349,6 +349,7 @@ d_umask='define' d_uname='define' d_union_semun='define' d_ustat='undef' +d_vendorarch='undef' d_vendorbin='undef' d_vendorlib='undef' d_vfork='undef' @@ -512,6 +513,7 @@ installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' installsitelib='~INST_TOP~\site~INST_VER~\lib' installstyle='lib' installusrbinperl='undef' +installvendorarch='' installvendorbin='' installvendorlib='' intsize='4' @@ -667,6 +669,7 @@ sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' sitelib='~INST_TOP~\site~INST_VER~\lib' +sitelib_stem='' sitelibexp='~INST_TOP~\site~INST_VER~\lib' siteprefix='~INST_TOP~\site~INST_VER~' siteprefixexp='~INST_TOP~\site~INST_VER~' @@ -751,9 +754,12 @@ uvsize='4' uvtype='unsigned long' uvuformat='"lu"' uvxformat='"lx"' +vendorarch='' +vendorarchexp='' vendorbin='' vendorbinexp='' vendorlib='' +vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' diff --git a/win32/config.vc b/win32/config.vc index c3e1f7d6cf..007834e838 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -349,6 +349,7 @@ d_umask='define' d_uname='define' d_union_semun='define' d_ustat='undef' +d_vendorarch='undef' d_vendorbin='undef' d_vendorlib='undef' d_vfork='undef' @@ -512,6 +513,7 @@ installsitebin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' installsitelib='~INST_TOP~\site~INST_VER~\lib' installstyle='lib' installusrbinperl='undef' +installvendorarch='' installvendorbin='' installvendorlib='' intsize='4' @@ -667,6 +669,7 @@ sitearchexp='~INST_TOP~\site~INST_VER~\lib~INST_ARCH~' sitebin='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' sitebinexp='~INST_TOP~\site~INST_VER~\bin~INST_ARCH~' sitelib='~INST_TOP~\site~INST_VER~\lib' +sitelib_stem='' sitelibexp='~INST_TOP~\site~INST_VER~\lib' siteprefix='~INST_TOP~\site~INST_VER~' siteprefixexp='~INST_TOP~\site~INST_VER~' @@ -751,9 +754,12 @@ uvsize='4' uvtype='unsigned long' uvuformat='"lu"' uvxformat='"lx"' +vendorarch='' +vendorarchexp='' vendorbin='' vendorbinexp='' vendorlib='' +vendorlib_stem='' vendorlibexp='' vendorprefix='' vendorprefixexp='' diff --git a/win32/config_H.bc b/win32/config_H.bc index 1ec6d557a9..48fa1bac46 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -13,7 +13,7 @@ /* * Package name : perl5 * Source directory : - * Configuration time: Sun Mar 5 04:30:07 2000 + * Configuration time: Sun Mar 5 22:28:23 2000 * Configured by : gsar * Target system : */ @@ -2792,8 +2792,14 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/* SITELIB_STEM: + * This define is SITELIB_EXP with any trailing version-specific component + * removed. The elements in inc_version_list (inc_version_list.U) can + * be tacked onto this variable to generate a list of directories to search. + */ #define SITELIB "c:\\perl\\site\\5.6.0\\lib" /**/ #define SITELIB_EXP (win32_get_sitelib("5.6.0")) /**/ +#define SITELIB_STEM "" /**/ /* Size_t: * This symbol holds the type used to declare length parameters @@ -2942,11 +2948,23 @@ #endif /*#define OLD_PTHREADS_API /**/ +/* PERL_VENDORARCH_EXP: + * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/*#define PERL_VENDORARCH_EXP "" /**/ + /* PERL_VENDORLIB_EXP: * This symbol contains the ~name expanded version of VENDORLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/* PERL_VENDORLIB_STEM: + * This define is PERL_VENDORLIB_EXP with any trailing version-specific component + * removed. The elements in inc_version_list (inc_version_list.U) can + * be tacked onto this variable to generate a list of directories to search. + */ /*#define PERL_VENDORLIB_EXP "" /**/ +/*#define PERL_VENDORLIB_STEM "" /**/ /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this diff --git a/win32/config_H.gc b/win32/config_H.gc index 5081c37789..cb2984deb8 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -13,7 +13,7 @@ /* * Package name : perl5 * Source directory : - * Configuration time: Sun Mar 5 04:30:17 2000 + * Configuration time: Sun Mar 5 22:28:31 2000 * Configured by : gsar * Target system : */ @@ -2792,8 +2792,14 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/* SITELIB_STEM: + * This define is SITELIB_EXP with any trailing version-specific component + * removed. The elements in inc_version_list (inc_version_list.U) can + * be tacked onto this variable to generate a list of directories to search. + */ #define SITELIB "c:\\perl\\site\\5.6.0\\lib" /**/ #define SITELIB_EXP (win32_get_sitelib("5.6.0")) /**/ +#define SITELIB_STEM "" /**/ /* Size_t: * This symbol holds the type used to declare length parameters @@ -2942,11 +2948,23 @@ #endif /*#define OLD_PTHREADS_API /**/ +/* PERL_VENDORARCH_EXP: + * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/*#define PERL_VENDORARCH_EXP "" /**/ + /* PERL_VENDORLIB_EXP: * This symbol contains the ~name expanded version of VENDORLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/* PERL_VENDORLIB_STEM: + * This define is PERL_VENDORLIB_EXP with any trailing version-specific component + * removed. The elements in inc_version_list (inc_version_list.U) can + * be tacked onto this variable to generate a list of directories to search. + */ /*#define PERL_VENDORLIB_EXP "" /**/ +/*#define PERL_VENDORLIB_STEM "" /**/ /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this diff --git a/win32/config_H.vc b/win32/config_H.vc index 0706969f4f..0bb27e9be3 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -13,7 +13,7 @@ /* * Package name : perl5 * Source directory : - * Configuration time: Sun Mar 5 04:30:31 2000 + * Configuration time: Sun Mar 5 22:28:36 2000 * Configured by : gsar * Target system : */ @@ -2792,8 +2792,14 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/* SITELIB_STEM: + * This define is SITELIB_EXP with any trailing version-specific component + * removed. The elements in inc_version_list (inc_version_list.U) can + * be tacked onto this variable to generate a list of directories to search. + */ #define SITELIB "c:\\perl\\site\\5.6.0\\lib" /**/ #define SITELIB_EXP (win32_get_sitelib("5.6.0")) /**/ +#define SITELIB_STEM "" /**/ /* Size_t: * This symbol holds the type used to declare length parameters @@ -2942,11 +2948,23 @@ #endif /*#define OLD_PTHREADS_API /**/ +/* PERL_VENDORARCH_EXP: + * This symbol contains the ~name expanded version of PERL_VENDORARCH, to be used + * in programs that are not prepared to deal with ~ expansion at run-time. + */ +/*#define PERL_VENDORARCH_EXP "" /**/ + /* PERL_VENDORLIB_EXP: * This symbol contains the ~name expanded version of VENDORLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ +/* PERL_VENDORLIB_STEM: + * This define is PERL_VENDORLIB_EXP with any trailing version-specific component + * removed. The elements in inc_version_list (inc_version_list.U) can + * be tacked onto this variable to generate a list of directories to search. + */ /*#define PERL_VENDORLIB_EXP "" /**/ +/*#define PERL_VENDORLIB_STEM "" /**/ /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this diff --git a/win32/config_h.PL b/win32/config_h.PL index 17f3fc2163..5b0450609f 100644 --- a/win32/config_h.PL +++ b/win32/config_h.PL @@ -49,12 +49,12 @@ while (<SH>) munge(); s/\\\$/\$/g; s#/[ *\*]*\*/#/**/#; - if (/^\s*#define\s+(PRIVLIB|SITELIB)_EXP/) + if (/^\s*#define\s+(PRIVLIB|SITELIB|VENDORLIB)_EXP/) { $_ = "#define ". $1 . "_EXP (win32_get_". lc($1) . "($patchlevel))\t/**/\n"; } # incpush() handles archlibs, so disable them - elsif (/^\s*#define\s+(ARCHLIB|SITEARCH)_EXP/) + elsif (/^\s*#define\s+(ARCHLIB|SITEARCH|VENDORARCH)_EXP/) { $_ = "/*#define ". $1 . "_EXP \"\"\t/**/\n"; } diff --git a/win32/perlhost.h b/win32/perlhost.h index a3f4c28350..02b9cb4bc4 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -17,8 +17,9 @@ #if !defined(PERL_OBJECT) START_EXTERN_C #endif -extern char * g_win32_get_privlib(char *pl); -extern char * g_win32_get_sitelib(char *pl); +extern char * g_win32_get_privlib(const char *pl); +extern char * g_win32_get_sitelib(const char *pl); +extern char * g_win32_get_vendorlib(const char *pl); extern char * g_getlogin(void); extern int do_spawn2(char *cmd, int exectype); #if !defined(PERL_OBJECT) @@ -475,17 +476,23 @@ PerlEnvOsId(struct IPerlEnv* piPerl) } char* -PerlEnvLibPath(struct IPerlEnv* piPerl, char *pl) +PerlEnvLibPath(struct IPerlEnv* piPerl, const char *pl) { return g_win32_get_privlib(pl); } char* -PerlEnvSiteLibPath(struct IPerlEnv* piPerl, char *pl) +PerlEnvSiteLibPath(struct IPerlEnv* piPerl, const char *pl) { return g_win32_get_sitelib(pl); } +char* +PerlEnvVendorLibPath(struct IPerlEnv* piPerl, const char *pl) +{ + return g_win32_get_vendorlib(pl); +} + void PerlEnvGetChildIO(struct IPerlEnv* piPerl, child_IO_table* ptr) { @@ -506,6 +513,7 @@ struct IPerlEnv perlEnv = PerlEnvOsId, PerlEnvLibPath, PerlEnvSiteLibPath, + PerlEnvVendorLibPath, PerlEnvGetChildIO, }; diff --git a/win32/win32.c b/win32/win32.c index 4ccae52d84..97b51bab10 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -84,6 +84,8 @@ int _fcloseall(); # define win32_get_privlib g_win32_get_privlib # undef win32_get_sitelib # define win32_get_sitelib g_win32_get_sitelib +# undef win32_get_vendorlib +# define win32_get_vendorlib g_win32_get_vendorlib # undef do_spawn # define do_spawn g_do_spawn # undef getlogin @@ -107,6 +109,9 @@ static char * get_emd_part(SV **leading, char *trailing, ...); static void remove_dead_process(long deceased); static long find_pid(int pid); static char * qualified_path(const char *cmd); +static char * win32_get_xlib(const char *pl, const char *xlib, + const char *libname); + #ifdef USE_ITHREADS static void remove_dead_pseudo_process(long child); static long find_pseudo_pid(int pid); @@ -265,7 +270,7 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) } char * -win32_get_privlib(char *pl) +win32_get_privlib(const char *pl) { dTHXo; char *stdlib = "lib"; @@ -281,11 +286,10 @@ win32_get_privlib(char *pl) return get_emd_part(&sv, stdlib, ARCHNAME, "bin", Nullch); } -char * -win32_get_sitelib(char *pl) +static char * +win32_get_xlib(const char *pl, const char *xlib, const char *libname) { dTHXo; - char *sitelib = "sitelib"; char regstr[40]; char pathstr[MAX_PATH+1]; DWORD datalen; @@ -293,21 +297,22 @@ win32_get_sitelib(char *pl) SV *sv1 = Nullsv; SV *sv2 = Nullsv; - /* $HKCU{"sitelib-$]"} || $HKLM{"sitelib-$]"} . ---; */ - sprintf(regstr, "%s-%s", sitelib, pl); + /* $HKCU{"$xlib-$]"} || $HKLM{"$xlib-$]"} . ---; */ + sprintf(regstr, "%s-%s", xlib, pl); (void)get_regstr(regstr, &sv1); - /* $sitelib .= - * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/site/$]/lib"; */ - sprintf(pathstr, "site/%s/lib", pl); + /* $xlib .= + * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/$]/lib"; */ + sprintf(pathstr, "%s/%s/lib", libname, pl); (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, Nullch); - /* $HKCU{'sitelib'} || $HKLM{'sitelib'} . ---; */ - (void)get_regstr(sitelib, &sv2); + /* $HKCU{$xlib} || $HKLM{$xlib} . ---; */ + (void)get_regstr(xlib, &sv2); - /* $sitelib .= - * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/site/lib"; */ - (void)get_emd_part(&sv2, "site/lib", ARCHNAME, "bin", pl, Nullch); + /* $xlib .= + * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/lib"; */ + sprintf(pathstr, "%s/lib", libname); + (void)get_emd_part(&sv2, pathstr, ARCHNAME, "bin", pl, Nullch); if (!sv1 && !sv2) return Nullch; @@ -322,6 +327,21 @@ win32_get_sitelib(char *pl) return SvPVX(sv1); } +char * +win32_get_sitelib(const char *pl) +{ + return win32_get_xlib(pl, "sitelib", "site"); +} + +#ifndef PERL_VENDORLIB_NAME +# define PERL_VENDORLIB_NAME "vendor" +#endif + +char * +win32_get_vendorlib(const char *pl) +{ + return win32_get_xlib(pl, "vendorlib", PERL_VENDORLIB_NAME); +} static BOOL has_shell_metachars(char *ptr) diff --git a/win32/win32.h b/win32/win32.h index a0d076109c..1669ea4b29 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -25,6 +25,7 @@ # endif # define win32_get_privlib PerlEnv_lib_path # define win32_get_sitelib PerlEnv_sitelib_path +# define win32_get_vendorlib PerlEnv_vendorlib_path #endif #ifdef __GNUC__ @@ -312,8 +313,9 @@ extern int my_fclose(FILE *); extern int do_aspawn(void *really, void **mark, void **sp); extern int do_spawn(char *cmd); extern int do_spawn_nowait(char *cmd); -extern char * win32_get_privlib(char *pl); -extern char * win32_get_sitelib(char *pl); +extern char * win32_get_privlib(const char *pl); +extern char * win32_get_sitelib(const char *pl); +extern char * win32_get_vendorlib(const char *pl); extern int IsWin95(void); extern int IsWinNT(void); extern void win32_argv2utf8(int argc, char** argv); |