Retire GNU_GREP_COMPAT knob

This was introduced and then disabled by default primarily to avoid dealing
with bugs in libgnuregex. rS363823 switched to using libregex for it, so
let's just rip the option out now so we can make sure we're getting tested
with libregex via bsdgrep.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D27476
This commit is contained in:
Kyle Evans 2020-12-05 02:21:58 +00:00
parent 78599c32ef
commit 7c2f310f6d
5 changed files with 1 additions and 17 deletions

View File

@ -208,7 +208,6 @@ __DEFAULT_NO_OPTIONS = \
CLANG_FORMAT \
DTRACE_TESTS \
EXPERIMENTAL \
GNU_GREP_COMPAT \
HESIOD \
LIBSOFT \
LOADER_FIREWIRE \

View File

@ -1,3 +0,0 @@
.\" $FreeBSD$
Set this option to omit the gnu extensions to grep from being included in
BSD grep.

View File

@ -1,4 +0,0 @@
.\" $FreeBSD$
Set this option to include GNU extensions in
.Xr bsdgrep 1
by linking against libgnuregex.

View File

@ -60,10 +60,7 @@ MLINKS+= grep.1 egrep.1 \
grep.1 rgrep.1
.endif
.if ${MK_GNU_GREP_COMPAT} != "no"
CFLAGS+= -DWITH_GNU_COMPAT
LIBADD+= regex
.endif
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests

View File

@ -62,8 +62,7 @@ const char *errstr[] = {
/* 5*/ "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n",
/* 6*/ "\t[--null] [pattern] [file ...]\n",
/* 7*/ "Binary file %s matches\n",
/* 8*/ "%s (BSD grep) %s\n",
/* 9*/ "%s (BSD grep, GNU compatible) %s\n",
/* 8*/ "%s (BSD grep, GNU compatible) %s\n",
};
/* Flags passed to regcomp() and regexec() */
@ -555,11 +554,7 @@ main(int argc, char *argv[])
filebehave = FILE_MMAP;
break;
case 'V':
#ifdef WITH_GNU_COMPAT
printf(errstr[9], getprogname(), VERSION);
#else
printf(errstr[8], getprogname(), VERSION);
#endif
exit(0);
case 'v':
vflag = true;