[ntp:questions] Start of new GPS 1024 week epoch

David Taylor david-taylor at blueyonder.co.uk.invalid
Sat Aug 24 16:08:04 UTC 2013

On 23/08/2013 15:08, Martin Burnicki wrote:
> Indeed. I've just enabled the SHM refclock in the config.h file for
> Windows, tried to build it with VS2008, and found that it builds after I
> had fixed a tiny bug, a missing semicolon.
> However, I have also no idea if it works.
> David, if you want to give it a try you can simply unpack the current
> -dev version. Then:
> 1.) Open the solution (.sln file) in Visual Studio
> 2.) Open the file ports\winnt\include\config.h, search for CLOCK_SHM,
> and change the line
> #undef CLOCK_SHM
> to
> #define CLOCK_SHM
> 3.) Edit ntpd/refclock_shm.c and look around line 177. There is a line
> starting with
> msyslog(LOG_ERR, "SHM MapViewOfFile ...
> and at the end of this line a semicolon is missing. Just add it and the
> project should at least compile.
> As said above, don't know if it works, though, and don't know if there
> is another program which can feed the SHM driver under Windows.
> If this turns out to work I can submit the fix to the code base.
> Martin


Thanks for that - the start of good news, I hope.  I can confirm your 
findings - as-supplied, there is an error in ntpd/refclock_shm.c which 
prevent compilation, but that's easily fixed just as you described and I 
also now have an ntpd.exe which has compiled correctly.  The fault 
should certainly have a bug-report submitted.

Unfortunately, I don't have any programs which could write into shared 
memory, so perhaps we would need to find a simple driver (the NMEA seems 
an possible choice to me as many devices can drive that) and convert it 
to shared memory operation.  I have a non-critical Windows XP box I 
could test on.  Would the first step, though, be to see a FreeBSD or 
Linux driver converted and working in SHM mode, and then provide similar 
modifications to the Windows driver?

Web: http://www.satsignal.eu

More information about the questions mailing list