gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] FreeBSD and sys/timepps.h


From: Greg Troxel
Subject: Re: [gpsd-users] FreeBSD and sys/timepps.h
Date: Thu, 08 Jan 2015 08:10:49 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (berkeley-unix)

"O'Connor, Daniel" <address@hidden> writes:

> +++ SConstruct  2015-01-06 14:20:31.594917587 +1030@@ -517,7 +509,7 @@
>      env["bluez"] = False
>
>  # ntpshm is required for pps support
> -if env['pps'] and env['ntpshm'] and config.CheckHeader("sys/timepps.h"):
> +if env['pps'] and env['ntpshm'] and (config.CheckHeader("sys/timepps.h") or 
> os.uname()[0] == "FreeBSD"):
>      confdefs.append("#define HAVE_SYS_TIMEPPS_H 1\n")
>      announce("You have kernel PPS available.")
>  else:

I think it's best to avoid os-specific kludges.  It would be far better
to make scons do the right thing, perhaps by checking for sys/types
earlier.   I wouldn't be surprised if it's ok to always include
sys/types.h before sys/timepps.h, on all platforms.

FWIW, the current code builds on NetBSD (not sure why since the PPS code
has common ancestry, I think).

You will find that pps won't work once you get past this, though,
because the current code assumes the Linux flavor of PPS (not the
IETF-specificed one) is always present.  (It will build, because I fixed
the ifdefs, but the logic is still wrong.)   There are comments in the
file about this.

Attachment: pgpj568BNIY1q.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]