{
dVAR;
char *s;
+#ifdef WIN32
+ STRLEN len;
+#endif
+
if (!PL_tainting) {
#ifndef VMS
s = PerlEnv_getenv("PERL5LIB");
#ifdef SITELIB_EXP
# if defined(WIN32)
/* this picks up sitearch as well */
- s = win32_get_sitelib(PERL_FS_VERSION);
+ s = win32_get_sitelib(PERL_FS_VERSION, &len);
if (s)
- incpush_use_sep(s, 0, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
+ incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
# else
S_incpush_use_sep(aTHX_ STR_WITH_LEN(SITELIB_EXP), INCPUSH_CAN_RELOCATE);
# endif
#ifdef PERL_VENDORLIB_EXP
# if defined(WIN32)
/* this picks up vendorarch as well */
- s = win32_get_vendorlib(PERL_FS_VERSION);
+ s = win32_get_vendorlib(PERL_FS_VERSION, &len);
if (s)
- incpush_use_sep(s, 0, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
+ incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
# else
S_incpush_use_sep(aTHX_ STR_WITH_LEN(PERL_VENDORLIB_EXP), INCPUSH_CAN_RELOCATE);
# endif
#endif
#if defined(WIN32)
- s = win32_get_privlib(PERL_FS_VERSION);
+ s = win32_get_privlib(PERL_FS_VERSION, &len);
if (s)
- incpush_use_sep(s, 0, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
+ incpush_use_sep(s, len, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
#else
S_incpush_use_sep(aTHX_ STR_WITH_LEN(PRIVLIB_EXP), INCPUSH_CAN_RELOCATE);
#endif
end = p + len;
/* Break at all separators */
- while ((s = memchr(p, PERLLIB_SEP, end - p))) {
+ while ((s = (const char*)memchr(p, PERLLIB_SEP, end - p))) {
if (s == p) {
/* skip any consecutive separators */