From: ThorstenB Date: Mon, 18 Jul 2011 18:29:11 +0000 (+0200) Subject: Fix locale setting for Windows X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=116c487384f16a560da5cdfe096381e776fd4319;p=simgear.git Fix locale setting for Windows --- diff --git a/simgear/scene/tsync/terrasync.cxx b/simgear/scene/tsync/terrasync.cxx index 0c28a46c..357390cc 100644 --- a/simgear/scene/tsync/terrasync.cxx +++ b/simgear/scene/tsync/terrasync.cxx @@ -563,18 +563,21 @@ int SGTerraSync::SvnThread::svnClientSetup(void) if (_svn_pool) return EXIT_SUCCESS; // No, so initialize svn internals generally - /* svn_cmdline_init configures the locale. Setup environment to ensure the - * default "C" locale remains active, since fgfs isn't locale aware - especially - * requires "." as decimal point in strings containing floating point varibales. */ - setenv("LC_ALL", "C", 1); - #ifdef _MSC_VER // there is a segfault when providing an error stream. // Apparently, calling setvbuf with a nul buffer is // not supported under msvc 7.1 ( code inside svn_cmdline_init ) if (svn_cmdline_init("terrasync", 0) != EXIT_SUCCESS) return EXIT_FAILURE; + + // revert locale setting + setlocale(LC_ALL,"C"); #else + /* svn_cmdline_init configures the locale. Setup environment to ensure the + * default "C" locale remains active, since fgfs isn't locale aware - especially + * requires "." as decimal point in strings containing floating point varibales. */ + setenv("LC_ALL", "C", 1); + if (svn_cmdline_init("terrasync", stderr) != EXIT_SUCCESS) return EXIT_FAILURE; #endif