From owner-svn-src-head@freebsd.org Tue May 2 13:38:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1190DD5A57E; Tue, 2 May 2017 13:38:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7E9612F7; Tue, 2 May 2017 13:38:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v42DcLCf076667; Tue, 2 May 2017 13:38:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v42DcKpq076654; Tue, 2 May 2017 13:38:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705021338.v42DcKpq076654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 May 2017 13:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317678 - in head/usr.bin/grep: . nls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 May 2017 13:38:23 -0000 Author: emaste Date: Tue May 2 13:38:20 2017 New Revision: 317678 URL: https://svnweb.freebsd.org/changeset/base/317678 Log: bsdgrep: Add GNU compatible version string indicator As reported in r218614 it's useful to have an indication of whether or not BSD grep was built with GNU_GREP_COMPAT. Submitted by: Kyle Evans Reported by: mandree Differential Revision: https://reviews.freebsd.org/D10451 Modified: head/usr.bin/grep/Makefile head/usr.bin/grep/grep.c head/usr.bin/grep/nls/C.msg head/usr.bin/grep/nls/es_ES.ISO8859-1.msg head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg head/usr.bin/grep/nls/ja_JP.SJIS.msg head/usr.bin/grep/nls/ja_JP.UTF-8.msg head/usr.bin/grep/nls/ja_JP.eucJP.msg head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg head/usr.bin/grep/nls/ru_RU.KOI8-R.msg head/usr.bin/grep/nls/uk_UA.UTF-8.msg head/usr.bin/grep/nls/zh_CN.UTF-8.msg Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/Makefile Tue May 2 13:38:20 2017 (r317678) @@ -82,7 +82,7 @@ CFLAGS+= -DWITHOUT_BZIP2 .endif .if ${MK_GNU_GREP_COMPAT} != "no" -CFLAGS+= -I${DESTDIR}/usr/include/gnu +CFLAGS+= -I${DESTDIR}/usr/include/gnu -DWITH_GNU LIBADD+= gnuregex .endif Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/grep.c Tue May 2 13:38:20 2017 (r317678) @@ -74,6 +74,7 @@ const char *errstr[] = { /* 7*/ "\t[--null] [pattern] [file ...]\n", /* 8*/ "Binary file %s matches\n", /* 9*/ "%s (BSD grep) %s\n", +/* 10*/ "%s (BSD grep, GNU compatible) %s\n", }; /* Flags passed to regcomp() and regexec() */ @@ -596,7 +597,11 @@ main(int argc, char *argv[]) filebehave = FILE_MMAP; break; case 'V': +#ifdef WITH_GNU + printf(getstr(10), getprogname(), VERSION); +#else printf(getstr(9), getprogname(), VERSION); +#endif exit(0); case 'v': vflag = true; Modified: head/usr.bin/grep/nls/C.msg ============================================================================== --- head/usr.bin/grep/nls/C.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/C.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [pattern] [file ...]\n" 8 "Binary file %s matches\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/es_ES.ISO8859-1.msg ============================================================================== --- head/usr.bin/grep/nls/es_ES.ISO8859-1.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/es_ES.ISO8859-1.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [pauta] [fichero ...]\n" 8 "fichero binario %s se ajusta\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg ============================================================================== --- head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/gl_ES.ISO8859-1.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [pauta] [ficheiro ...]\n" 8 "ficheiro binario %s conforma\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg ============================================================================== --- head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/hu_HU.ISO8859-2.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [minta] [f疔l ...]\n" 8 "%s bin疵is f疔l illeszkedik\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/ja_JP.SJIS.msg ============================================================================== --- head/usr.bin/grep/nls/ja_JP.SJIS.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/ja_JP.SJIS.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [パターン] [ファイル名 ...]\n" 8 "バイナリファイル %s にマッチしました\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/ja_JP.UTF-8.msg ============================================================================== --- head/usr.bin/grep/nls/ja_JP.UTF-8.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/ja_JP.UTF-8.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [繝代ち繝シ繝ウ] [繝輔ぃ繧、繝ォ蜷 ...]\n" 8 "繝舌う繝翫Μ繝輔ぃ繧、繝ォ %s 縺ォ繝槭ャ繝√@縺セ縺励◆\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/ja_JP.eucJP.msg ============================================================================== --- head/usr.bin/grep/nls/ja_JP.eucJP.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/ja_JP.eucJP.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [・ム・ソ。シ・] [・ユ・。・、・フセ ...]\n" 8 "・ミ・、・ハ・・ユ・。・、・ %s 、ヒ・゙・テ・チ、キ、゙、キ、ソ\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg ============================================================================== --- head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/pt_BR.ISO8859-1.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [padr縊] [arquivo ...]\n" 8 "arquivo bin疵io %s casa com o padr縊\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/ru_RU.KOI8-R.msg ============================================================================== --- head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/ru_RU.KOI8-R.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [ロチツフマホ] [ニチハフ ...]\n" 8 "トラマノ゙ホルハ ニチハフ %s モマラミチトチナヤ\n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/uk_UA.UTF-8.msg ============================================================================== --- head/usr.bin/grep/nls/uk_UA.UTF-8.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/uk_UA.UTF-8.msg Tue May 2 13:38:20 2017 (r317678) @@ -10,3 +10,4 @@ $quote " 7 "\t[--null] [ム威ーミアミサミセミス] [ムミーミケミサ ...]\n" 8 "ミエミイム孟ケミコミセミイミクミケ ムミーミケミサ %s ムミソム孟イミソミーミエミーム能n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n" Modified: head/usr.bin/grep/nls/zh_CN.UTF-8.msg ============================================================================== --- head/usr.bin/grep/nls/zh_CN.UTF-8.msg Tue May 2 10:13:50 2017 (r317677) +++ head/usr.bin/grep/nls/zh_CN.UTF-8.msg Tue May 2 13:38:20 2017 (r317678) @@ -11,3 +11,4 @@ $quote " 7 "\t[--null] [讓。蠑従 [譁莉カ蜷 ...]\n" 8 "莠瑚ソ帛宛譁莉カ %s 蛹蜷ォ讓。蠑十n" 9 "%s (BSD grep) %s\n" +10 "%s (BSD grep, GNU compatible) %s\n"