Page MenuHomeFreeBSD

Add libregex, connect it to the build

Authored by kevans on Nov 4 2017, 4:18 AM.



libregex is a regex(3) implementation intended to
feature GNU extensions and any other non-POSIX compliant
extensions that are deemed worthy.

These extensions are separated out into a separate library
for the sake of not cluttering up libc further with them
as well as not deteriorating the speed (or lack thereof) of
the libc implementation.

libregex is implemented as a build of the libc implementation
with LIBREGEX defined to distinguish this from a libc build. The
reasons for implementation like this are two-fold:

1.) Maintenance- The motivation for implementing like this is
reducing the overhead induced by adding yet another regex
implementation to base.

2.) Ease of use- Flipping on GNU extensions will be as simple
as -lregex, and POSIX-compliant compilations will be guaranteed
with a REG_POSIX cflag that should be ignored by libc/regex
and disables extensions in libregex.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.