svn commit: r368355 - in head: share/mk tools/build/options usr.bin/grep

Kyle Evans kevans at FreeBSD.org
Sat Dec 5 02:21:59 UTC 2020


Author: kevans
Date: Sat Dec  5 02:21:58 2020
New Revision: 368355
URL: https://svnweb.freebsd.org/changeset/base/368355

Log:
  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

Deleted:
  head/tools/build/options/WITHOUT_GNU_GREP_COMPAT
  head/tools/build/options/WITH_GNU_GREP_COMPAT
Modified:
  head/share/mk/src.opts.mk
  head/usr.bin/grep/Makefile
  head/usr.bin/grep/grep.c

Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk	Sat Dec  5 00:33:28 2020	(r368354)
+++ head/share/mk/src.opts.mk	Sat Dec  5 02:21:58 2020	(r368355)
@@ -208,7 +208,6 @@ __DEFAULT_NO_OPTIONS = \
     CLANG_FORMAT \
     DTRACE_TESTS \
     EXPERIMENTAL \
-    GNU_GREP_COMPAT \
     HESIOD \
     LIBSOFT \
     LOADER_FIREWIRE \

Modified: head/usr.bin/grep/Makefile
==============================================================================
--- head/usr.bin/grep/Makefile	Sat Dec  5 00:33:28 2020	(r368354)
+++ head/usr.bin/grep/Makefile	Sat Dec  5 02:21:58 2020	(r368355)
@@ -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

Modified: head/usr.bin/grep/grep.c
==============================================================================
--- head/usr.bin/grep/grep.c	Sat Dec  5 00:33:28 2020	(r368354)
+++ head/usr.bin/grep/grep.c	Sat Dec  5 02:21:58 2020	(r368355)
@@ -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;


More information about the svn-src-head mailing list