head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.52 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.50 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.48 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.46 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.44 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.42 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.40 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.38 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.36 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.34 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.32 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.30 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.28 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.26 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.24 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.22 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.20 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.18 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.16 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.14 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.12 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.10 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.8 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.6 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.2 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.4 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.1.0.6 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.4 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.2 pkgsrc-2019Q1-base:1.1; locks; strict; comment @// @; 1.2 date 2019.10.25.09.56.51; author kamil; state Exp; branches; next 1.1; commitid 8GLd4lr89WxDteIB; 1.1 date 2019.01.01.17.19.58; author nia; state Exp; branches; next ; commitid gWaxC8ktQ3GLt66B; desc @@ 1.2 log @dolphin-emu: Fix build on NetBSD 9.99.17 Adapt the local patch for the POSIX iconv(3) API change in new NetBSD. @ text @$NetBSD: patch-Source_Core_Common_StringUtil.cpp,v 1.1 2019/01/01 17:19:58 nia Exp $ Support NetBSD. --- Source/Core/Common/StringUtil.cpp.orig 2016-06-24 08:09:07.000000000 +0000 +++ Source/Core/Common/StringUtil.cpp @@@@ -28,6 +28,15 @@@@ #include #endif +#if defined(__NetBSD__) +#include +#if __NetBSD_Prereq__(9,99,17) +#define NETBSD_POSIX_ICONV 1 +#else +#define NETBSD_POSIX_ICONV 0 +#endif +#endif + #if !defined(_WIN32) && !defined(ANDROID) static locale_t GetCLocale() { @@@@ -121,11 +130,11 @@@@ bool CharArrayFromFormatV(char* out, int c_locale = _create_locale(LC_ALL, "C"); writtenCount = _vsnprintf_l(out, outsize, format, c_locale, args); #else - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__NetBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif writtenCount = vsnprintf(out, outsize, format, args); - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__NetBSD__) uselocale(previousLocale); #endif #endif @@@@ -162,12 +171,12 @@@@ std::string StringFromFormatV(const char std::string temp = buf; delete[] buf; #else - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__NetBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif if (vasprintf(&buf, format, args) < 0) ERROR_LOG(COMMON, "Unable to allocate memory for string"); - #if !defined(ANDROID) + #if !defined(ANDROID) && !defined(__NetBSD__) uselocale(previousLocale); #endif @@@@ -427,8 +436,13 @@@@ std::string CodeToUTF8(const char* fromc while (src_bytes != 0) { +#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV + size_t const iconv_result = iconv(conv_desc, (const char**)(&src_buffer), &src_bytes, + &dst_buffer, &dst_bytes); +#else size_t const iconv_result = iconv(conv_desc, (char**)(&src_buffer), &src_bytes, &dst_buffer, &dst_bytes); +#endif if ((size_t)-1 == iconv_result) { @ 1.1 log @dolphin-emu: Import version 5.0 Dolphin is an emulator for two recent Nintendo video game consoles: the GameCube and the Wii. It allows PC gamers to enjoy games for these two consoles in full HD (1080p) with several enhancements: compatibility with all PC controllers, turbo speed, networked multiplayer, and even more! @ text @d1 1 a1 1 $NetBSD$ d7 17 a23 1 @@@@ -121,11 +121,11 @@@@ bool CharArrayFromFormatV(char* out, int d37 1 a37 1 @@@@ -162,12 +162,12 @@@@ std::string StringFromFormatV(const char d52 1 a52 1 @@@@ -427,8 +427,13 @@@@ std::string CodeToUTF8(const char* fromc d56 1 a56 1 +#ifdef __NetBSD__ @