* to months. These "kludges" make it compatible with pre 1.31
* Baculas.
*/
- static char *mod[] = {"n", "seconds", "months", "minutes",
- "hours", "days", "weeks", "quarters", "years", NULL};
- static int32_t mult[] = {60, 1, 60*60*24*30, 60,
+ static const char *mod[] = {"n", "seconds", "months", "minutes",
+ "hours", "days", "weeks", "quarters", "years", NULL};
+ static const int32_t mult[] = {60, 1, 60*60*24*30, 60,
60*60, 60*60*24, 60*60*24*7, 60*60*24*91, 60*60*24*365};
char mod_str[20];
int mod_len;
if (errno != 0 || value < 0) {
return 0;
}
+#if defined(HAVE_WIN32)
+ /* work around microsofts non handling of uint64 to double cvt*/
+ *rtn_value = (uint64_t)(value * (__int64)mult[i]);
+ Dmsg2(400, "Full value = %lf %" lld "\n", value * (__int64)mult[i],
+ (uint64_t)(value * (__int64)mult[i]));
+#else
*rtn_value = (uint64_t)(value * mult[i]);
Dmsg2(400, "Full value = %lf %" lld "\n", value * mult[i],
(uint64_t)(value * mult[i]));
+#endif
return 1;
}