aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-05-06 13:16:24 -0500
committerRob Landley <rob@landley.net>2019-05-06 13:16:24 -0500
commit48162c4ee3fb013c09cecea52c6403a33526f172 (patch)
tree26df11e4431a09f43784886fcc6199f2ec681b8a /toys
parenteb318d5b03223a8f2c5641ee45f9b28647bd3f47 (diff)
downloadtoybox-48162c4ee3fb013c09cecea52c6403a33526f172.tar.gz
Greatly simplify and speed up regexec0() using REG_STARTEND.
This is a 15 year old freebsd extension (presumably thus also available on MacOS) that glibc adopted in 2004, uClibc adopted in 2005, and bionic supports. The only thing that DOESN'T support it is musl, once again because its maintainer explicitly decided not to (https://www.openwall.com/lists/musl/2013/01/15/26), so add an #ifdef to let musl stay uniquely broken. (It'll stop at first NUL, everything else can match NULs). Finally fixes "s/x/y/g on a megabyte line of x's takes forever" issue.
Diffstat (limited to 'toys')
0 files changed, 0 insertions, 0 deletions