summaryrefslogtreecommitdiff
path: root/wm/icewm/patches/patch-aa
blob: 5949d78b3922a66441b0c741480923115ebf6a87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-aa,v 1.9 2006/11/28 15:26:18 rillig Exp $

--- src/ylocale.cc.orig	2006-08-06 20:38:14.000000000 +0200
+++ src/ylocale.cc	2006-11-28 14:19:44.455436536 +0100
@@ -152,7 +152,11 @@ YUChar *YLocale::unicodeString(const YLC
     char * inbuf((char *) lStr), * outbuf((char *) uStr);
     size_t inlen(lLen), outlen(4 * lLen);
 
+#if defined(__NetBSD__) || defined(__sun)
+    if (0 > (int) iconv(instance->toUnicode, const_cast<const char **>(&inbuf), &inlen, &outbuf, &outlen))
+#else
     if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, &outlen))
+#endif
         warn(_("Invalid multibyte string \"%s\": %s"), lStr, strerror(errno));
 
     *((YUChar *) outbuf) = 0;