Subject: icewm broken in pkgsrc-2004Q4
To: None <netbsd-users@netbsd.org>
From: Florian Stoehr <netbsd@wolfnode.de>
List: netbsd-users
Date: 12/22/2004 20:13:59
I got casting errors with this package.

Anybody else seeing this?

Attached is a patch, adding a const_cast<>. If this is not considered a 
"hack", someone might please add this patch to icewm.

Haven't tried whether that also happens to -current pkgsrc.

Perhaps it's useful for others. Don't flame me if it causes any troubles.

-Florian

--- ylocale.cc  2004-08-16 06:58:31.000000000 +0200
+++ ylocale.cc  2004-12-22 19:17:53.000000000 +0100
@@ -152,7 +152,7 @@
      char * inbuf((char *) lStr), * outbuf((char *) uStr);
      size_t inlen(lLen), outlen(4 * lLen);

-    if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, 
&outlen))
+    if (0 > (int) iconv(instance->toUnicode, const_cast<const 
char**>(&inbuf), &inlen, &outbuf, &outlen))
         warn(_("Invalid multibyte string \"%s\": %s"), lStr, 
strerror(errno));

      *((YUChar *) outbuf) = 0;