From 88cdc587be7784eb2fefe295855eb07299b1feff Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Sun, 15 Jun 2014 17:28:53 +0200 Subject: [PATCH] fix build after merge --- src/Makefile | 24 +----------------------- src/main.cpp | 2 +- src/misc.cpp | 2 +- src/uci.cpp | 22 +++++++++++----------- 4 files changed, 14 insertions(+), 36 deletions(-) diff --git a/src/Makefile b/src/Makefile index 22d6a279175..361a2f1e39e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -188,25 +188,12 @@ endif ifeq ($(COMP),clang) comp=clang CXX=clang++ - profile_prepare = gcc-profile-prepare - profile_make = gcc-profile-make - profile_use = gcc-profile-use - profile_clean = gcc-profile-clean + CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra -Wshadow endif ifeq ($(COMP),emscripten) comp=clang CXX=em++ - profile_prepare = gcc-profile-prepare - profile_make = gcc-profile-make - profile_use = gcc-profile-use - profile_clean = gcc-profile-clean -endif - -### 3.2 General compiler settings -CXXFLAGS = -Wall -Wcast-qual -fno-exceptions -fno-rtti $(EXTRACXXFLAGS) - -ifeq ($(comp),gcc) CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra -Wshadow endif @@ -222,21 +209,13 @@ else profile_clean = gcc-profile-clean endif -<<<<<<< HEAD ifeq ($(COMP),emscripten) CXXFLAGS += -s TOTAL_MEMORY=67108864 endif -### 3.3 General linker settings -LDFLAGS = $(EXTRALDFLAGS) - -ifeq ($(comp),mingw) - LDFLAGS += -static-libstdc++ -static-libgcc -======= ifeq ($(UNAME),Darwin) CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.6 LDFLAGS += -arch $(arch) -mmacosx-version-min=10.6 ->>>>>>> stockfish/sf_5_base endif ifeq ($(COMP),emscripten) @@ -294,7 +273,6 @@ ifeq ($(optimize),yes) endif ifeq ($(comp),clang) - ### -O4 requires a linker that supports LLVM's LTO ifeq ($(COMP),emscripten) CXXFLAGS += -O2 LDFLAGS += -O2 diff --git a/src/main.cpp b/src/main.cpp index 2cf3030a8ff..7225cbec12d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,7 +40,7 @@ extern "C" void init() { Pawns::init(); Eval::init(); Threads.init(); - TT.set_size(Options["Hash"]); + TT.resize(Options["Hash"]); UCI::commandInit(); } diff --git a/src/misc.cpp b/src/misc.cpp index b5a14dbed2a..ebbb778a85d 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -28,7 +28,7 @@ using namespace std; /// Version number. If Version is left empty, then compile date in the format /// DD-MM-YY and show in engine_info. -static const string Version = ""; +static const string Version = "5"; /// engine_info() returns the full name of the current Stockfish version. This diff --git a/src/uci.cpp b/src/uci.cpp index ce6f28d4914..16675682ed2 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -177,13 +177,13 @@ void UCI::command(const string& cmd) { ss << Options["Hash"] << " " << Options["Threads"] << " " << depth << " current " << token; - benchmark(pos, ss); + benchmark(currentPos, ss); } else if (token == "key") sync_cout << hex << uppercase << setfill('0') - << "position key: " << setw(16) << pos.key() - << "\nmaterial key: " << setw(16) << pos.material_key() - << "\npawn key: " << setw(16) << pos.pawn_key() + << "position key: " << setw(16) << currentPos.key() + << "\nmaterial key: " << setw(16) << currentPos.material_key() + << "\npawn key: " << setw(16) << currentPos.pawn_key() << dec << nouppercase << setfill(' ') << sync_endl; else if (token == "uci") @@ -193,16 +193,16 @@ void UCI::command(const string& cmd) { else if (token == "eval") { - Search::RootColor = pos.side_to_move(); // Ensure it is set - sync_cout << Eval::trace(pos) << sync_endl; + Search::RootColor = currentPos.side_to_move(); // Ensure it is set + sync_cout << Eval::trace(currentPos) << sync_endl; } else if (token == "ucinewgame") TT.clear(); - else if (token == "go") go(pos, is); - else if (token == "position") position(pos, is); + else if (token == "go") go(currentPos, is); + else if (token == "position") position(currentPos, is); else if (token == "setoption") setoption(is); - else if (token == "flip") pos.flip(); - else if (token == "bench") benchmark(pos, is); - else if (token == "d") sync_cout << pos.pretty() << sync_endl; + else if (token == "flip") currentPos.flip(); + else if (token == "bench") benchmark(currentPos, is); + else if (token == "d") sync_cout << currentPos.pretty() << sync_endl; else if (token == "isready") sync_cout << "readyok" << sync_endl; else sync_cout << "Unknown command: " << cmd << sync_endl;