From: Perl 5 Porters Date: Mon, 19 Aug 1996 00:46:59 +0000 (+0000) Subject: Use memcmp instead of bcmp even when we don't care about order. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a026971d0f28d48a093e5fdd42c475d75eb83b44;p=p5sagit%2Fp5-mst-13.2.git Use memcmp instead of bcmp even when we don't care about order. --- diff --git a/regexec.c b/regexec.c index 4119dfc..1ee1436 100644 --- a/regexec.c +++ b/regexec.c @@ -668,7 +668,7 @@ char *prog; sayNO; if (regeol - locinput < ln) sayNO; - if (ln > 1 && bcmp(s, locinput, ln) != 0) + if (ln > 1 && memcmp(s, locinput, ln) != 0) sayNO; locinput += ln; nextchar = *locinput; @@ -748,7 +748,7 @@ char *prog; ln = regendp[n] - s; if (locinput + ln > regeol) sayNO; - if (ln > 1 && bcmp(s, locinput, ln) != 0) + if (ln > 1 && memcmp(s, locinput, ln) != 0) sayNO; locinput += ln; nextchar = *locinput; diff --git a/sv.c b/sv.c index 9fb9985..8259b90 100644 --- a/sv.c +++ b/sv.c @@ -2520,7 +2520,7 @@ register SV *str2; if (cur1 != cur2) return 0; - return !bcmp(pv1, pv2, cur1); + return !memcmp(pv1, pv2, cur1); } I32 @@ -2707,7 +2707,7 @@ I32 append; thats_all_folks: if ((rslen > 1 && (bp - (STDCHAR*)SvPVX(sv) < rslen)) || - bcmp((char*)bp - rslen, rsptr, rslen)) + memcmp((char*)bp - rslen, rsptr, rslen)) goto screamer; /* go back to the fray */ thats_really_all_folks: if (shortbuffered) @@ -2742,7 +2742,7 @@ screamer2: if (i != EOF && /* joy */ (!rslen || SvCUR(sv) < rslen || - bcmp(SvPVX(sv) + SvCUR(sv) - rslen, rsptr, rslen))) + memcmp(SvPVX(sv) + SvCUR(sv) - rslen, rsptr, rslen))) { append = -1; goto screamer2;