From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 21 21:50:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 656C4106564A for ; Tue, 21 Apr 2009 21:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 378548FC18 for ; Tue, 21 Apr 2009 21:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3LLo2E3097633 for ; Tue, 21 Apr 2009 21:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3LLo2pr097632; Tue, 21 Apr 2009 21:50:02 GMT (envelope-from gnats) Resent-Date: Tue, 21 Apr 2009 21:50:02 GMT Resent-Message-Id: <200904212150.n3LLo2pr097632@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, peterjeremy@optushome.com.au, phil.kim@alcatel-lucent.com.au Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B34CB106566B for ; Tue, 21 Apr 2009 21:48:48 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 4C5828FC13 for ; Tue, 21 Apr 2009 21:48:48 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-216-167.belrs3.nsw.optusnet.com.au [122.106.216.167]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n3LLmePV016448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Apr 2009 07:48:42 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n3LLmeks024962; Wed, 22 Apr 2009 07:48:40 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n3LLmdL5024961; Wed, 22 Apr 2009 07:48:39 +1000 (EST) (envelope-from peter) Message-Id: <20090421214839.GA24950@server.vk2pj.dyndns.org> Date: Wed, 22 Apr 2009 07:48:39 +1000 From: Peter Jeremy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: peterjeremy@optushome.com.au, phil.kim@alcatel-lucent.com.au Subject: ports/133899: korean/ami doesn't work on amd64 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: peterjeremy@optushome.com.au, phil.kim@alcatel-lucent.com.au List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2009 21:50:02 -0000 >Number: 133899 >Category: ports >Synopsis: korean/ami doesn't work on amd64 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 21 21:50:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 7.0-STABLE amd64 >Organization: n/a >Environment: System: FreeBSD pjdesk.au.alcatel-lucent.com 7.0-STABLE FreeBSD 7.0-STABLE #7: Thu Apr 10 10:50:36 EST 2008 root@pjdesk.alcatel.com.au:/var/obj/usr/src/sys/pjdesk amd64 >Description: When attempting to input Hangul via ami on an amd64 system, garbage CJK characters were displayed. >How-To-Repeat: On an amd64 system, enable "2 BUL" mode and attempt to enter Hangul characters in an XIM-enabled text box. >Fix: Examination of compiler warnings shows several cases where (int*) is passed to a function expecting (size_t *). The following patches appear to fix the problem and make ami work correctly. --- src/hanja.c~ 2003-02-06 09:52:42.000000000 +1100 +++ src/hanja.c 2009-04-21 13:43:59.000000000 +1000 @@ -345,7 +345,7 @@ if ( ami_codeset==AMI_UTF8) { /* U+AC00 -> EAB080, U+D7A3 -> ED9EA3 */ - int ilen,olen; + size_t ilen,olen; char *iptr=word; char *optr; @@ -399,8 +399,8 @@ if ( ami_codeset==AMI_EUC) match=g_strdup(s); else { - int ilen=strlen(s)+1; - int olen=ilen*2; + size_t ilen=strlen(s)+1; + size_t olen=ilen*2; char *iptr=s; char *optr; match=g_new(gchar,olen); --- src/johabcode2.c~ 2003-01-27 10:26:03.000000000 +1100 +++ src/johabcode2.c 2009-04-21 13:39:56.000000000 +1000 @@ -40,7 +40,7 @@ int johab_to_wansung(char *s, int johab) { - int in_len, out_len; + size_t in_len, out_len; char in[2]; char *in_p, *out_p; if (johab < 128) { @@ -68,8 +68,8 @@ { char *out_p = s; char *in_p = johab; - int in_len = len; - int out_len = len; + size_t in_len = len; + size_t out_len = len; if (johab_to_wan_cd == (iconv_t) -1) { johab_to_wan_cd = iconv_open(CD_EUC_KR, CD_JOHAB); if (johab_to_wan_cd == (iconv_t) -1) { @@ -84,7 +84,7 @@ int johab_from_wansung(char *s, int wansung) { - int in_len, out_len; + size_t in_len, out_len; char in[2]; char *in_p, *out_p; if (wansung < 128) { @@ -112,8 +112,8 @@ { char *out_p = s; char *in_p = wansung; - int in_len = len; - int out_len = len; + size_t in_len = len; + size_t out_len = len; if (wan_to_johab_cd == (iconv_t) -1) { wan_to_johab_cd = iconv_open(CD_JOHAB, CD_EUC_KR); if (wan_to_johab_cd == (iconv_t) -1) { @@ -155,7 +155,7 @@ int johab_to_utf8(char *s, int johab) { - int in_len, out_len; + size_t in_len, out_len; char in[2]; char *in_p, *out_p; if (johab < 128) { --- src/si.c~ 2003-01-27 10:26:03.000000000 +1100 +++ src/si.c 2009-04-21 13:39:54.000000000 +1000 @@ -174,7 +174,7 @@ else { char tbuf[3]; char *iptr,*optr; - int ilen,olen; + size_t ilen,olen; for (i = 0; i < row*col; i++) { tbuf[0] = first; tbuf[1] = k++; >Release-Note: >Audit-Trail: >Unformatted: