summaryrefslogtreecommitdiff
path: root/wm/icewm/patches/patch-af
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2005-01-13 01:31:53 +0000
committerxtraeme <xtraeme>2005-01-13 01:31:53 +0000
commit0fd58d4048d67da22537f8d2d5c5881d6c5693ed (patch)
treef5334a9f6f27c61a64d97a68a74b3c647814d5d7 /wm/icewm/patches/patch-af
parent9ef9e69ccaf8b8cd288bfc0858844c8fa1ce4888 (diff)
downloadpkgsrc-0fd58d4048d67da22537f8d2d5c5881d6c5693ed.tar.gz
Fix the icewm* packages on NetBSD >= 2.0 (with native iconv(3)), the
problem was that the prototype used by this was not matching the NetBSD one, which uses ``const char **'' as its second argument, when libiconv and POSIX uses ``char **''. This closes PR pkg/28693. Bumped PKGREVISION to all icewm* pkgs for the bulk builds.
Diffstat (limited to 'wm/icewm/patches/patch-af')
-rw-r--r--wm/icewm/patches/patch-af24
1 files changed, 24 insertions, 0 deletions
diff --git a/wm/icewm/patches/patch-af b/wm/icewm/patches/patch-af
new file mode 100644
index 00000000000..5720d0a3851
--- /dev/null
+++ b/wm/icewm/patches/patch-af
@@ -0,0 +1,24 @@
+$NetBSD: patch-af,v 1.11 2005/01/13 01:31:53 xtraeme Exp $
+
+--- src/ylocale.cc.orig 2004-08-16 06:58:31.000000000 +0200
++++ src/ylocale.cc 2005-01-13 02:25:55.000000000 +0100
+@@ -15,6 +15,7 @@
+
+ #include "intl.h"
+ #include <string.h>
++#include <sys/param.h> /* __NetBSD_Version__ */
+
+ #ifdef CONFIG_I18N
+ #include <errno.h>
+@@ -152,7 +153,11 @@
+ char * inbuf((char *) lStr), * outbuf((char *) uStr);
+ size_t inlen(lLen), outlen(4 * lLen);
+
++#if __NetBSD_Version__ >= 200000000
++ if (0 > (int) iconv(instance->toUnicode, (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;