[LinuxPPS] #ifdef..

Rodolfo Giometti giometti at enneenne.com
Mon Oct 22 18:41:37 CEST 2007


On Mon, Oct 22, 2007 at 06:28:36PM +0200, Udo van den Heuvel wrote:
> Rodolfo Giometti wrote:
> > On Mon, Oct 22, 2007 at 05:37:45PM +0200, Udo van den Heuvel wrote:
> >> Rodolfo Giometti wrote:
> >>> On Sun, Oct 21, 2007 at 05:43:47PM +0200, Udo van den Heuvel wrote:
> >>>> Because an #ifdef PPS_HAVE_FINDPATH doesn't work, I now use
> >>>> #ifdef _SYS_TIMEPPS_H_. Is this OK?
> >>> No. Please, refere to the PARSE refclock and to this thread:
> >>>
> >>> 	http://ml.enneenne.com/pipermail/linuxpps/2007-August/001045.html
> >> I went all over the patch and I see no clear defines to check for.
> > 
> > You found nothing since you need _no_ defines at all! :)
> 
> Ok, but since we aim at inclusing in teh ntp tree, would it be wise to
> use #ifdefs to make `our` code be only active when LinuxPPS is around if
> `our` code behaves slightly different?

LinuxPPS is now completely RFC compliant, so "our" code should work
without ifdef at all.

After your patch is finished you should sent it to the NTP mail list
for inclusion! :)

> Also: near the #ifdef HAVE_PPSAPI around the
> time_pps_destroy(up->handle): the original code has the if clause around
> it as well.
> Why would that be? Is it really unnecessary at all times?

This is still needed since if your toolchain doesn't support PPSAPI
you cannot compile the time_pps_destroy() function.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti at enneenne.com
Linux Device Driver                             giometti at gnudd.com
Embedded Systems                     		giometti at linux.it
UNIX programming                     phone:     +39 349 2432127



More information about the LinuxPPS mailing list