mirror of
https://git.sr.ht/~sircmpwn/mkproof
synced 2024-09-22 05:10:42 +02:00
Use PRIx64 on mingw-w64 instead llx
mingw-w64 is able to work with old enough Microsoft C runtimes which don't support %llx. However, all versions of mingw-w64 do have inttypes.h, so use it (PRIx64 is shimmed for other platforms, since inttypes.h is a C99 header).
This commit is contained in:
parent
ec465c85fd
commit
6d8620941f
@ -20,6 +20,12 @@
|
||||
#include <string.h>
|
||||
#include "argon2.h"
|
||||
#include "core.h"
|
||||
#ifdef __MINGW32__
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
/* Don't use <inttypes.h> (it's not C89) */
|
||||
#define PRIx64 "llx"
|
||||
#endif
|
||||
|
||||
void initial_kat(const uint8_t *blockhash, const argon2_context *context,
|
||||
argon2_type type) {
|
||||
@ -115,7 +121,7 @@ void internal_kat(const argon2_instance_t *instance, uint32_t pass) {
|
||||
: ARGON2_QWORDS_IN_BLOCK;
|
||||
|
||||
for (j = 0; j < how_many_words; ++j)
|
||||
printf("Block %.4u [%3u]: %016llx\n", i, j,
|
||||
printf("Block %.4u [%3u]: %016" PRIx64 "\n", i, j,
|
||||
(unsigned long long)instance->memory[i].v[j]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user