Fix windows builds, use portable setenv

This commit is contained in:
Robin Gareus 2022-10-11 15:05:27 +02:00
parent 43a9ae7458
commit 664f6768f2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -277,12 +277,12 @@ int main (int argc, char *argv[])
} }
} else { } else {
/* Force-disable localization if the user wishes so; /* Force-disable localization if the user wishes so;
just calling setlocale (...,"C") is not sufficient for this; * just calling setlocale (...,"C") is not sufficient for this;
it is probably the LANG env var which gets picked up later somewhere. * it is probably the LANG env var which gets picked up later somewhere.
*/ */
g_setenv ("LC_ALL", "C", 1); Glib::setenv ("LC_ALL", "C", true);
g_setenv ("LC_MESSAGES", "C", 1); Glib::setenv ("LC_MESSAGES", "C", true);
g_setenv ("LANG", "C", 1); Glib::setenv ("LANG", "C", true);
} }
#endif #endif