Re: Printing a uint64_t portably in Git?
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- Feb 6, 2020, 18:00 UTC
- Message-ID
- <CAN0heSqoU1NxOtwaE_ZBBzghLXAeC4CxVh1x8R-efOVtbHdA5g@mail.gmail.com>
- In-Reply-To
- <CAFQ2z_Pac6yb9Vi782VMtPkssNmdc08WntS7xRt8KCFfM6KVsw@mail.gmail.com>
On Thu, 6 Feb 2020 at 18:54, Han-Wen Nienhuys <hanwen@google.com> wrote:
> What is the right incantation to do printf of a uint64_t on OSX ? > > Apparently PRIuMAX is to be used for "uintmax_t", and not for "long > long unsigned int".
You could cast it? Grepping around, that seems to be how PRIuMAX is used:
printf("%"PRIuMAX"\n", (uintmax_t)var);Martin