From 0bc2faa19e54d137eec0d5cc926b29288c81c1b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sat, 11 Jun 2022 20:07:08 +0200 Subject: Haiku support for getExecutablePath diff --git a/external/libutil/libs/common/src/getExecutablePath.cpp b/external/libutil/libs/common/src/getExecutablePath.cpp index 6cd69b5..6e3d4d1 100644 --- a/external/libutil/libs/common/src/getExecutablePath.cpp +++ b/external/libutil/libs/common/src/getExecutablePath.cpp @@ -121,6 +121,25 @@ std::string getExecutablePath() return ec ? "" : p.make_preferred().string(); } +#elif(BOOST_OS_HAIKU) + +# include + +std::string getExecutablePath() +{ + std::string ret; + int32 cookie = 0; + image_info info; + while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) + { + if (info.type == B_APP_IMAGE) + { + ret = info.name; + } + } + return ret; +} + #else # error Unsupported plattform! -- 2.36.1 From 9ba7557aecb9cba0c944b5eaf8495371d1f6e079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sat, 11 Jun 2022 20:38:09 +0200 Subject: Locale fix diff --git a/external/libutil/libs/common/src/LocaleHelper.cpp b/external/libutil/libs/common/src/LocaleHelper.cpp index 3b6ed4b..a06baf1 100644 --- a/external/libutil/libs/common/src/LocaleHelper.cpp +++ b/external/libutil/libs/common/src/LocaleHelper.cpp @@ -78,6 +78,12 @@ std::locale createUtf8Locale() // Don't change the locale on OSX. Using "" fails with 'locale::facet::_S_create_c_locale name not valid' return LocaleHelper::getBfsDefaultLocale(); } +#elif BOOST_OS_HAIKU +std::locale createUtf8Locale() +{ + // Don't change the locale on HAIKU. Using "" fails with 'locale::facet::_S_create_c_locale name not valid' + return LocaleHelper::getBfsDefaultLocale(); +} #else std::locale createUtf8Locale() { -- 2.36.1