mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-22 11:04:51 -04:00
19 lines
692 B
Plaintext
19 lines
692 B
Plaintext
$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;
|