gpsd-dev
[Top][All Lists]
Advanced

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

Re: Invalid position given by Telit HE910-EUG


From: Gary E. Miller
Subject: Re: Invalid position given by Telit HE910-EUG
Date: Mon, 6 Apr 2020 17:31:06 -0700

Yo Greg!

On Sun, 05 Apr 2020 19:19:23 -0400
Greg Troxel <address@hidden> wrote:

> >> That build/run should obviously be conditional on not doing cross
> >> compliation, with the usage either skipped or somehow worked
> >> around if so.  
> >
> > It has to be run, somehow.  Ideas and/or patches welcome.  
> 
> Well, really you are saying, I think, that when gpsd runs, it needs to
> be able to know if time_t is more or less int32_t or int64_t.  That is
> not the same as needing to run a program at build time.


I spent some time googling, and found an idea similar to yours that
does not need fancy compiler flags:

        #include <time.h>

        int main(int argc, char **argv) {
            static int test_array[1 - 2 * ((long int) sizeof(time_t) < 8 )];
            test_array[0] = 0;
            (void) argc; (void) argv;
            return 0;
        }

That fails to compile if sizeof(time_t) < 8.

Cute huh?  Fix pushed.

Any other C cross-compile issues?  I know there are some Python ones left.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpLQP8MuqVow.pgp
Description: OpenPGP digital signature


reply via email to

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