summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep
diff options
context:
space:
mode:
authorkevans <kevans@FreeBSD.org>2017-08-16 17:46:45 +0000
committerkevans <kevans@FreeBSD.org>2017-08-16 17:46:45 +0000
commita9c64fb0c4238782ade2a056e2ccd01a84fb3092 (patch)
tree129efd4134ef3518da8fa8c8f9e3bdda8c13af6b /usr.bin/grep
parentb2428cac40cf8723cc48a612d7c585f82a90b73d (diff)
downloadFreeBSD-src-a9c64fb0c4238782ade2a056e2ccd01a84fb3092.zip
FreeBSD-src-a9c64fb0c4238782ade2a056e2ccd01a84fb3092.tar.gz
MFC r317678: 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. Approved by: emaste (mentor, blanket MFC)
Diffstat (limited to 'usr.bin/grep')
-rw-r--r--usr.bin/grep/Makefile2
-rw-r--r--usr.bin/grep/grep.c5
-rw-r--r--usr.bin/grep/nls/C.msg1
-rw-r--r--usr.bin/grep/nls/es_ES.ISO8859-1.msg1
-rw-r--r--usr.bin/grep/nls/gl_ES.ISO8859-1.msg1
-rw-r--r--usr.bin/grep/nls/hu_HU.ISO8859-2.msg1
-rw-r--r--usr.bin/grep/nls/ja_JP.SJIS.msg1
-rw-r--r--usr.bin/grep/nls/ja_JP.UTF-8.msg1
-rw-r--r--usr.bin/grep/nls/ja_JP.eucJP.msg1
-rw-r--r--usr.bin/grep/nls/pt_BR.ISO8859-1.msg1
-rw-r--r--usr.bin/grep/nls/ru_RU.KOI8-R.msg1
-rw-r--r--usr.bin/grep/nls/uk_UA.UTF-8.msg1
-rw-r--r--usr.bin/grep/nls/zh_CN.UTF-8.msg1
13 files changed, 17 insertions, 1 deletions
diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile
index c6b25f0..758eac7 100644
--- a/usr.bin/grep/Makefile
+++ b/usr.bin/grep/Makefile
@@ -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
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 9709ce6..8b4ff6b 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -75,6 +75,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() */
@@ -597,7 +598,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;
diff --git a/usr.bin/grep/nls/C.msg b/usr.bin/grep/nls/C.msg
index d8a3f08..a86bafa 100644
--- a/usr.bin/grep/nls/C.msg
+++ b/usr.bin/grep/nls/C.msg
@@ -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"
diff --git a/usr.bin/grep/nls/es_ES.ISO8859-1.msg b/usr.bin/grep/nls/es_ES.ISO8859-1.msg
index 8a08079..fc65913 100644
--- a/usr.bin/grep/nls/es_ES.ISO8859-1.msg
+++ b/usr.bin/grep/nls/es_ES.ISO8859-1.msg
@@ -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"
diff --git a/usr.bin/grep/nls/gl_ES.ISO8859-1.msg b/usr.bin/grep/nls/gl_ES.ISO8859-1.msg
index f89532f..6de2798 100644
--- a/usr.bin/grep/nls/gl_ES.ISO8859-1.msg
+++ b/usr.bin/grep/nls/gl_ES.ISO8859-1.msg
@@ -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"
diff --git a/usr.bin/grep/nls/hu_HU.ISO8859-2.msg b/usr.bin/grep/nls/hu_HU.ISO8859-2.msg
index 9c8aafd..c774070 100644
--- a/usr.bin/grep/nls/hu_HU.ISO8859-2.msg
+++ b/usr.bin/grep/nls/hu_HU.ISO8859-2.msg
@@ -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"
diff --git a/usr.bin/grep/nls/ja_JP.SJIS.msg b/usr.bin/grep/nls/ja_JP.SJIS.msg
index da0677e..8f532c4 100644
--- a/usr.bin/grep/nls/ja_JP.SJIS.msg
+++ b/usr.bin/grep/nls/ja_JP.SJIS.msg
@@ -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"
diff --git a/usr.bin/grep/nls/ja_JP.UTF-8.msg b/usr.bin/grep/nls/ja_JP.UTF-8.msg
index e842b25..e59708b 100644
--- a/usr.bin/grep/nls/ja_JP.UTF-8.msg
+++ b/usr.bin/grep/nls/ja_JP.UTF-8.msg
@@ -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"
diff --git a/usr.bin/grep/nls/ja_JP.eucJP.msg b/usr.bin/grep/nls/ja_JP.eucJP.msg
index 922b25a..8f2e97d 100644
--- a/usr.bin/grep/nls/ja_JP.eucJP.msg
+++ b/usr.bin/grep/nls/ja_JP.eucJP.msg
@@ -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"
diff --git a/usr.bin/grep/nls/pt_BR.ISO8859-1.msg b/usr.bin/grep/nls/pt_BR.ISO8859-1.msg
index c049fde..15d777a 100644
--- a/usr.bin/grep/nls/pt_BR.ISO8859-1.msg
+++ b/usr.bin/grep/nls/pt_BR.ISO8859-1.msg
@@ -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"
diff --git a/usr.bin/grep/nls/ru_RU.KOI8-R.msg b/usr.bin/grep/nls/ru_RU.KOI8-R.msg
index d6d308f..f12b1b6 100644
--- a/usr.bin/grep/nls/ru_RU.KOI8-R.msg
+++ b/usr.bin/grep/nls/ru_RU.KOI8-R.msg
@@ -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"
diff --git a/usr.bin/grep/nls/uk_UA.UTF-8.msg b/usr.bin/grep/nls/uk_UA.UTF-8.msg
index e601ca2..4564a59 100644
--- a/usr.bin/grep/nls/uk_UA.UTF-8.msg
+++ b/usr.bin/grep/nls/uk_UA.UTF-8.msg
@@ -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"
diff --git a/usr.bin/grep/nls/zh_CN.UTF-8.msg b/usr.bin/grep/nls/zh_CN.UTF-8.msg
index 921ff4b..b727316 100644
--- a/usr.bin/grep/nls/zh_CN.UTF-8.msg
+++ b/usr.bin/grep/nls/zh_CN.UTF-8.msg
@@ -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"
OpenPOWER on IntegriCloud