- Use setenv for LC_NUMERIC since setlocale gets reset by the libraries on some systems.

This commit is contained in:
Braden Obrzut 2013-12-13 03:00:35 -05:00
parent 10c312f55c
commit 12d45bbc33
1 changed files with 6 additions and 1 deletions

View File

@ -257,7 +257,12 @@ int main (int argc, char **argv)
#if defined(__MACH__) && !defined(NOASM)
unprotect_rtext();
#endif
// Set LC_NUMERIC environment variable in case some library decides to
// clear the setlocale call at least this will be correct.
// Note that the LANG environment variable is overridden by LC_*
setenv ("LC_NUMERIC", "C", 1);
#ifndef NO_GTK
GtkAvailable = gtk_init_check (&argc, &argv);
#endif