ports/72371: 64 bits cleanup patches for fcitx 2.0.1

David Xu davidxu at FreeBSD.org
Wed Oct 6 03:20:24 UTC 2004


>Number:         72371
>Category:       ports
>Synopsis:       64 bits cleanup patches for fcitx 2.0.1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 06 03:20:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     David Xu
>Release:        6.0 CURRENT
>Organization:
FreeBSD
>Environment:
FreeBSD alona.xuyifeng.com 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Wed Oct  6 10:07:32 CST 2004     davidxu at alona.xuyifeng.com:/d1/src/sys/amd64/compile/alona  amd64

>Description:
ports chinese/fcitx is not 64 bits clean, running it under AMD64 cause it to abort.

>How-To-Repeat:
setenv XMODIFIERS "@im=fcitx"
and put:
fcitx & 
at first line of ~/.xinitrc
then startx and presses ctrl + space, and input some characters, it will abort.

>Fix:
patches:
diff -u ./InputWindow.c.old ./InputWindow.c
--- ./InputWindow.c.old	Tue Dec 30 15:54:47 2003
+++ ./InputWindow.c	Wed Oct  6 11:04:54 2004
@@ -110,7 +110,7 @@
     char            str1[] = "Ay中";
     char            str2[10];
     char           *ps1, *ps2;
-    int             l1, l2;
+    size_t         l1, l2;
 
     if (!xftFont)
 	return;
@@ -120,7 +120,7 @@
     ps2 = str2;
     ps1 = str1;
 
-    l1 = iconv (convUTF8, (char **) &ps1, &l1, &ps2, &l2);
+    l1 = iconv (convUTF8, (const char **) &ps1, &l1, &ps2, &l2);
 
     XftTextExtentsUtf8 (dpy, xftFont, str2, strlen (str2), &extents);
     iInputWindowHeight = extents.height * 2 + extents.height / 2 + 8;
diff -u ./ui.c.old ./ui.c
--- ./ui.c.old	Wed Oct  6 11:05:19 2004
+++ ./ui.c	Wed Oct  6 11:04:54 2004
@@ -284,7 +284,7 @@
     XGlyphInfo      extents;
     char            str1[100];
     char           *ps, *ps1;
-    int             l1, l2;
+    size_t         l1, l2;
 
     if (!xftFont)
 	return 0;
@@ -294,7 +294,7 @@
     ps = str1;
     ps1 = str;
 
-    l1 = iconv (convUTF8, (char **) &str, &l1, &ps, &l2);
+    l1 = iconv (convUTF8, (const char **) &str, &l1, &ps, &l2);
     *ps = '\0';
     XftTextExtentsUtf8 (dpy, xftFont, str1, strlen (str1), &extents);
     return extents.width;
@@ -323,7 +323,7 @@
 void OutputString (Window window, char *str, int x, int y, XColor color)
 {
     char            strOutput[100] = "";	//该长度应该够用了
-    int             l1, l2;
+    size_t          l1, l2;
     char           *ps;
     XftColor        xftColor;
     XRenderColor    renderColor;
@@ -339,7 +339,7 @@
     l2 = 99;
     ps = strOutput;
 
-    l1 = iconv (convUTF8, (char **) (&str), &l1, &ps, &l2);
+    l1 = iconv (convUTF8, (const char **) (&str), &l1, &ps, &l2);
 
     renderColor.red = color.red;
     renderColor.green = color.green;
diff -u ./xim.c.old ./xim.c
--- ./xim.c.old	Wed Oct  6 11:05:19 2004
+++ ./xim.c	Wed Oct  6 11:04:54 2004
@@ -336,7 +336,7 @@
     char           *ps;
 
     if (bIsUtf8) {
-	int             l1, l2;
+	size_t            l1, l2;
 
 	ps = strOutput;
 	l1 = strlen (strHZ);

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list