gpsd-dev
[Top][All Lists]
Advanced

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

Re: long long unsigned on 32-bit machines


From: Gary E. Miller
Subject: Re: long long unsigned on 32-bit machines
Date: Mon, 27 Jan 2020 12:24:22 -0800

Yo Hal!

On Sat, 25 Jan 2020 23:42:21 -0800
Hal Murray <address@hidden> wrote:

> There are at least 2 ways to fix that.
> 
> There are a bunch of symbols to handle this mess: PRIu64 and friends
> are defined in /usr/include/inttypes.h  It's
> 
> /usr/include/inttypes.h:# define PRIu64         __PRI64_PREFIX "u"

I tried that.  A bunch of older compilers barf on PRIu64.  Yes, it is POSIX
2001, but implementation is still marginal.

> You can cast the thing you want to print to (unsigned) long long and
> use ll.
> 
> printf("%llu"\n", (unsigned long long)t);

What is what I had to convert the PRIu64 back to for things to compile.

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: pgpkYn4G9bVHy.pgp
Description: OpenPGP digital signature


reply via email to

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