From ad64a8b8facbb4321aa11626e10533b4d06adf40 Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 18 Mar 2020 18:02:41 +0000 Subject: Adjust iconv use --- wm/blackbox70/distinfo | 4 ++-- wm/blackbox70/patches/patch-lib_Unicode.cc | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/wm/blackbox70/distinfo b/wm/blackbox70/distinfo index b4266d81afd..186090bae00 100644 --- a/wm/blackbox70/distinfo +++ b/wm/blackbox70/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.15 2019/10/08 02:59:59 gutteridge Exp $ +$NetBSD: distinfo,v 1.16 2020/03/18 18:02:41 joerg Exp $ SHA1 (blackbox-0.75.tar.lz) = 65713441b2b5d0f496729ca65d6d609d40e1fcc4 RMD160 (blackbox-0.75.tar.lz) = cc1362a45e292dccfbcaf03bc0a508a27bf64980 @@ -10,7 +10,7 @@ SHA1 (patch-doc_nl__NL_Makefile.in) = 5f7df3158b59633fd9633656237f4fd5cdace897 SHA1 (patch-doc_sl__SI_Makefile.in) = d116093a717a14d8e0b252f0254f7fb03e37f0a1 SHA1 (patch-lib_Image.cc) = ab49da02853b670843f4884517f0727d4569d50a SHA1 (patch-lib_Menu.cc) = b16a7439fa5db1d287e5353ec5986a9c3ffd6cfb -SHA1 (patch-lib_Unicode.cc) = b2936e86dab0e4d0104312b5a387081a3fa02134 +SHA1 (patch-lib_Unicode.cc) = 7a13e7822a9af71c97b24e167394d87a65e8be73 SHA1 (patch-src_Screen.cc) = 7a75160a66eb6317930af063514688c6e5028569 SHA1 (patch-src_Toolbar.cc) = 2fdcea33eff7b6a99f22ce7a77c9b713b4f005b5 SHA1 (patch-src_main.cc) = 24f43276e20f8fb89c6cb478e5e1bf52ea3eb659 diff --git a/wm/blackbox70/patches/patch-lib_Unicode.cc b/wm/blackbox70/patches/patch-lib_Unicode.cc index 37d60e645a4..ffc39836664 100644 --- a/wm/blackbox70/patches/patch-lib_Unicode.cc +++ b/wm/blackbox70/patches/patch-lib_Unicode.cc @@ -1,24 +1,45 @@ -$NetBSD: patch-lib_Unicode.cc,v 1.1 2018/10/12 18:00:55 he Exp $ +$NetBSD: patch-lib_Unicode.cc,v 1.2 2020/03/18 18:02:41 joerg Exp $ ---- lib/Unicode.cc.orig 2016-07-10 16:31:38.000000000 +0000 +--- lib/Unicode.cc.orig 2014-08-30 08:23:20.000000000 +0000 +++ lib/Unicode.cc -@@ -83,8 +83,8 @@ namespace bt { +@@ -35,6 +35,9 @@ + # include + #endif + ++#ifdef __NetBSD__ ++#include ++#endif + + namespace bt { + +@@ -83,9 +86,13 @@ namespace bt { if (cd == invalid) return; - char *inp = - reinterpret_cast ++#if defined(__NetBSD__) && (__NetBSD_Version__-0 < 999001700) + const char *inp = + reinterpret_cast (const_cast(in.data())); ++#else ++ char *inp = const_cast(reinterpret_cast((in.data()))); ++#endif const typename _Source::size_type in_size = in.size() * sizeof(typename _Source::value_type); -@@ -109,7 +109,7 @@ namespace bt { + typename _Source::size_type in_bytes = in_size; +@@ -108,9 +115,13 @@ namespace bt { + case EINVAL: { const typename _Source::size_type off = in_size - in_bytes + 1; ++#if defined(__NetBSD__) && (__NetBSD_Version__-0 < 999001700) inp = - reinterpret_cast + reinterpret_cast (const_cast(in.data())); ++#else ++ inp = const_cast(reinterpret_cast((in.data()))); ++#endif in_bytes = in_size - off; break; + } -- cgit v1.2.3