diff --git a/cpu-miner.c b/cpu-miner.c index 500730b65..66dc7b622 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -919,7 +919,7 @@ static void share_result(int result, struct work *work, const char *reason) 100. * accepted_count / (accepted_count + rejected_count), s, (((double) 0xffffffff) / (work ? work->target[7] : rpc2_target)), use_colors ? - (result ? CL_GRN "(yay!!!)" : CL_RED "(booooo)") + (result ? CL_GRN "yay!!!" : CL_RED "booooo") : (result ? "(yay!!!)" : "(booooo)")); break; default: @@ -2078,7 +2078,15 @@ static void *stratum_thread(void *userdata) static void show_version_and_exit(void) { - printf(PACKAGE_STRING "\n built on " __DATE__ "\n features:" + printf("\n built on " __DATE__ +#ifdef _MSC_VER + " with VC++ 2013\n"); +#elif defined(__GNUC__) + " with GCC"); + printf(" %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); +#endif + + printf(" features:" #if defined(USE_ASM) && defined(__i386__) " i386" #endif @@ -2113,12 +2121,19 @@ static void show_version_and_exit(void) " NEON" #endif #endif - "\n"); + "\n\n"); + /* dependencies versions */ printf("%s\n", curl_version()); #ifdef JANSSON_VERSION - printf("libjansson %s\n", JANSSON_VERSION); + printf("libjansson/%s ", JANSSON_VERSION); +#else + printf("libjansson/1.3 "); /* windows */ #endif +#ifdef PTW32_VERSION + printf("pthreads/%d.%d.%d.%d ", PTW32_VERSION); +#endif + printf("\n"); exit(0); } @@ -2525,11 +2540,7 @@ static bool has_aes_ni() static void show_credits() { printf(PROGRAM_NAME " by Lucas Jones and Tanguy Pruvot\n"); -#ifdef _MSC_VER - printf(CL_GRY " This is version " PACKAGE_VERSION ", built with VC++ 2013" CL_N "\n"); -#else printf(CL_GRY " This is version " PACKAGE_VERSION CL_N "\n"); -#endif printf(CL_GRY " based on pooler cpuminer 2.4" CL_N "\n"); } @@ -2713,7 +2724,7 @@ int main(int argc, char *argv[]) { /* main loop - simply wait for workio thread to exit */ pthread_join(thr_info[work_thr_id].pth, NULL); - applog(LOG_INFO, "workio thread dead, exiting."); + applog(LOG_WARNING, "workio thread dead, exiting."); return 0; } diff --git a/cpuminer.vcxproj b/cpuminer.vcxproj index f63e2fcd4..88cb692b9 100644 --- a/cpuminer.vcxproj +++ b/cpuminer.vcxproj @@ -82,7 +82,8 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;%(PreprocessorDefinitions) + StreamingSIMDExtensions + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;USE_AVX;USE_AVX2;USE_XOP;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;%(PreprocessorDefinitions) .;compat;compat\curl-for-windows\curl\include;compat\jansson;compat\getopt;compat\pthreads;compat\curl-for-windows\openssl\openssl\include;compat\curl-for-windows\zlib;%(AdditionalIncludeDirectories) @@ -98,7 +99,8 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;%(PreprocessorDefinitions) + AdvancedVectorExtensions + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;USE_AVX;USE_AVX2;USE_XOP;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;%(PreprocessorDefinitions) .;compat;compat\curl-for-windows\curl\include;compat\jansson;compat\getopt;compat\pthreads;compat\curl-for-windows\openssl\openssl\include;compat\curl-for-windows\zlib;%(AdditionalIncludeDirectories) @@ -120,7 +122,7 @@ false true true - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;MAXWELL_OR_FERMI=1;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;USE_AVX;USE_AVX2;USE_XOP;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;%(PreprocessorDefinitions) .;compat;compat\curl-for-windows\curl\include;compat\jansson;compat\getopt;compat\pthreads;compat\curl-for-windows\openssl\openssl\include;compat\curl-for-windows\zlib;%(AdditionalIncludeDirectories) SyncCThrow @@ -142,11 +144,11 @@ MaxSpeed MultiThreaded Speed - StreamingSIMDExtensions + AdvancedVectorExtensions false true true - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;MAXWELL_OR_FERMI=1;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;USE_AVX;USE_AVX2;USE_XOP;SCRYPT_KECCAK512;SCRYPT_CHACHA;SCRYPT_CHOOSE_COMPILETIME;%(PreprocessorDefinitions) .;compat;compat\curl-for-windows\curl\include;compat\jansson;compat\getopt;compat\pthreads;compat\curl-for-windows\openssl\openssl\include;compat\curl-for-windows\zlib;%(AdditionalIncludeDirectories) diff --git a/miner.h b/miner.h index a89463135..59782b82b 100644 --- a/miner.h +++ b/miner.h @@ -39,7 +39,6 @@ void *alloca (size_t); #endif #ifdef _MSC_VER -#define strncasecmp(x,y,z) _strnicmp(x,y,z) #define strncasecmp(x,y,z) _strnicmp(x,y,z) #define strcasecmp(x,y) _stricmp(x,y) typedef int ssize_t; diff --git a/scrypt.c b/scrypt.c index 4f9ba3ee1..489ff320d 100644 --- a/scrypt.c +++ b/scrypt.c @@ -158,7 +158,7 @@ static const uint32_t outerpad_4way[4 * 8] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000300, 0x00000300, 0x00000300, 0x00000300 }; -static const uint32_t finalblk_4way[4 * 16] __attribute__((aligned(16))) = { +static const uint32_t _ALIGN(16) finalblk_4way[4 * 16] = { 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -180,8 +180,8 @@ static const uint32_t finalblk_4way[4 * 16] __attribute__((aligned(16))) = { static inline void HMAC_SHA256_80_init_4way(const uint32_t *key, uint32_t *tstate, uint32_t *ostate) { - uint32_t ihash[4 * 8] __attribute__((aligned(16))); - uint32_t pad[4 * 16] __attribute__((aligned(16))); + uint32_t _ALIGN(16) ihash[4 * 8]; + uint32_t _ALIGN(16) pad[4 * 16]; int i; /* tstate is assumed to contain the midstate of key */ @@ -208,10 +208,10 @@ static inline void HMAC_SHA256_80_init_4way(const uint32_t *key, static inline void PBKDF2_SHA256_80_128_4way(const uint32_t *tstate, const uint32_t *ostate, const uint32_t *salt, uint32_t *output) { - uint32_t istate[4 * 8] __attribute__((aligned(16))); - uint32_t ostate2[4 * 8] __attribute__((aligned(16))); - uint32_t ibuf[4 * 16] __attribute__((aligned(16))); - uint32_t obuf[4 * 16] __attribute__((aligned(16))); + uint32_t _ALIGN(16) istate[4 * 8]; + uint32_t _ALIGN(16) ostate2[4 * 8]; + uint32_t _ALIGN(16) ibuf[4 * 16]; + uint32_t _ALIGN(16) obuf[4 * 16]; int i, j; memcpy(istate, tstate, 4 * 32); @@ -239,7 +239,7 @@ static inline void PBKDF2_SHA256_80_128_4way(const uint32_t *tstate, static inline void PBKDF2_SHA256_128_32_4way(uint32_t *tstate, uint32_t *ostate, const uint32_t *salt, uint32_t *output) { - uint32_t buf[4 * 16] __attribute__((aligned(16))); + uint32_t _ALIGN(16) buf[4 * 16]; int i; sha256_transform_4way(tstate, salt, 1); @@ -531,10 +531,10 @@ static void scrypt_1024_1_1_256(const uint32_t *input, uint32_t *output, static void scrypt_1024_1_1_256_4way(const uint32_t *input, uint32_t *output, uint32_t *midstate, unsigned char *scratchpad, int N) { - uint32_t tstate[4 * 8] __attribute__((aligned(128))); - uint32_t ostate[4 * 8] __attribute__((aligned(128))); - uint32_t W[4 * 32] __attribute__((aligned(128))); - uint32_t X[4 * 32] __attribute__((aligned(128))); + uint32_t _ALIGN(128) tstate[4 * 8]; + uint32_t _ALIGN(128) ostate[4 * 8]; + uint32_t _ALIGN(128) W[4 * 32]; + uint32_t _ALIGN(128) X[4 * 32]; uint32_t *V; int i, k; diff --git a/sha2.c b/sha2.c index 084547330..77608364e 100644 --- a/sha2.c +++ b/sha2.c @@ -471,10 +471,10 @@ void sha256d_ms_4way(uint32_t *hash, uint32_t *data, static inline int scanhash_sha256d_4way(int thr_id, uint32_t *pdata, const uint32_t *ptarget, uint32_t max_nonce, uint64_t *hashes_done) { - uint32_t data[4 * 64] __attribute__((aligned(128))); - uint32_t hash[4 * 8] __attribute__((aligned(32))); - uint32_t midstate[4 * 8] __attribute__((aligned(32))); - uint32_t prehash[4 * 8] __attribute__((aligned(32))); + uint32_t _ALIGN(128) data[4 * 64]; + uint32_t _ALIGN(32) hash[4 * 8]; + uint32_t _ALIGN(32) midstate[4 * 8]; + uint32_t _ALIGN(32) prehash[4 * 8]; uint32_t n = pdata[19] - 1; const uint32_t first_nonce = pdata[19]; const uint32_t Htarg = ptarget[7]; diff --git a/util.c b/util.c index 7c788bca4..ef4801e63 100644 --- a/util.c +++ b/util.c @@ -117,7 +117,7 @@ void applog(int prio, const char *fmt, ...) case LOG_WARNING: color = CL_YLW; break; case LOG_NOTICE: color = CL_WHT; break; case LOG_INFO: color = ""; break; - case LOG_DEBUG: color = ""; break; + case LOG_DEBUG: color = CL_GRY; break; case LOG_BLUE: prio = LOG_NOTICE;