Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2017 15:52:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 222201] fgrep / grep -F broken if WITH_BSD_GREP set
Message-ID:  <bug-222201-8-xKtKSsYFCT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-222201-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-222201-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222201

--- Comment #3 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kevans
Date: Mon Sep 11 15:52:24 UTC 2017
New revision: 323443
URL: https://svnweb.freebsd.org/changeset/base/323443

Log:
  bsdgrep: add a primitive literal matcher to unbreak fgrep in some scenari=
os

  MFC r322825: bsdgrep: add some additional tests for fgrep

  Previously added tests only check that fgrep is somewhat sane and works. =
Add
  some more tests that check that the implementation is basically functional
  and not producing incorrect results with various flags.

  MFC r322826: bsdgrep: add a primitive literal matcher

  fgrep/grep -F will error out at runtime if compiled with a regex(3)
  that does not define REG_NOSPEC or REG_LITERAL. glibc is one such regex(3)
  implementation, and as it turns out they don't support literal matching at
  all.

  Provide a primitive literal matcher for use with glibc and other
  implementations that don't support literal matching so that we don't
  completely lose fgrep/grep -F if compiled against libgnuregex on stable/1=
0,
  stable/11, or other systems that we don't necessarily support.

  This is a wholly unoptimized implementation with no plans to optimize it =
as
  of now. This is due to both its use-case being primarily on unsupported
  systems in the near-distant future and that it's reinventing the wheel th=
at
  we already have available as a feature of regex(3).

  PR:           222201
  Approved by:  emaste (mentor, blanket MFC)

Changes:
_U  stable/11/
  stable/11/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
  stable/11/usr.bin/grep/grep.c
  stable/11/usr.bin/grep/grep.h
  stable/11/usr.bin/grep/util.c

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222201-8-xKtKSsYFCT>