#ifdef SITELIB_EXP
# if defined(WIN32)
/* this picks up sitearch as well */
- s = win32_get_sitelib(PERL_FS_VERSION, &len);
+ s = PerlEnv_sitelib_path(PERL_FS_VERSION, &len);
if (s)
incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
# else
#ifdef PERL_VENDORLIB_EXP
# if defined(WIN32)
/* this picks up vendorarch as well */
- s = win32_get_vendorlib(PERL_FS_VERSION, &len);
+ s = PerlEnv_vendorlib_path(PERL_FS_VERSION, &len);
if (s)
incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
# else
#endif
#if defined(WIN32)
- s = win32_get_privlib(PERL_FS_VERSION, &len);
+ s = PerlEnv_lib_path(PERL_FS_VERSION, &len);
if (s)
incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
#else
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define PRIVLIB "\\Storage Card\\perl58m\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/
+#define PRIVLIB_EXP (PerlEnv_lib_path(PERL_VERSION_STRING, NULL)) /**/
/* PTRSIZE:
* This symbol contains the size of a pointer, so that the C preprocessor
* be tacked onto this variable to generate a list of directories to search.
*/
#define SITELIB "\\Storage Card\\perl58m\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING, NULL)) /**/
+#define SITELIB_EXP (PerlEnv_sitelib_path(PERL_VERSION_STRING, NULL)) /**/
#define SITELIB_STEM "" /**/
/* Size_t_size:
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define PRIVLIB "c:\\perl\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/
+#define PRIVLIB_EXP (PerlEnv_lib_path(PERL_VERSION_STRING, NULL)) /**/
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
* be tacked onto this variable to generate a list of directories to search.
*/
#define SITELIB "c:\\perl\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING, NULL)) /**/
+#define SITELIB_EXP (PerlEnv_sitelib_path(PERL_VERSION_STRING, NULL)) /**/
#define SITELIB_STEM "" /**/
/* Size_t_size:
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
#define PRIVLIB "c:\\perl\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/
+#define PRIVLIB_EXP (PerlEnv_lib_path(PERL_VERSION_STRING, NULL)) /**/
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
* be tacked onto this variable to generate a list of directories to search.
*/
#define SITELIB "c:\\perl\\site\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING, NULL)) /**/
+#define SITELIB_EXP (PerlEnv_sitelib_path(PERL_VERSION_STRING, NULL)) /**/
#define SITELIB_STEM "" /**/
/* Size_t_size:
s#(.)/\*\*/#$1/ **/# if(/^\/\*/); #avoid "/*" inside comments
if (/^\s*#define\s+(PRIVLIB|SITELIB|VENDORLIB)_EXP/)
{
- $_ = "#define ". $1 . "_EXP (win32_get_". lc($1) . "(PERL_VERSION_STRING, NULL))\t/**/\n";
+ $_ = '#define '. $1 . '_EXP ('.(
+ $1 eq 'PRIVLIB' ? 'PerlEnv_lib_path' :
+ $1 eq 'SITELIB' ? 'PerlEnv_sitelib_path' :
+ $1 eq 'VENDORLIB' ? 'PerlEnv_vendorlib_path' :
+ die "unknown *LIB_EXP define \"$1\""
+ ). "(PERL_VERSION_STRING, NULL))\t/**/\n";
}
# incpush() handles archlibs, so disable them
elsif (/^\s*#define\s+(ARCHLIB|SITEARCH|VENDORARCH)_EXP/)
#endif
START_EXTERN_C
-extern char * g_win32_get_privlib(const char *pl, STRLEN *const len);
-extern char * g_win32_get_sitelib(const char *pl, STRLEN *const len);
-extern char * g_win32_get_vendorlib(const char *pl, STRLEN *const len);
extern char * g_getlogin(void);
END_EXTERN_C
char*
PerlEnvLibPath(struct IPerlEnv* piPerl, const char *pl, STRLEN *const len)
{
- return g_win32_get_privlib(pl, len);
+ return win32_get_privlib(pl, len);
}
char*
PerlEnvSiteLibPath(struct IPerlEnv* piPerl, const char *pl, STRLEN *const len)
{
- return g_win32_get_sitelib(pl, len);
+ return win32_get_sitelib(pl, len);
}
char*
PerlEnvVendorLibPath(struct IPerlEnv* piPerl, const char *pl,
STRLEN *const len)
{
- return g_win32_get_vendorlib(pl, len);
+ return win32_get_vendorlib(pl, len);
}
void
#define EXECF_SPAWN_NOWAIT 3
#if defined(PERL_IMPLICIT_SYS)
-# undef win32_get_privlib
-# 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 getlogin
# define getlogin g_getlogin
#endif
# ifdef PERL_GLOBAL_STRUCT
# error PERL_GLOBAL_STRUCT cannot be defined with PERL_IMPLICIT_SYS
# 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__
#define EXECF_SPAWN_NOWAIT 3
#if defined(PERL_IMPLICIT_SYS)
-# undef win32_get_privlib
-# 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