Date: Fri, 21 Apr 2017 14:50:29 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317255 - in head: share/man/man5 share/mk tools/build/options Message-ID: <201704211450.v3LEoTIl039851@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Apr 21 14:50:29 2017 New Revision: 317255 URL: https://svnweb.freebsd.org/changeset/base/317255 Log: bsdgrep: disable GNU_GREP_COMPAT by default The GNU extension bits in the base system are old, no longer faithful to upstream, and surprising in some regards. Switch to documenting WITH_GNU_GREP_COMPAT and default GNU_GREP_COMPAT to OFF in the name of good behavior. According to http://www.regular-expressions.info, GNU extensions: - Add missing quantifiers to BREs: \?, \+ - Add branching to BREs: \| - Add backreferences (\1 through \9) to EREs - Add \w, \W, \s, and \S corresponding to :alnum:, [^[:alnum:]], :space:, and [^[:space:]] respectively - Add word boundaries and anchors: \b: word boundary \B: not word boundary \<: Strt of word \>: End of word \`: Start of subject string \': End of subject string These extensions are still available in /usr/bin/grep by default today, as it is still GNU grep. As part of the bsdgrep migration plan these extensions may be added to bsdgrep's regex support if necessary. Submitted by: Kyle Evans <kevans91 at ksu.edu> Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10114 Added: head/tools/build/options/WITH_GNU_GREP_COMPAT (contents, props changed) Modified: head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Apr 21 14:36:09 2017 (r317254) +++ head/share/man/man5/src.conf.5 Fri Apr 21 14:50:29 2017 (r317255) @@ -732,9 +732,10 @@ and .It Va WITHOUT_GNU_GREP Set to not build GNU .Xr grep 1 . -.It Va WITHOUT_GNU_GREP_COMPAT -Set this option to omit the gnu extensions to grep from being included in -BSD grep. +.It Va WITH_GNU_GREP_COMPAT +Set this option to include GNU extensions in +.Xr bsdgrep 1 +by linking against libgnuregex. .It Va WITHOUT_GPIO Set to not build .Xr gpioctl 8 Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Apr 21 14:36:09 2017 (r317254) +++ head/share/mk/src.opts.mk Fri Apr 21 14:50:29 2017 (r317255) @@ -99,7 +99,6 @@ __DEFAULT_YES_OPTIONS = \ GCOV \ GNU_DIFF \ GNU_GREP \ - GNU_GREP_COMPAT \ GPIO \ GPL_DTC \ GROFF \ @@ -181,6 +180,7 @@ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ CLANG_EXTRAS \ DTRACE_TESTS \ + GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ NAND \ Added: head/tools/build/options/WITH_GNU_GREP_COMPAT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_GNU_GREP_COMPAT Fri Apr 21 14:50:29 2017 (r317255) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set this option to include GNU extensions in +.Xr bsdgrep 1 +by linking against libgnuregex.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704211450.v3LEoTIl039851>