author | Florian Forster <octo@google.com> | |
Wed, 17 Sep 2014 08:52:36 +0000 (10:52 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 18 Sep 2014 05:31:49 +0000 (07:31 +0200) | ||
commit | 2578c91335381de7cf1da589f8993e775483319e | |
tree | 6863cb179c2c93fef81e63333610b81211747094 | tree | snapshot |
parent | 647cfb174e866b21decf647f9abe8b2fa6f9803c | commit | diff |
src/collectd.c: Set the LC_NUMERIC locale to "C".
When using ASCII protocols, such as the Graphite protocol, doubles are
converted to strings using sprintf(3) and parsed with strtod(3). If the
effective locale uses something different from a dot (".") as the
decimal separator (e.g. Portuguese, German), this breaks.
This patch sets the LC_NUMERIC locale to "C" on start-up, so that
strings are produced and parsed in a well-defined manner.
Fixes: #512
When using ASCII protocols, such as the Graphite protocol, doubles are
converted to strings using sprintf(3) and parsed with strtod(3). If the
effective locale uses something different from a dot (".") as the
decimal separator (e.g. Portuguese, German), this breaks.
This patch sets the LC_NUMERIC locale to "C" on start-up, so that
strings are produced and parsed in a well-defined manner.
Fixes: #512
configure.ac | diff | blob | history | |
src/collectd.c | diff | blob | history |