mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
New wrapper macro for printf("%zu"), for old VS compat.
A user reports that Visual Studio 2013 and earlier have printf implementations in their C library that don't support the 'z' modifier to indicate that an integer argument is size_t. The 'I' modifier apparently works in place of it. To avoid littering ifdefs everywhere, I've invented my own inttypes.h style macros to wrap size_t formatting directives, which are defined to %zu and %zx normally, or %Iu and %Ix in old-VS mode. Those are in defs.h, and they're used everywhere that a %z might otherwise get into the Windows build.
This commit is contained in:
@ -1421,8 +1421,8 @@ char *ssh1_pubkey_str(RSAKey *key)
|
||||
|
||||
dec1 = mp_get_decimal(key->exponent);
|
||||
dec2 = mp_get_decimal(key->modulus);
|
||||
buffer = dupprintf("%zd %s %s%s%s", mp_get_nbits(key->modulus), dec1, dec2,
|
||||
key->comment ? " " : "",
|
||||
buffer = dupprintf("%"SIZEu" %s %s%s%s", mp_get_nbits(key->modulus),
|
||||
dec1, dec2, key->comment ? " " : "",
|
||||
key->comment ? key->comment : "");
|
||||
sfree(dec1);
|
||||
sfree(dec2);
|
||||
|
Reference in New Issue
Block a user