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: O'Connor, Daniel
Subject: Re: [gpsd-users] FreeBSD and sys/timepps.h
Date: Thu, 8 Jan 2015 23:59:55 +1030

> On 8 Jan 2015, at 23:40, Greg Troxel <address@hidden> wrote:
> "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.

I couldn't find a way to do it with scons :(

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

FreeBSD devs are pickier about header pollution :)

> 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.

OK, turns out FreeBSD kernel PPS isn't enabled in the USB UART code anyway :)

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C




reply via email to

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