$NetBSD: patch-aa,v 1.2 2007/01/13 13:02:54 joerg Exp $

--- KasumiWord.cxx.orig	2005-09-01 08:01:45.000000000 +0000
+++ KasumiWord.cxx
@@ -17,24 +17,28 @@ iconv_t KasumiWord::IconvEUCJP_To_UTF8 =
 string KasumiWord::convertUTF8ToEUCJP(const string &aUTF8){
   char *utf8 = (char*)malloc(strlen(aUTF8.c_str())+1);
   strcpy(utf8, aUTF8.c_str());
+  ICONV_CONST char *ptr_utf8 = utf8;
   size_t len = strlen(utf8)+1;
   size_t len_eucjp = len*2;
   char *eucjp_buf = (char*)malloc(len_eucjp);
   char *eucjp = eucjp_buf;
 
-  iconv(IconvUTF8_To_EUCJP, &utf8, &len, &eucjp_buf, &len_eucjp);
+  iconv(IconvUTF8_To_EUCJP, &ptr_utf8, &len, &eucjp_buf, &len_eucjp);
   return string(eucjp);
 }
 
 string KasumiWord::convertEUCJPToUTF8(const string &aEUCJP){
   char *eucjp = (char*)malloc(strlen(aEUCJP.c_str())+1);
   strcpy(eucjp, aEUCJP.c_str());
+  ICONV_CONST char *ptr_eucjp = eucjp;
+
   size_t len = strlen(eucjp)+1;
   size_t len_utf8 = len*2;
   char *utf8_buf = (char*)malloc(len_utf8);
   char *utf8 = utf8_buf;
 
-  iconv(IconvEUCJP_To_UTF8, &eucjp, &len, &utf8_buf, &len_utf8);
+
+  iconv(IconvEUCJP_To_UTF8, &ptr_eucjp, &len, &utf8_buf, &len_utf8);
   return string(utf8);
 }
 
