# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2009/04/03 19:06:56+00:00 davehart@shiny.ad.hartbrothers.com # config.h, nt_clockstuff.c: # VC6 compatibility (thanks Martin!) # # ports/winnt/include/config.h # 2009/04/03 19:05:29+00:00 davehart@shiny.ad.hartbrothers.com +2 -1 # VC6 compatibility (thanks Martin!) # # ports/winnt/ntpd/nt_clockstuff.c # 2009/04/03 19:05:29+00:00 davehart@shiny.ad.hartbrothers.com +27 -16 # VC6 compatibility (thanks Martin!) # diff -Nr a/ports/winnt/include/config.h b/ports/winnt/include/config.h 74a75 > #undef timeval /* see sock_timeval #define and comment above */ 91a93 > #include /* time_t for timeval decl */ 98d99 < #undef timeval /* see sock_timeval #define and comment above */ diff -Nr a/ports/winnt/ntpd/nt_clockstuff.c b/ports/winnt/ntpd/nt_clockstuff.c 199a200,204 > * workaround for VC6 inability to convert unsigned __int64 to double > */ > #define LL_HNS ((LONGLONG)HECTONANOSECONDS) > > /* 205,206c210,211 < #define HNS2PERF(hns) ((hns) * PerfCtrFreq / HECTONANOSECONDS) < #define PERF2HNS(ctr) ((ctr) * HECTONANOSECONDS / PerfCtrFreq) --- > #define HNS2PERF(hns) ((hns) * PerfCtrFreq / LL_HNS) > #define PERF2HNS(ctr) ((ctr) * LL_HNS / PerfCtrFreq) 287c292 < NomPerfCtrFreq / 1e6); --- > (LONGLONG)NomPerfCtrFreq / 1e6); 583a589,594 > /* > * the cast to LONGLONG is for VC6 compatibility: > * nt_clockstuff.c(586) : error C2520: conversion from > * unsigned __int64 to double not implemented, use signed > * __int64 > */ 586c597 < PerfCtrFreq / 1e6); --- > (LONGLONG)PerfCtrFreq / 1e6); 634c645 < os_clock_precision / 1e4, --- > (LONGLONG)os_clock_precision / 1e4, 1181,1184c1192,1196 < static FT_ULL begin_time = {0}; < static FT_ULL begin_count = {0}; < static ULONGLONG next_period_time = 0; < static ULONGLONG report_systemtime = 0; --- > static FT_ULL begin_time = {0}; > static FT_ULL begin_count = {0}; > static ULONGLONG next_period_time = 0; > static ULONGLONG report_systemtime = 0; > const ULONGLONG five_minutes = 5ui64 * 60 * HECTONANOSECONDS; 1236,1237c1248 < report_systemtime = now_time.ull + < 5 * 60 * HECTONANOSECONDS; --- > report_systemtime = now_time.ull + five_minutes; 1241c1252 < report_systemtime += 5 * 60 * HECTONANOSECONDS; --- > report_systemtime += five_minutes; 1248c1259 < clock_backward_max / 10.); --- > (LONGLONG)clock_backward_max / 10.); 1334c1345 < /* nom_freq is constant over the run */ --- > /* one-time initialization */ 1337c1348 < nom_freq = NomPerfCtrFreq / 1e6; --- > nom_freq = (LONGLONG)NomPerfCtrFreq / 1e6; 1386c1397 < obs_freq = ObsPerfCtrFreq / 1e6; --- > obs_freq = (LONGLONG)ObsPerfCtrFreq / 1e6;