#define sv_release_COW S_sv_release_COW
#endif
#endif
+#ifdef PERL_CORE
+#define my_strnchr S_my_strnchr
+#endif
#endif
#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
#define sv_release_COW(a,b,c,d,e,f) S_sv_release_COW(aTHX_ a,b,c,d,e,f)
#endif
#endif
+#ifdef PERL_CORE
+#define my_strnchr S_my_strnchr
+#endif
#endif
#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
#ifdef PERL_CORE
#if defined(PERL_COPY_ON_WRITE)
STATIC void S_sv_release_COW(pTHX_ SV *sv, char *pvx, STRLEN cur, STRLEN len, U32 hash, SV *after);
#endif
+STATIC const char* S_my_strnchr(const char*, int c, size_t);
#endif
#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, maybe_tainted);
}
-/* strnchr(): private function for use in sv_vcatpvfn()
+/* my_strnchr(): private function for use in sv_vcatpvfn()
*
* Like strchr(), but allows to use strings that are not null-terminated.
* The string length must be given instead and it _must_ be correct, as
* This would also allow to explicitly search for '\0' characters.
*/
-static const char *
-strnchr(const char* s, int c, size_t n)
+STATIC
+const char *
+S_my_strnchr(const char* s, int c, size_t n)
{
if (s)
for (; n > 0; n--, s++)
/* to a null-terminated string. E.g. with the format "%-10c", eptr */
/* points to c (a single char on the stack), which makes strchr() */
/* run amok over the stack until it eventually hits '\n' or '\0'. */
- if (left && ckWARN(WARN_PRINTF) && strnchr(eptr, '\n', elen) &&
+ if (left && ckWARN(WARN_PRINTF) && my_strnchr(eptr, '\n', elen) &&
(PL_op->op_type == OP_PRTF || PL_op->op_type == OP_SPRINTF))
Perl_warner(aTHX_ packWARN(WARN_PRINTF),
"Newline in left-justified string for %sprintf",