projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The bookkeeping of all threads is not necessary, since we cannot pthread_join() them...
[rrdtool.git]
/
src
/
rrd_restore.c
diff --git
a/src/rrd_restore.c
b/src/rrd_restore.c
index
ab8b138
..
e9363c6
100644
(file)
--- a/
src/rrd_restore.c
+++ b/
src/rrd_restore.c
@@
-31,7
+31,18
@@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
-#include <unistd.h>
+
+
+#ifndef WIN32
+# include <unistd.h> /* for off_t */
+#else
+# define random() rand()
+# define srandom(x) srand(x)
+# define getpid() 0
+ typedef size_t ssize_t;
+ typedef long off_t;
+#endif
+
#include <fcntl.h>
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
# include <io.h>
#include <fcntl.h>
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
# include <io.h>
@@
-132,6
+143,13
@@
static int get_double_from_node(
return (-1);
}
return (-1);
}
+ if (strstr(str_ptr, "NaN") != NULL)
+ {
+ *value = DNAN;
+ xmlFree(str_ptr);
+ return 0;
+ }
+
end_ptr = NULL;
temp = strtod(str_ptr, &end_ptr);
xmlFree(str_ptr);
end_ptr = NULL;
temp = strtod(str_ptr, &end_ptr);
xmlFree(str_ptr);