ports/113755: tamago does not work with FreeWnn-server on 64-bit emacs.
Nobuhiro Ban
ban.nobuhiro at gmail.com
Sat Jun 16 16:10:03 UTC 2007
>Number: 113755
>Category: ports
>Synopsis: tamago does not work with FreeWnn-server on 64-bit emacs.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Jun 16 16:10:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Nobuhiro Ban
>Release: FreeBSD 6.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD g3 6.2-STABLE FreeBSD 6.2-STABLE #2: Tue Jun 12 22:34:13 JST 200
7 ban at g3:/usr/obj/usr/src/sys/G3 amd64
Installed ports:
ja-FreeWnn-lib-1.1.1.a021_1 A Japanese/Chinese/Korean input method (Japanese client lib
ja-FreeWnn-server-1.1.1.a021_1 A Japanese/Chinese/Korean input method (Japanese server)
emacs-21.3_10 GNU editing macros
tamago-emacs21-4.0.6.0.20041122.11 The Multilingual Input Method - Egg V4
.emacs:
(set-language-environment "Japanese")
(setq wnn-jserver '("127.0.0.1"))
>Description:
tamago does not work with FreeWnn-server on 64bit-emacs.
When I try converting hiragana to kanji by tamago (using FreeWnn
jserver), I get ``cannot connect to the server'' error (in Japanese).
It seems that some code assume comm-unpack-u32 returns -1 when read
FF FF FF FF. But this procedure return 4294967295 (2^32 - 1) on
64bit-emacs.
64bit-emacs
(+ (lsh 255 24) (lsh 255 16) (lsh 255 8) 255)
=> 4294967295
32bit-emacs
(+ (lsh 255 24) (lsh 255 16) (lsh 255 8) 255)
=> -1
>How-To-Repeat:
always with 64-bit emacs and FreeWnn.
>Fix:
try this patch:
--- egg/wnnrpc.el Sat Jun 16 23:30:29 2007
+++ egg/wnnrpc.el Sat Jun 16 23:29:00 2007
@@ -714,8 +714,14 @@
,send-expr , at rcv-exprs))
(defmacro wnnrpc-get-result (&rest body)
- `(let (result)
- (comm-unpack (u) result)
+ `(let (result resulth)
+ (comm-unpack (w w) resulth result)
+ (cond ((and (= result 65535) (= resulth 65535))
+ (setq result -1))
+ ((= resulth (lsh (lsh resulth 16) -16))
+ (setq result (+ (lsh resulth 16) result)))
+ (t
+ (error "overflow")))
(if (< result 0)
(progn
(comm-unpack (u) result)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list