From: Perl 5 Porters Date: Mon, 19 Aug 1996 00:50:55 +0000 (+0000) Subject: perl 5.003_03: toke.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a790bc052b826ae399f37ef7e2fe7561b2b52c39;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_03: toke.c Include . Use memcmp instead of bcmp even when we don't care about order. --- diff --git a/toke.c b/toke.c index ae91a1a..ccd4aed 100644 --- a/toke.c +++ b/toke.c @@ -69,6 +69,12 @@ static void restore_rsfp _((void *f)); #include #endif +/* XXX If this causes problems, set i_unistd=undef in the hint file. */ +#ifdef I_UNISTD +# include /* Needed for execv() */ +#endif + + #ifdef ff_next #undef ff_next #endif @@ -4539,7 +4545,7 @@ register char *s; if (!rsfp) { d = s; while (s < bufend && - (*s != term || bcmp(s,tokenbuf,len) != 0) ) { + (*s != term || memcmp(s,tokenbuf,len) != 0) ) { if (*s++ == '\n') curcop->cop_line++; } @@ -4572,7 +4578,7 @@ register char *s; (I32)curcop->cop_line,sv); } bufend = SvPVX(linestr) + SvCUR(linestr); - if (*s == term && bcmp(s,tokenbuf,len) == 0) { + if (*s == term && memcmp(s,tokenbuf,len) == 0) { s = bufend - 1; *s = ' '; sv_catsv(linestr,herewas);