From 4ced43ba2bc376bf667ade1b2fef618e100e3140 Mon Sep 17 00:00:00 2001 From: troky Date: Wed, 3 Dec 2014 23:07:14 +0100 Subject: [PATCH] MSVS fix. --- algorithm/neoscrypt.c | 5 +++-- miner.h | 2 +- winbuild/dist/include/config.h | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/algorithm/neoscrypt.c b/algorithm/neoscrypt.c index 8cccc2c9..2c65735b 100644 --- a/algorithm/neoscrypt.c +++ b/algorithm/neoscrypt.c @@ -1177,7 +1177,8 @@ void neoscrypt(const uchar *password, uchar *output, uint profile) { r = (1 << ((profile >> 5) & 0x7)); } - uchar stack[(N + 3) * r * 2 * SCRYPT_BLOCK_SIZE + stack_align]; + uchar *stack; + stack = (uchar *)malloc((N + 3) * r * 2 * SCRYPT_BLOCK_SIZE + stack_align); /* X = r * 2 * SCRYPT_BLOCK_SIZE */ X = (uint *) &stack[stack_align & ~(stack_align - 1)]; /* Z is a copy of X for ChaCha */ @@ -1284,7 +1285,7 @@ void neoscrypt(const uchar *password, uchar *output, uint profile) { #endif } - + free(stack); } void neoscrypt_regenhash(struct work *work) diff --git a/miner.h b/miner.h index 57032077..206d2763 100644 --- a/miner.h +++ b/miner.h @@ -1491,7 +1491,7 @@ extern void kill_work(void); //helper macro to preserve existing code #ifndef switch_pools - #define switch_pools(p) __switch_pools(p, TRUE) + #define switch_pools(p) __switch_pools(p, true) #endif extern void __switch_pools(struct pool *selected, bool saveprio); diff --git a/winbuild/dist/include/config.h b/winbuild/dist/include/config.h index 3d41858c..f9ee9a31 100644 --- a/winbuild/dist/include/config.h +++ b/winbuild/dist/include/config.h @@ -67,11 +67,11 @@ #endif -#define VERSION "v5.0.1" +#define VERSION "v5.1.0" #define PACKAGE_NAME "sgminer" #define PACKAGE_TARNAME "sgminer" -#define PACKAGE_VERSION "5.0.1" -#define PACKAGE_STRING "sgminer 5.0.1" +#define PACKAGE_VERSION "5.1.0" +#define PACKAGE_STRING "sgminer 5.1.0" #define PACKAGE "sgminer" #define SGMINER_PREFIX ""