pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42832: nvi-m17n fails to search multibyte char on 64bit environment



>Number:         42832
>Category:       pkg
>Synopsis:       nvi-m17n fails to search multibyte char on 64bit environment
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 17 06:10:00 +0000 2010
>Originator:     Atsushi Onoe
>Release:        NetBSD 5.0_STABLE
>Organization:
>Environment:
System: NetBSD nebula.sm.sony.co.jp 5.0_STABLE NetBSD 5.0_STABLE (NEBULA) #1: 
Wed Feb 3 15:00:13 JST 2010 onoe%nebula.sm.sony.co.jp@localhost:/usr/obj/NEBULA 
amd64
Architecture: x86_64
Machine: amd64
>Description:

        On 64bit environment, searching multibyte characters by '/' or '?'
        with nvi-m17n always fails with "Patterh not found".
        On 32bit environment such as i386, it works fine.
        ASCII charactors are matched on both environment.

>How-To-Repeat:
        Build nvi-m17n on amd64, and search Japanese KANJI characters.

>Fix:

--- regex/regex2.h.orig 2010-02-17 10:02:57.000000000 +0900
+++ regex/regex2.h
@@ -80,8 +80,8 @@
 #define        OPRMASK 0xf8000000
 #define        OPDMASK 0x07ffffff
 #define        OPSHIFT ((unsigned)27)
-#define        OP(n)   ((n)&OPRMASK)
-#define        OPND(n) ((n)&OPDMASK)
+#define        OP(n)   ((unsigned)((n)&OPRMASK))
+#define        OPND(n) ((unsigned)((n)&OPDMASK))
 #define        SOP(op, opnd)   ((op)|(opnd))
 /* operators                      meaning      operand                 */
 /*                                             (back, fwd are offsets) */



Home | Main Index | Thread Index | Old Index