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.
This commit is contained in:
Kyle Evans 2020-08-04 02:47:24 +00:00
parent 1546dc216f
commit cab7d341dc
2 changed files with 3 additions and 3 deletions

View File

@ -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=

View File

@ -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);