From 37bbbc2a43b6cf3994c51c7458cc03849fd2152e Mon Sep 17 00:00:00 2001 From: "David L. Dawes" Date: Fri, 25 May 2018 02:33:10 +0000 Subject: [PATCH] Conditional compilation so that Windows, Mac and Linux compile from single (messy) file. --- .gitignore | 1 + src/crypto/haraka.h | 4 ++++ src/miner.cpp | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index e5751db76..ca3d15c12 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ src/univalue/gen .deps .dirstamp +.idea .libs .*.swp *.*~* diff --git a/src/crypto/haraka.h b/src/crypto/haraka.h index 203f8fbf6..1cb5ea662 100644 --- a/src/crypto/haraka.h +++ b/src/crypto/haraka.h @@ -30,7 +30,11 @@ Optimized Implementations for Haraka256 and Haraka512 #define NUMROUNDS 5 +#ifdef _WIN32 +typedef unsigned long long u64; +#else typedef unsigned long u64; +#endif typedef __m128i u128; extern u128 rc[40]; diff --git a/src/miner.cpp b/src/miner.cpp index a1419ed96..cfdacb7b5 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1223,7 +1223,11 @@ void static BitcoinMiner_noeq() if ((UintToArith256(pblock->nNonce) & mask) == mask) { +#ifdef _WIN32 + printf("%llu mega hashes complete - working\n", (ASSETCHAINS_NONCEMASK[ASSETCHAINS_ALGO] + 1) / 1048576); +#else printf("%lu mega hashes complete - working\n", (ASSETCHAINS_NONCEMASK[ASSETCHAINS_ALGO] + 1) / 1048576); +#endif break; }