gnu/91909: grep -w bug (with some locale)
Yoshiaki Uchikawa
yoshiaki at kt.rim.or.jp
Tue Jan 17 07:00:39 PST 2006
>Number: 91909
>Category: gnu
>Synopsis: grep -w bug (with some locale)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 17 15:00:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Yoshiaki Uchikawa
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD singer.tertio.atoll 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri Dec 23 19:56:43 JST 2005 yoshiaki at singer.tertio.atoll:/usr/src/sys/i386/compile/CRUSEv6 i386
FreeBSD outsider.tertio.atoll 6.0-STABLE FreeBSD 6.0-STABLE #0: Mon Jan 9 23:32:03 JST 2006 root at outsider.tertio.atoll:/usr/src/sys/i386/compile/OUTSIDER i386
>Description:
Probably multi-byte support of grep has broken with -w option(word match).
%echo elisp foo lisp | env LANG=C grep -w lisp
elisp foo lisp
%echo elisp foo lisp | env LANG=ja_JP.eucJP grep -w lisp
%echo elisp foo lisp | env LANG=ja_JP.SJIS grep -w lisp
%echo elisp foo lisp | env LANG=zh_TW.Big5 grep -w lisp
%echo elisp foo lisp | env LANG=zh_CN.GB2312 grep -w lisp
%echo elisp foo lisp | env LANG=ko_KR.eucKR grep -w lisp
For this reason, ports of a lisp category cannot be build.
% setenv LANG ; cd /usr/ports/lang/sbcl
% make
sbcl-0.9.8: Makefile error: category lisp not in list of valid categories.
*** Error code 1
>How-To-Repeat:
It is as having written above.
>Fix:
I repealed multi-byte support.
And I can build ports of lisp category.
--- search.c.orig Sun Jan 15 00:09:38 2006
+++ search.c Tue Jan 17 23:55:48 2006
@@ -520,7 +520,8 @@
else
{
assert (start > 0);
-#ifdef MBS_SUPPORT
+/* #ifdef MBS_SUPPORT */
+#if 0
if (mb_cur_max > 1)
{
const char *s;
@@ -560,7 +561,8 @@
rword_match = 1;
else
{
-#ifdef MBS_SUPPORT
+/* #ifdef MBS_SUPPORT */
+#if 0
if (mb_cur_max > 1)
{
wchar_t nwc;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list