Re: Printing a uint64_t portably in Git?

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

 



On Thu, Feb 6, 2020 at 7:00 PM Martin Ågren <martin.agren@xxxxxxxxx> wrote:
>
> On Thu, 6 Feb 2020 at 18:54, Han-Wen Nienhuys <hanwen@xxxxxxxxxx> 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);

Looks like the inttypes.h standard has the defines that I want.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux