Re: [chrony-dev] timepps.h and chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Sat, Jan 21, 2012 at 11:04:06AM -0800, Bill Unruh wrote:
> Perhaps it would be a good idea to include the file timepps.h into the chrony
> source files, and use it instead of the one that is supposed to be in
> /usr/include. a)It seems on a variety of systems, timepps.h is in a
> variety of places (eg /usr/include/linux instead of /usr/include
> where chrony looks for it. ntp
> in their source code has their own version which looks for timepps.h in a
> variety of possible places. chrony might do the same)

The configure script in current git looks for timepps.h in
/usr/include and /usr/include/sys, similarly to what ntp does.

> b) timepps.h does not seem to be included in at least some distributions which
> have the pps_core etc modules and thus support the pps api. For those it would
> be good to have timepps.h in the chrony sources.

Yeah, there doesn't seem to be a good place where to put the file.
It's a wrapper for the ioctls to provide the API specified by the PPS
RFC and ideally the implementation would be in a dynamic library, not
in a header. And it doesn't belong to the kernel or glibc.

Some distributions now have a pps-tools(-devel) package which includes
the header.  Perhaps someone can submit a new package to Mandriva?

> Ie, the refclock drivers could look for chrony-timepps.h locally which looks
> in /usr/include, /usr/include/linux and finally locally in the chrony sources.

Instead of including and maintaining such system specific file I'd
rather add a link to the documentation where it can be found.

> I ran into this with Mandriva 2010.x and 2011 which has the pps_core but does
> not have the timepps.h anywhere. Of course what happened was that configure
> found that the test program did not compile and simply removed the pps as an
> option. This is compounded by the fact that earlier versions of
> Mandriva have pps_core module but
> did not even have /usr/include/linux/pps.h But it would seems that
> pps.h is pretty useless without timepps.h as well, but
> I may be wrong.

You'll probably need also the pps_ldisc module, some earlier kernels
didn't have it.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/