diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-08-19 00:50:55 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-08-19 00:50:55 +0000 |
commit | a790bc052b826ae399f37ef7e2fe7561b2b52c39 (patch) | |
tree | 49cae2d7db1e0fb7a4c20bf8ed86d748933a24fe /toke.c | |
parent | 084811a77fe079a567456c8e5f1787f4dd137226 (diff) | |
download | perl-a790bc052b826ae399f37ef7e2fe7561b2b52c39.tar.gz |
perl 5.003_03: toke.c
Include <unistd.h>.
Use memcmp instead of bcmp even when we don't care about order.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -69,6 +69,12 @@ static void restore_rsfp _((void *f)); #include <sys/file.h> #endif +/* XXX If this causes problems, set i_unistd=undef in the hint file. */ +#ifdef I_UNISTD +# include <unistd.h> /* 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); |