freebsd-skq/usr.bin/grep
kevans 17df4eb706 bsdgrep: add a primitive literal matcher
fgrep/grep -F will error out at runtime if compiled with a regex(3)
that does not define REG_NOSPEC or REG_LITERAL. glibc is one such regex(3)
implementation, and as it turns out they don't support literal matching at
all.

Provide a primitive literal matcher for use with glibc and other
implementations that don't support literal matching so that we don't
completely lose fgrep/grep -F if compiled against libgnuregex on stable/10,
stable/11, or other systems that we don't necessarily support.

This is a wholly unoptimized implementation with no plans to optimize it as
of now. This is due to both its use-case being primarily on unsupported
systems in the near-distant future and that it's reinventing the wheel that
we already have available as a feature of regex(3).

Reviewed by:	cem, emaste, ngie
Approved by:	emaste (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D12056
2017-08-24 01:23:33 +00:00
..
nls
regex
tests Update copyright e-mail address to @FreeBSD.org address 2017-07-06 19:53:30 +00:00
file.c
grep.1
grep.c bsdgrep: add a primitive literal matcher 2017-08-24 01:23:33 +00:00
grep.h bsdgrep: add a primitive literal matcher 2017-08-24 01:23:33 +00:00
Makefile Add HAS_TESTS to all Makefiles that are currently using the 2017-08-02 08:50:42 +00:00
Makefile.depend
queue.c
util.c bsdgrep: add a primitive literal matcher 2017-08-24 01:23:33 +00:00