Date: Wed, 16 Aug 2017 22:00:56 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r322597 - stable/11/usr.bin/grep Message-ID: <201708162200.v7GM0u6O059312@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Aug 16 22:00:56 2017 New Revision: 322597 URL: https://svnweb.freebsd.org/changeset/base/322597 Log: MFC r317705: bsdgrep: avoid use of magic number for REG_NOSPEC Approved by: emaste (mentor, blanket MFC) Modified: stable/11/usr.bin/grep/grep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/grep/grep.c ============================================================================== --- stable/11/usr.bin/grep/grep.c Wed Aug 16 21:42:27 2017 (r322596) +++ stable/11/usr.bin/grep/grep.c Wed Aug 16 22:00:56 2017 (r322597) @@ -717,8 +717,13 @@ main(int argc, char *argv[]) case GREP_BASIC: break; case GREP_FIXED: - /* XXX: header mess, REG_LITERAL not defined in gnu/regex.h */ - cflags |= 0020; +#if defined(REG_NOSPEC) + cflags |= REG_NOSPEC; +#elif defined(REG_LITERAL) + cflags |= REG_LITERAL; +#else + errx(2, "literal expressions not supported at compile time"); +#endif break; case GREP_EXTENDED: cflags |= REG_EXTENDED;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708162200.v7GM0u6O059312>