X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/6fb87544af0ff2b9b9c12038bc0fb261f56a7d88..181a7be3006117ce9bf456e49cba9cf6d2a89f73:/util.c diff --git a/util.c b/util.c index 89c44e7..7748c6c 100644 --- a/util.c +++ b/util.c @@ -551,18 +551,6 @@ Perl_delimcpy(char *to, const char *toend, const char *from, const char *fromend return (char *)from; } -/* return ptr to little string in big string, NULL if not found */ -/* This routine was donated by Corey Satten. */ - -char * -Perl_instr(const char *big, const char *little) -{ - - PERL_ARGS_ASSERT_INSTR; - - return strstr((char*)big, (char*)little); -} - /* =head1 Miscellaneous Functions @@ -596,6 +584,11 @@ char * Perl_ninstr(const char *big, const char *bigend, const char *little, const char *lend) { PERL_ARGS_ASSERT_NINSTR; + +#ifdef HAS_MEMMEM + return ninstr(big, bigend, little, lend); +#else + if (little >= lend) return (char*)big; { @@ -614,6 +607,9 @@ Perl_ninstr(const char *big, const char *bigend, const char *little, const char } } return NULL; + +#endif + } /* @@ -5300,7 +5296,8 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap PERL_UNUSED_ARG(buffer); PERL_UNUSED_ARG(len); PERL_UNUSED_ARG(format); - PERL_UNUSED_ARG(ap); + /* the cast is to avoid gcc -Wsizeof-array-argument complaining */ + PERL_UNUSED_ARG((void*)ap); Perl_croak_nocontext("panic: my_vsnprintf not available with quadmath"); return 0; #else