blob: 7a8bb34fdc67bba25b987491fd8d09d41be9a884 [file] [log] [blame] [edit]
--- phc-winner-argon2-20171227/src/genkat.c.orig 2018-12-28 08:57:15.812848200 -0500
+++ phc-winner-argon2-20171227/src/genkat.c 2018-12-28 09:08:09.242252500 -0500
@@ -20,6 +20,9 @@
#include <string.h>
#include "argon2.h"
#include "core.h"
+#ifdef __MINGW32__
+#include "inttypes.h"
+#endif
void initial_kat(const uint8_t *blockhash, const argon2_context *context,
argon2_type type) {
@@ -115,7 +118,11 @@ void internal_kat(const argon2_instance_
: ARGON2_QWORDS_IN_BLOCK;
for (j = 0; j < how_many_words; ++j)
+#ifdef __MINGW32__
+ printf("Block %.4u [%3u]: %016" PRIX64 "\n", i, j,
+#else
printf("Block %.4u [%3u]: %016llx\n", i, j,
+#endif
(unsigned long long)instance->memory[i].v[j]);
}
}
--- phc-winner-argon2-20171227/src/core.c.orig 2019-01-01 00:44:58.473678000 -0500
+++ phc-winner-argon2-20171227/src/core.c 2019-01-01 00:47:37.278003800 -0500
@@ -16,7 +16,7 @@
*/
/*For memory wiping*/
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__MINGW32__)
#include <windows.h>
#include <winbase.h> /* For SecureZeroMemory */
#endif
--- phc-winner-argon2-20171227/src/blake2/blake2-impl.h.orig 2019-01-01 00:50:03.010067200 -0500
+++ phc-winner-argon2-20171227/src/blake2/blake2-impl.h 2019-01-01 00:51:14.953859400 -0500
@@ -21,7 +21,7 @@
#include <stdint.h>
#include <string.h>
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__MINGW32__)
#define BLAKE2_INLINE __inline
#elif defined(__GNUC__) || defined(__clang__)
#define BLAKE2_INLINE __inline__
--- phc-winner-argon2-20171227/src/bench.c.orig 2017-12-27 14:56:31.000000000 -0500
+++ phc-winner-argon2-20171227/src/bench.c 2019-01-01 07:15:46.159196500 -0500
@@ -20,14 +20,14 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#ifdef _MSC_VER
+#if defined( _MSC_VER) || defined(__MINGW32__)
#include <intrin.h>
#endif
#include "argon2.h"
static uint64_t rdtsc(void) {
-#ifdef _MSC_VER
+#if defined( _MSC_VER) || defined(__MINGW32__)
return __rdtsc();
#else
#if defined(__amd64__) || defined(__x86_64__)