]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add libregex, connect it to the build
authorkevans <kevans@FreeBSD.org>
Mon, 22 Jan 2018 02:44:41 +0000 (02:44 +0000)
committerkevans <kevans@FreeBSD.org>
Mon, 22 Jan 2018 02:44:41 +0000 (02:44 +0000)
commit8d872ae8f85dc409340b9ac37c269f44815b016e
tree249678d6d01d0b5c8b4e424257ccdfb6b1324358
parent6f666776527d68b1c4af8472956f29bc0ffc782b
Add libregex, connect it to the build

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- This reduces the overhead induced by adding yet another
regex implementation to base.

2.) Ease of use- Flipping on GNU extensions will be as simple as linking
against libregex, and POSIX-compliant compilations can be guaranteed with a
REG_POSIX cflag that should be ignored by libc/regex and disables extensions
in libregex. It is also easier to keep REG_POSIX sane and POSIX pure when
implemented in this fashion.

Tests are added for future functionality, but left disconnected for the time
being while other testing is done.

Reviewed by: cem (previous version)
Differential Revision: https://reviews.freebsd.org/D12934
etc/mtree/BSD.tests.dist
lib/Makefile
lib/libc/regex/Makefile.inc
lib/libc/tests/regex/Makefile
lib/libc/tests/regex/Makefile.inc [new file with mode: 0644]
lib/libregex/Makefile [new file with mode: 0644]
lib/libregex/tests/Makefile [new file with mode: 0644]
lib/libregex/tests/gnuext.in [new file with mode: 0644]
lib/libregex/tests/libregex_test.sh [new file with mode: 0755]
share/mk/bsd.libnames.mk
share/mk/src.libnames.mk