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: Paul Fertser
Subject: Re: long long unsigned on 32-bit machines
Date: Sun, 26 Jan 2020 09:59:01 +0300
User-agent: Mutt/1.10.1 (2018-07-13)

Hi,

On Sun, Jan 26, 2020 at 02:40:25PM +0800, Sanjeev Gupta wrote:
> -       unsigned long i;         // unsigned long just in case ints are 32-bit
> +       uint64_t i;         // uint64_t just in case ints are 32-bit
...
> If I change the format to %llu , the build on 32-bit works, but then, on a

For fixed-width integer types dedicated format specifiers[0] should be
used, in this case it's PRIu64

> BTW, is anyone else running on 32-bits, in production?

Many ARM-based SBCs are not aarch64, so I'd guess yes.

[0] https://en.wikipedia.org/wiki/Stdint.h#Printf_and_scanf_format_specifiers
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:address@hidden



reply via email to

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