[Top][All Lists]

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

Re: [gpsd-dev] several messages

From: Greg Troxel
Subject: Re: [gpsd-dev] several messages
Date: Sat, 23 Jul 2016 10:20:52 -0400
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (berkeley-unix)

Fred Wright <address@hidden> writes:

> On Fri, 22 Jul 2016, Greg Troxel wrote:
>> "Gary E. Miller" <address@hidden> writes:
>> > We aim to have gpsd run on 32 bit and 64 bit systems.  RasPi's, Odroid's
>> > and BBB's currently are 32 bit only.
>> That really shouldn't be an issue.    32-bit CPUs of various kinds have
>> implemented both uint64_t and double (the longer of the two normal
>> IEEE754 types) for a long time.   The thing to be careful about is to
> Yes, as long as it's C99 or later.

I forgot that, but surely C99 is an ok restriction and one we probably
have already.

>> use uint64_t if you want a 64-bit type, and not to assume that that int,
> Mostly yes, except that the 64-bit fixed types tend to be "long" on a
> 64-bit platform and "long long" on a 32-bit platform, so if you want to
> use *printf you need a bitness-dependent format string.  I sometimes use
> "long long" directly to avoid that.

PRIu64 :-)  Agreed, but to write portable code with fixed-width types,
one basicallyy has to use the PRI specifiers.  It's a little ugly, but
not hard.

Attachment: signature.asc
Description: PGP signature

reply via email to

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