Thread (1 message) 1 message, 1 author, 2020-02-06

Re: Printing a uint64_t portably in Git?

From: Junio C Hamano <hidden>
Date: 2020-02-06 21:11:26

Martin Ågren [off-list ref] writes:
On Thu, 6 Feb 2020 at 18:54, Han-Wen Nienhuys [off-list ref] wrote:
quoted
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);
Yup, that is used already in existing code in our codebase, so it is
just as portable as the rest of Git is ;-)

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help