+* [Bug 1292] more VC6 unsigned __int64 workarounds.
(4.2.5p210) 2009/09/06 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1294] Use OPENSSL_INC and OPENSSL_LIB macros for Windows
and remove unnecessary reference to applink.c for Windows
* Helpers for converting between "hectonanoseconds" and the
* performance counter scale from which interpolated time is
* derived.
+ *
+ * Once support for VC6 is dropped, the cast of PerfCtrFreq to
+ * LONGLONG can come out of PERF2HNS(). It avoids the VC6 error
+ * message:
+ *
+ * conversion from unsigned __int64 to double not implemented, use
+ * signed __int64
*/
#define HNS2PERF(hns) ((hns) * PerfCtrFreq / LL_HNS)
-#define PERF2HNS(ctr) ((ctr) * LL_HNS / PerfCtrFreq)
+#define PERF2HNS(ctr) ((ctr) * LL_HNS / (LONGLONG)PerfCtrFreq)
#if defined(_MSC_VER) && _MSC_VER >= 1400 /* VS 2005 */
Now.ll < -60 * (LONGLONG) HECTONANOSECONDS) {
DPRINTF(1, ("ntp_timestamp_from_counter interpolated "
"time %.6fs from current\n",
- Now.ll / (double) HECTONANOSECONDS));
+ Now.ll / (double)LL_HNS));
DPRINTF(1, ("interpol time %llx from %llx\n",
InterpTimestamp,
Counterstamp));
Now.ll < -60 * (LONGLONG) HECTONANOSECONDS) {
DPRINTF(1, ("ntp_timestamp_from_counter serial driver system "
"time %.6fs from current\n",
- Now.ll / (double) HECTONANOSECONDS));
+ Now.ll / (double)LL_HNS));
exit(-1);
}
#endif
InterpTimestamp -= FILETIME_1970;
result->l_ui = JAN_1970 + (u_int32)(InterpTimestamp / HECTONANOSECONDS);
result->l_uf = (u_int32)((InterpTimestamp % HECTONANOSECONDS) *
- (FRAC / HECTONANOSECONDS));
+ (FRAC / LL_HNS));
}
#endif /* HAVE_PPSAPI */