git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Printing a uint64_t portably in Git?

From
MÅ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
Previous: Han-Wen NienhuysNext: Han-Wen Nienhuys
Message 2 of 5 in “Printing a uint64_t portably in Git?”
  1. Han-Wen NienhuysFeb 6, 2020
  2. Martin ÅgrenFeb 6, 2020
  3. Han-Wen NienhuysFeb 6, 2020
  4. Martin ÅgrenFeb 6, 2020
  5. Junio C HamanoFeb 6, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.