X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;h=a3b1b0324c8ee20357fb515294696d9b9befb240;hp=2a0c95b798473d350e951dc29e4b49c2600f8e3d;hb=fd35d92c1e639d22ed10fb225272f08bd9afc885;hpb=78e6b361c5a6763b81f29cb06f62f8e4af9aaddf diff --git a/src/misc.cpp b/src/misc.cpp index 2a0c95b7..a3b1b032 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#if defined(_MSC_VER) +#if defined(_WIN32) || defined(_WIN64) #define _CRT_SECURE_NO_DEPRECATE #define NOMINMAX // disable macros min() and max() @@ -40,13 +40,10 @@ #endif #include -#include -#include #include #include #include -#include "bitcount.h" #include "misc.h" #include "thread.h" @@ -55,7 +52,7 @@ using namespace std; /// Version number. If Version is left empty, then Tag plus current /// date (in the format YYMMDD) is used as a version number. -static const string Version = "2.2.1"; +static const string Version = ""; static const string Tag = ""; @@ -116,7 +113,7 @@ void dbg_print() { int system_time() { -#if defined(_MSC_VER) +#if defined(_WIN32) || defined(_WIN64) struct _timeb t; _ftime(&t); return int(t.time * 1000 + t.millitm); @@ -132,7 +129,7 @@ int system_time() { int cpu_count() { -#if defined(_MSC_VER) +#if defined(_WIN32) || defined(_WIN64) SYSTEM_INFO s; GetSystemInfo(&s); return std::min(int(s.dwNumberOfProcessors), MAX_THREADS); @@ -156,9 +153,9 @@ int cpu_count() { /// timed_wait() waits for msec milliseconds. It is mainly an helper to wrap /// conversion from milliseconds to struct timespec, as used by pthreads. -void timed_wait(WaitCondition* sleepCond, Lock* sleepLock, int msec) { +void timed_wait(WaitCondition& sleepCond, Lock& sleepLock, int msec) { -#if defined(_MSC_VER) +#if defined(_WIN32) || defined(_WIN64) int tm = msec; #else struct timeval t;