mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-26 12:06:22 +08:00
Use Windows threads library with mingw
Instead of Posix threads. This seems to fix time losses of the gcc compiled version for Windows. The patch replaces the MSVC specific _MSC_VER flag with _WIN32 and _WIN64 that are defined both by MSVC and mingw-gcc. Workaround found by Jim Ablett. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#if !defined(LOCK_H_INCLUDED)
|
||||
#define LOCK_H_INCLUDED
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
|
||||
# include <pthread.h>
|
||||
|
||||
@@ -42,7 +42,10 @@ typedef pthread_t ThreadHandle;
|
||||
|
||||
#else
|
||||
|
||||
#define NOMINMAX // disable macros min() and max()
|
||||
#if !defined(NOMINMAX)
|
||||
# define NOMINMAX // disable macros min() and max()
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
|
||||
Reference in New Issue
Block a user