summaryrefslogtreecommitdiff
path: root/wm/icewm/patches/patch-aa
blob: c29fe62dcf09553e9004d519e109aadf0b267553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-aa,v 1.12 2014/01/05 12:29:33 ryoon Exp $

* Support NetBSD's iconv(3)

--- src/ylocale.cc.orig	2008-01-05 07:34:25.000000000 +0000
+++ src/ylocale.cc
@@ -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;