Re: PRI?64 vs Visual Studio (2022)

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-11-19T09:20:45Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Test PRI* macros even when we can't test NLS translation.

  2. Avoid requiring Spanish locale to test NLS infrastructure.

  3. Drop support for MSVCRT's float formatting quirk.

  4. Drop support for MSVCRT's %I64 format strings.

  5. Use PRI?64 instead of "ll?" in format strings (continued).

  6. Use <stdint.h> and <inttypes.h> for c.h integers.

  7. Make float exponent output on Windows look the same as elsewhere.

On 19.11.25 03:13, Thomas Munro wrote:
> Interesting report though.  Commit 962da900 assumed that our in-tree
> printf implementation still needed to understand that %I64 stuff in
> case it came to us from system headers, but it looks like it
> disappeared with MSVCRT:
> 
> 1. I checked with CI (VS 2019).  puts(PRId64) prints out "lld".
> 2. MinGW's inttypes.h[1] only uses "I64" et al if you build against MSVCRT.
> 
> So I think we should delete that stuff.  Attached.

Looks good to me.