[Toybox] [PATCH] Make it easier to switch regex implementations.
enh
enh at google.com
Wed Oct 28 17:06:01 PDT 2020
One reason to use toybox on the host is to get the same behavior across
Android/Linux/macOS. Unfortunately (as we've seen from a few bugs) one
area where that doesn't quite work is that toybox uses the libc regular
expression implementation. That's fine, and mostly what users want, but
those folks trying to get the exact same behavior everywhere might want
to switch in a known regex implementation (bionic's NetBSD regex
implementation, say) for increased consistency.
That actually works pretty well, but portability.h has an #ifndef test
for REG_STARTEND before including <regex.h> that gets in the way. To
make up for that, this patch removes the unnecessary #include <regex.h>
from grep.c itself.
---
lib/portability.h | 1 +
toys/posix/grep.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-it-easier-to-switch-regex-implementations.patch
Type: text/x-patch
Size: 1565 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20201028/d2c6f7a7/attachment-0002.bin>
More information about the Toybox
mailing list