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
..
2017-07-24 04:38:05 +00:00
2017-08-03 17:43:26 +00:00
2017-08-07 14:09:57 +00:00
2017-07-31 19:34:38 +00:00
2017-08-12 15:51:46 +00:00
2017-02-28 23:42:47 +00:00
2017-08-04 17:41:49 +00:00
2017-07-27 14:34:57 +00:00
2017-08-07 14:09:57 +00:00
2017-08-03 15:47:42 +00:00