svn commit: r363823 - head/usr.bin/grep

Kyle Evans kevans at FreeBSD.org
Tue Aug 4 02:47:25 UTC 2020


Author: kevans
Date: Tue Aug  4 02:47:24 2020
New Revision: 363823
URL: https://svnweb.freebsd.org/changeset/base/363823

Log:
  bsdgrep: switch to libregex for GNU_GREP_COMPAT
  
  libregex is incomplete, but it's a bit less buggy than the in-base
  libgnuregex and mostly OK.
  
  While here, rename -DIWTH_GNU -> -DWITH_GNU_COMPAT; the option implies
  that we're compatible with the GNU counterpart, not that we're including GNU
  anything.

Modified:
  head/usr.bin/grep/Makefile
  head/usr.bin/grep/grep.c

Modified: head/usr.bin/grep/Makefile
==============================================================================
--- head/usr.bin/grep/Makefile	Tue Aug  4 02:31:52 2020	(r363822)
+++ head/usr.bin/grep/Makefile	Tue Aug  4 02:47:24 2020	(r363823)
@@ -61,8 +61,8 @@ MLINKS+= grep.1 egrep.1 \
 .endif
 
 .if ${MK_GNU_GREP_COMPAT} != "no"
-CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU
-LIBADD+=	gnuregex
+CFLAGS+=	-DWITH_GNU_COMPAT
+LIBADD+=	regex
 .endif
 
 HAS_TESTS=

Modified: head/usr.bin/grep/grep.c
==============================================================================
--- head/usr.bin/grep/grep.c	Tue Aug  4 02:31:52 2020	(r363822)
+++ head/usr.bin/grep/grep.c	Tue Aug  4 02:47:24 2020	(r363823)
@@ -555,7 +555,7 @@ main(int argc, char *argv[])
 			filebehave = FILE_MMAP;
 			break;
 		case 'V':
-#ifdef WITH_GNU
+#ifdef WITH_GNU_COMPAT
 			printf(errstr[9], getprogname(), VERSION);
 #else
 			printf(errstr[8], getprogname(), VERSION);


More information about the svn-src-head mailing list