From: oetiker Date: Tue, 20 Oct 2009 19:25:33 +0000 (+0000) Subject: force LC_NUMERIC to C while restoring ... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cec507cc2f0b250b3215fbb27a1445a24677b724;p=rrdtool.git force LC_NUMERIC to C while restoring ... git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1940 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_restore.c b/src/rrd_restore.c index c5cbcd2..bd72ebb 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -1138,6 +1138,7 @@ int rrd_restore( char **argv) { rrd_t *rrd; + char* old_locale; #ifdef WIN32 srand((unsigned int) time(NULL)); @@ -1185,7 +1186,16 @@ int rrd_restore( return (-1); } +#ifdef HAVE_SETLOCALE + old_locale = setlocale(LC_NUMERIC, "C"); +#endif + rrd = parse_file(argv[optind]); + +#ifdef HAVE_SETLOCALE + setlocale(LC_NUMERIC, old_locale); +#endif + if (rrd == NULL) return (-1);