index c5cbcd2dffae485242236e9bd7793dd45054a604..cefdfaea1da699431e1d234256468a9cea04df4b 100644 (file)
/*****************************************************************************
- * RRDtool 1.3.8 Copyright by Tobi Oetiker, 1997-2009
+ * RRDtool 1.3.9 Copyright by Tobi Oetiker, 1997-2009
* This file: Copyright 2008 Florian octo Forster
* Distributed under the GPL
*****************************************************************************
#include <string.h>
#include <ctype.h>
#include <fcntl.h>
+#include <locale.h>
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
#include <math.h>
status = get_ulong_from_node(doc, child,
&rrd->stat_head->pdp_step);
else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0) {
- if (sizeof(time_t) == sizeof(long)) {
+ if (sizeof(time_t) == sizeof(int)) {
status = get_long_from_node(doc, child, (long *)&rrd->live_head->last_up);
}
else { if (sizeof(time_t) == sizeof(long long)) {
char **argv)
{
rrd_t *rrd;
+ char* old_locale;
#ifdef WIN32
srand((unsigned int) time(NULL));
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);