mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge remote-tracking branch 'teor/bug26986'
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (compilation):
|
||||
- Use Windows-compatible format strings in tor-print-ed-signing-cert.c.
|
||||
Fixes bug 26986; bugfix on master.
|
||||
@@ -100,6 +100,16 @@ typedef int32_t ssize_t;
|
||||
# define TOR_PRIuSZ "zu"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef _WIN64
|
||||
# define TOR_PRIdSZ PRId64
|
||||
# else
|
||||
# define TOR_PRIdSZ PRId32
|
||||
# endif
|
||||
#else
|
||||
# define TOR_PRIdSZ "zd"
|
||||
#endif
|
||||
|
||||
#ifndef SSIZE_MAX
|
||||
#if (SIZEOF_SIZE_T == 4)
|
||||
#define SSIZE_MAX INT32_MAX
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "ed25519_cert.h"
|
||||
#include "lib/cc/torint.h" /* TOR_PRIdSZ */
|
||||
#include "lib/crypt_ops/crypto_format.h"
|
||||
#include "lib/malloc/malloc.h"
|
||||
|
||||
@@ -49,8 +50,8 @@ main(int argc, char **argv)
|
||||
|
||||
ssize_t parsed = ed25519_cert_parse(&cert, certbuf, cert_body_len);
|
||||
if (parsed <= 0) {
|
||||
fprintf(stderr, "ed25519_cert_parse failed with return value %zd\n",
|
||||
parsed);
|
||||
fprintf(stderr, "ed25519_cert_parse failed with return value %" TOR_PRIdSZ
|
||||
"\n", parsed);
|
||||
return -5;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user