diff options
author | Niels de Vos <ndevos@redhat.com> | 2014-11-15 23:40:14 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-11-16 22:55:45 -0800 |
commit | ca5d23c8f62eb38ea98fbb63b06f72c21ce17c87 (patch) | |
tree | d05c6afc2d9c58603aa5ee8edc4bd622a215e4c0 /libglusterfs | |
parent | b01660c5d7cf4a59a85a8edc3c816e4585aa211b (diff) |
Use C-locale for numeric/string conversion routines
(strtod, ...) or config file parsing might fail.
Cherry picked from commit 5b8de971a4b81bc2bd6de0ffc6386587226295c6:
> Change-Id: I649f29bbf87222399a0c2d1ed5a3bf136c613b9b
> BUG: 1117951
> Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
> Reviewed-on: http://review.gluster.org/8299
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Prashanth Pai <ppai@redhat.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Change-Id: I649f29bbf87222399a0c2d1ed5a3bf136c613b9b
BUG: 1157107
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9132
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/logging.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index e82e0247234..ab7b96a54d4 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -501,6 +501,7 @@ gf_openlog (const char *ident, int option, int facility) /* TODO: Should check for errors here and return appropriately */ setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); /* C-locale for strtod, ... */ /* close the previous syslog if open as we are changing settings */ closelog (); openlog(ident, _option, _facility); |