pkgsrc/devel/exempi/patches/patch-ab
hasso 3839bb6078 Make this patch NetBSD only unbreaking other platforms. GNU iconv switched
to use char** by default as well some time ago.
2008-11-19 09:30:26 +00:00

28 lines
1 KiB
Text

$NetBSD: patch-ab,v 1.2 2008/11/19 09:30:26 hasso Exp $
--- ./source/XMPFiles/FormatSupport/Reconcile_Impl.cpp.orig 2008-02-22 21:22:00 +0200
+++ ./source/XMPFiles/FormatSupport/Reconcile_Impl.cpp
@@ -254,7 +254,11 @@ void ReconcileUtils::UTF8ToLatin1 ( cons
size_t outLen = utf8Len * 4;
char * buf = (char *)calloc( outLen, 1 );
char * out = buf;
+ #ifdef __NetBSD__
+ size_t converted = iconv( cd, (const char **)&in, &inLen, &out, &outLen );
+ #else
size_t converted = iconv( cd, &in, &inLen, &out, &outLen );
+ #endif
iconv_close( cd );
latin1->assign ( (const char *)buf, outLen );
@@ -411,7 +415,11 @@ void ReconcileUtils::Latin1ToUTF8 ( cons
size_t outLen = latin1Len * 4;
char * buf = (char *)calloc( outLen, 1 );
char * out = buf;
+ #ifdef __NetBSD__
+ size_t converted = iconv( cd, (const char **)&in, &inLen, &out, &outLen );
+ #else
size_t converted = iconv( cd, &in, &inLen, &out, &outLen );
+ #endif
iconv_close( cd );
utf8->assign ( (const char *)buf, outLen );