diff options
-rw-r--r-- | src/harvid.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/harvid.c b/src/harvid.c index ac3bc74..4061428 100644 --- a/src/harvid.c +++ b/src/harvid.c @@ -24,6 +24,7 @@ #include <math.h> #include <sys/stat.h> #include <libgen.h> // basename +#include <locale.h> #include "daemon_log.h" #include "daemon_util.h" @@ -375,6 +376,12 @@ int main (int argc, char **argv) { #endif } + char const* const current_c_locale = setlocale (LC_NUMERIC, 0); + if (strcmp ("C", current_c_locale) != 0) { + dlog(DLOG_INFO, "Setting locate to 'C' for portable numerics.\n"); + setlocale (LC_NUMERIC, "C"); + } + /* all systems go */ dlog(DLOG_INFO, "Initialization complete. Starting server.\n"); |