From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E5CE4C41CB; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50Gz0t5mz4msJ; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E51A6F0E; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSw7j023622; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSw7M023621; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSw7M023621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: cadd3b8fcb41 - stable/12 - bsdgrep: switch to libregex for GNU_GREP_COMPAT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cadd3b8fcb416b8474b91f237671b49bc7b834e6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cadd3b8fcb416b8474b91f237671b49bc7b834e6 commit cadd3b8fcb416b8474b91f237671b49bc7b834e6 Author: Kyle Evans AuthorDate: 2020-08-04 02:47:24 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:49:42 +0000 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. (cherry picked from commit cab7d341dcd98138443bbdb51649f966093a3a84) --- usr.bin/grep/Makefile | 4 ++-- usr.bin/grep/grep.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index c3b07b9252c6..b51f51c8bd5e 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -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= diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index a7ecc2015571..96be836601ad 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -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);