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

Martin Burnicki martin.burnicki at meinberg.de
Fri Aug 23 14:08:06 UTC 2013

Michael Tatarinov wrote:
 > Yes, SHM driver is commented out but look at refclock_shm.c. The shm
> refclock supports Windows and it's added over 15 year ago (according
> to the BitKeeper).
> ps. I don't know if it works?

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


#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 Burnicki

Meinberg Funkuhren
Bad Pyrmont

More information about the questions mailing list