os/lang: use the correct LC_NUMERIC also for OS X

This commit is contained in:
Björn Linse
2018-12-13 12:02:20 +01:00
parent 1cca5da05f
commit 7ba52c0b2b
2 changed files with 14 additions and 0 deletions

View File

@@ -54,6 +54,11 @@ void lang_init(void)
CFRelease(cf_lang_region);
# ifdef HAVE_LOCALE_H
setlocale(LC_ALL, "");
# ifdef LC_NUMERIC
// Make sure strtod() uses a decimal point, not a comma.
setlocale(LC_NUMERIC, "C");
# endif
# endif
}
#endif