#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
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);
}
/* Set the RRA pointer to a random location */
- cur_rra_ptr->cur_row = random() % cur_rra_def->row_cnt;
+ cur_rra_ptr->cur_row = rrd_random() % cur_rra_def->row_cnt;
return (status);
} /* int parse_tag_rra */
{
rrd_t *rrd;
- srandom((unsigned int) time(NULL) + (unsigned int) getpid());
/* init rrd clean */
optind = 0;
opterr = 0; /* initialize getopt */