Don't try to use "fr-FR" locale, because check for its existence is

broken with musl: https://www.openwall.com/lists/musl/2017/11/08/1.
This commit is contained in:
levlam 2021-12-24 15:12:14 +03:00
parent f7588582cd
commit 5f965a1ea4
2 changed files with 2 additions and 6 deletions

View File

@ -54,7 +54,6 @@
#include <algorithm>
#include <atomic>
#include <clocale>
#include <cstdio>
#include <cstdlib>
#include <ctime>
@ -4669,8 +4668,7 @@ void main(int argc, char **argv) {
ClientManager::set_log_message_callback(0, on_log_message);
init_openssl_threads();
const char *locale_name = (std::setlocale(LC_ALL, "fr-FR") == nullptr ? "C" : "fr-FR");
std::locale new_locale(locale_name);
std::locale new_locale("C");
std::locale::global(new_locale);
SCOPE_EXIT {
std::locale::global(std::locale::classic());

View File

@ -43,7 +43,6 @@
#include <algorithm>
#include <atomic>
#include <clocale>
#include <limits>
#include <locale>
#include <unordered_map>
@ -476,8 +475,7 @@ static void test_to_double() {
TEST(Misc, to_double) {
test_to_double();
const char *locale_name = (std::setlocale(LC_ALL, "fr-FR") == nullptr ? "C" : "fr-FR");
std::locale new_locale(locale_name);
std::locale new_locale("C");
auto host_locale = std::locale::global(new_locale);
test_to_double();
new_locale = std::locale::global(std::locale::classic());