aboutsummaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2008-01-26 22:45:15 +0000
committerPav Lucistnik <pav@FreeBSD.org>2008-01-26 22:45:15 +0000
commite8bc2ce1854a4b1179b994cc0a1be82a0ff1c8aa (patch)
treea51fef553a44f07e3fbae383b7405989c6f05e93 /chinese
parent599f9935cc275bd804ebd5fa5c92eb58326a788e (diff)
downloadports-e8bc2ce1854a4b1179b994cc0a1be82a0ff1c8aa.tar.gz
ports-e8bc2ce1854a4b1179b994cc0a1be82a0ff1c8aa.zip
- Fix build with GCC 4.2
PR: ports/119989 Submitted by: Yuri <yuri@tsoft.com>
Notes
Notes: svn path=/head/; revision=206264
Diffstat (limited to 'chinese')
-rw-r--r--chinese/chinput3/Makefile4
-rw-r--r--chinese/chinput3/files/patch-cce-cin2tab.c11
-rw-r--r--chinese/chinput3/files/patch-cce-xl_hzinput22
-rw-r--r--chinese/chinput3/files/patch-register11
-rw-r--r--chinese/chinput3/files/patch-server-TLS_AsciiConvertor11
-rw-r--r--chinese/chinput3/files/patch-server-TLS_HzConvertTable13
-rw-r--r--chinese/chinput3/files/patch-server-TLS_ImmOp11
-rw-r--r--chinese/chinput3/files/patch-server-TLS_LibMain11
-rw-r--r--chinese/chinput3/files/patch-server-TLS_MemFile20
-rw-r--r--chinese/chinput3/files/patch-turbo-cin2tab73
10 files changed, 183 insertions, 4 deletions
diff --git a/chinese/chinput3/Makefile b/chinese/chinput3/Makefile
index 3077a64d1331..0309736f92de 100644
--- a/chinese/chinput3/Makefile
+++ b/chinese/chinput3/Makefile
@@ -30,10 +30,6 @@ SUB_FILES= pkg-message
BROKEN= Does not compile on !i386
.endif
-.if ${OSVERSION} >= 700042
-BROKEN= Does not compile with GCC 4.2
-.endif
-
post-patch:
@${REINPLACE_CMD} -e '/extern int ForwardEvent();/d' \
${WRKSRC}/src/Chinput-*/src/*.c
diff --git a/chinese/chinput3/files/patch-cce-cin2tab.c b/chinese/chinput3/files/patch-cce-cin2tab.c
new file mode 100644
index 000000000000..6e5b82b7189f
--- /dev/null
+++ b/chinese/chinput3/files/patch-cce-cin2tab.c
@@ -0,0 +1,11 @@
+--- src/unicon-im/ImmModules/cce/cin2tab.c.orig 2008-01-25 14:10:07.000000000 -0800
++++ src/unicon-im/ImmModules/cce/cin2tab.c 2008-01-25 14:32:40.000000000 -0800
+@@ -162,7 +162,7 @@
+ int i,k;
+ char fname[64], fname_cin[64], fname_tab[64];
+ char fname_phr[64],fname_lx[64];
+-char tt[128];
++unsigned char tt[128];
+ unsigned char *cmd, *arg;
+ hz_input_table InpTable;
+ int TotalKeyNum;
diff --git a/chinese/chinput3/files/patch-cce-xl_hzinput b/chinese/chinput3/files/patch-cce-xl_hzinput
new file mode 100644
index 000000000000..f66a37c089a8
--- /dev/null
+++ b/chinese/chinput3/files/patch-cce-xl_hzinput
@@ -0,0 +1,22 @@
+--- src/unicon-im/ImmModules/cce/xl_hzinput.c.orig 2008-01-25 14:10:07.000000000 -0800
++++ src/unicon-im/ImmModules/cce/xl_hzinput.c 2008-01-25 15:49:32.000000000 -0800
+@@ -124,7 +124,7 @@
+
+ static void GetAssociatePhrases (HzInputTable_T *pClient, unsigned char *p)
+ {
+- int index,len = strlen(p);
++ int index,len = strlen((const char*)p);
+
+ if (pClient->InputCount <= pClient->InputMatch) /* All Match */
+ {
+@@ -291,8 +291,8 @@
+ {
+ fseek( pClient->cur_table->AssocFile, index << 2, SEEK_SET );
+ fread( &PhraseNo, sizeof(int), 1, pClient->cur_table->AssocFile );
+- LoadPhrase(pClient, PhraseNo, str );
+- strcpy(pClient->seltab[pClient->CurSelNum],str+2);
++ LoadPhrase(pClient, PhraseNo, (char*)str );
++ strcpy(pClient->seltab[pClient->CurSelNum],(char*)str+2);
+ CurLen += strlen(pClient->seltab[pClient->CurSelNum++]);
+ index++;
+ }
diff --git a/chinese/chinput3/files/patch-register b/chinese/chinput3/files/patch-register
new file mode 100644
index 000000000000..a66ecb01e99b
--- /dev/null
+++ b/chinese/chinput3/files/patch-register
@@ -0,0 +1,11 @@
+--- src/Chinput-3.0.2/src/IMdkit/lib/i18nClbk.c.orig 2008-01-25 14:16:09.000000000 -0800
++++ src/Chinput-3.0.2/src/IMdkit/lib/i18nClbk.c 2008-01-25 14:13:15.000000000 -0800
+@@ -129,7 +129,7 @@
+ XIMPreeditDrawCallbackStruct *draw =
+ (XIMPreeditDrawCallbackStruct *) &preedit_CB->todo.draw;
+ CARD16 connect_id = call_data->any.connect_id;
+- register int feedback_count;
++ int feedback_count;
+ register int i;
+ BITMASK32 status = 0x0;
+
diff --git a/chinese/chinput3/files/patch-server-TLS_AsciiConvertor b/chinese/chinput3/files/patch-server-TLS_AsciiConvertor
new file mode 100644
index 000000000000..32ad094c0a30
--- /dev/null
+++ b/chinese/chinput3/files/patch-server-TLS_AsciiConvertor
@@ -0,0 +1,11 @@
+--- src/unicon-im/server/TLS_AsciiConvertor.cpp.orig 2008-01-25 14:10:08.000000000 -0800
++++ src/unicon-im/server/TLS_AsciiConvertor.cpp 2008-01-25 15:46:52.000000000 -0800
+@@ -202,7 +202,7 @@
+
+ int IsSymbol (unsigned char key)
+ {
+- char *szSymbol = ";:'\"<,>.?/[{]{";
++ const char *szSymbol = ";:'\"<,>.?/[{]{";
+ int i, len = strlen (szSymbol);
+ for (i = 0; i < len; i++)
+ if (key == szSymbol[i])
diff --git a/chinese/chinput3/files/patch-server-TLS_HzConvertTable b/chinese/chinput3/files/patch-server-TLS_HzConvertTable
new file mode 100644
index 000000000000..81034adb889c
--- /dev/null
+++ b/chinese/chinput3/files/patch-server-TLS_HzConvertTable
@@ -0,0 +1,13 @@
+--- src/unicon-im/server/TLS_HzConvertTable.h.orig 2008-01-25 14:10:08.000000000 -0800
++++ src/unicon-im/server/TLS_HzConvertTable.h 2008-01-25 15:23:12.000000000 -0800
+@@ -19,8 +19,8 @@
+ */
+
+ typedef struct _GB2BIG5 {
+- char *gb;
+- char *big5;
++ const char *gb;
++ const char *big5;
+ } GB2BIG5;
+
+ #define TABLENUM sizeof(g2b)/sizeof(g2b[0])
diff --git a/chinese/chinput3/files/patch-server-TLS_ImmOp b/chinese/chinput3/files/patch-server-TLS_ImmOp
new file mode 100644
index 000000000000..27bc6d304333
--- /dev/null
+++ b/chinese/chinput3/files/patch-server-TLS_ImmOp
@@ -0,0 +1,11 @@
+--- src/unicon-im/server/TLS_ImmOp.cpp.orig 2008-01-25 14:10:08.000000000 -0800
++++ src/unicon-im/server/TLS_ImmOp.cpp 2008-01-25 14:20:30.000000000 -0800
+@@ -23,7 +23,7 @@
+ * Author: see CREDITS
+ */
+
+-#include <iostream.h>
++#include <iostream>
+ #include <stdio.h>
+ #include <string.h>
+ #include <dlfcn.h>
diff --git a/chinese/chinput3/files/patch-server-TLS_LibMain b/chinese/chinput3/files/patch-server-TLS_LibMain
new file mode 100644
index 000000000000..0662815f5ec7
--- /dev/null
+++ b/chinese/chinput3/files/patch-server-TLS_LibMain
@@ -0,0 +1,11 @@
+--- src/unicon-im/server/TLS_LibMain.cpp.orig 2008-01-25 14:10:08.000000000 -0800
++++ src/unicon-im/server/TLS_LibMain.cpp 2008-01-25 14:21:32.000000000 -0800
+@@ -35,7 +35,7 @@
+ #include <signal.h>
+ #include <netdb.h>
+ #include <unistd.h>
+-#include <iostream.h>
++#include <iostream>
+ //#include <pth.h>
+
+ #include <TLS_MemFile.hpp>
diff --git a/chinese/chinput3/files/patch-server-TLS_MemFile b/chinese/chinput3/files/patch-server-TLS_MemFile
new file mode 100644
index 000000000000..e2ddab5b0451
--- /dev/null
+++ b/chinese/chinput3/files/patch-server-TLS_MemFile
@@ -0,0 +1,20 @@
+--- src/unicon-im/server/TLS_MemFile.cpp.orig 2008-01-25 14:10:08.000000000 -0800
++++ src/unicon-im/server/TLS_MemFile.cpp 2008-01-25 14:22:31.000000000 -0800
+@@ -23,7 +23,7 @@
+ * Author: see CREDITS
+ */
+
+-#include <iostream.h>
++#include <iostream>
+ #include <assert.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -32,6 +32,8 @@
+
+ #include <TLS_MemFile.hpp>
+
++using namespace std;
++
+ TLS_CMemFile::TLS_CMemFile (unsigned long max0)
+ {
+ buf = (char *) malloc (max0);
diff --git a/chinese/chinput3/files/patch-turbo-cin2tab b/chinese/chinput3/files/patch-turbo-cin2tab
new file mode 100644
index 000000000000..a35219d62ded
--- /dev/null
+++ b/chinese/chinput3/files/patch-turbo-cin2tab
@@ -0,0 +1,73 @@
+--- src/unicon-im/ImmModules/turbo/cin2tab.c.orig 2008-01-25 14:10:08.000000000 -0800
++++ src/unicon-im/ImmModules/turbo/cin2tab.c 2008-01-25 14:37:33.000000000 -0800
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <ctype.h> // for tolower
+ #include "xl_hzinput.h"
+ #include "xl_sysphrase.h"
+ #include "xl_phrase.h"
+@@ -194,24 +195,24 @@
+ /************** Now some basic information ************************/
+ strcpy(InpTable.magic_number,MAGIC_NUMBER);
+ cmd_arg(tt, &cmd, &arg);
+- if (strcmp(cmd,"%ename") || !(*arg) )
++ if (strcmp((const char*)cmd,"%ename") || !(*arg) )
+ print_error("%d: %%ename english_name expected", lineno);
+ arg[CIN_ENAME_LENGTH-1]=0;
+ strcpy(InpTable.ename,arg);
+
+ cmd_arg(tt, &cmd, &arg);
+- if (strcmp(cmd,"%prompt") || !(*arg) )
++ if (strcmp((const char*)cmd,"%prompt") || !(*arg) )
+ print_error("%d: %%prompt prompt_name expected", lineno);
+ arg [CIN_CNAME_LENGTH-1]=0;
+ strcpy(InpTable.cname, arg);
+
+ cmd_arg(tt,&cmd, &arg);
+- if (strcmp(cmd,"%selkey") || !(*arg) )
++ if (strcmp((const char*)cmd,"%selkey") || !(*arg) )
+ print_error("%d: %%selkey select_key_list expected", lineno);
+ strcpy(InpTable.selkey,arg);
+
+ cmd_arg(tt,&cmd, &arg);
+- if (strcmp(cmd,"%last_full") || !(*arg))
++ if (strcmp((const char*)cmd,"%last_full") || !(*arg))
+ InpTable.last_full = 1;
+ else
+ {
+@@ -222,21 +223,21 @@
+ cmd_arg(tt, &cmd, &arg);
+ }
+
+- if (strcmp(cmd,"%dupsel") || !(*arg) )
++ if (strcmp((const char*)cmd,"%dupsel") || !(*arg) )
+ print_error("%d: %%dupsel NO of dup sel keys expected", lineno);
+ InpTable.MaxDupSel=atoi(arg);
+
+ /*************** now the keyname ****************************/
+
+ cmd_arg(tt,&cmd, &arg);
+- if (strcmp(cmd,"%keyname") || strcmp(arg,"begin"))
++ if (strcmp((const char*)cmd,"%keyname") || strcmp((const char*)arg,"begin"))
+ print_error("%d: %%keyname begin expected", lineno);
+
+ TotalKeyNum=0;
+ while(1)
+ {
+ cmd_arg(tt,&cmd, &arg);
+- if (!strcmp(cmd,"%keyname")) break;
++ if (!strcmp((const char*)cmd,"%keyname")) break;
+ k = tolower(cmd[0]); /* k = char */
+ if (InpTable.KeyMap[k])
+ print_error("%d: key %c is already used",lineno, k);
+@@ -265,7 +266,7 @@
+ cmd_arg(tt,&cmd,&arg);
+ if (!cmd[0] || !arg[0])
+ break;
+- len = strlen(cmd);
++ len = strlen((const char*)cmd);
+ if (len > InpTable.MaxPress)
+ InpTable.MaxPress=len;
+ if (len > 10)