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: Fri, 09 Jan 2015 09:19:26 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (berkeley-unix)

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

>> 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 :(

I actually looked, and found that:

  1) on NetBSD, one needs sys/time.h before sys/timepps.h

  2) SConstruct seems to deal with this as the test:

    if config.CheckHeader(["sys/time.h", "sys/timepps.h"]):
        confdefs.append("#define HAVE_SYS_TIMEPPS_H 1\n")
        kpps = True

    So, there seems to be a mechanism to check a string of headers, at
    least two.

>> 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 :)

It's not just that.  It's also the gpsd code.

To get PPS working over usb serial, apply this patch (of course it won't
apply, but it's a clue):

http://mail-index.netbsd.org/source-changes/2014/07/25/msg056749.html

Attachment: pgpeBPHgo3IaD.pgp
Description: PGP signature


reply via email to

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