Skip to content

Commit e703937

Browse files
committed
Post-release Linux compatibility fix
Post-release Linux compatibility fix: Take care of bool and SuppressInput
1 parent fd86ae2 commit e703937

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

src/Firenzina.vcxproj

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
<ConfigurationType>Application</ConfigurationType>
3434
<UseDebugLibraries>true</UseDebugLibraries>
3535
<PlatformToolset>Intel C++ Compiler XE 13.0</PlatformToolset>
36-
<CharacterSet>MultiByte</CharacterSet>
36+
<CharacterSet>NotSet</CharacterSet>
37+
<ProfileGuidedOptimization>PGOOptimize</ProfileGuidedOptimization>
38+
<InterproceduralOptimization>true</InterproceduralOptimization>
39+
<UseIntelIPP>Sequential</UseIntelIPP>
3740
</PropertyGroup>
3841
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3942
<ConfigurationType>Application</ConfigurationType>
@@ -54,7 +57,7 @@
5457
<InterproceduralOptimization>true</InterproceduralOptimization>
5558
<UseIntelIPP>Sequential</UseIntelIPP>
5659
<UseIntelMKL>No</UseIntelMKL>
57-
<ProfileGuidedOptimization>PGOInstrument</ProfileGuidedOptimization>
60+
<ProfileGuidedOptimization>PGOOptimize</ProfileGuidedOptimization>
5861
</PropertyGroup>
5962
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
6063
<ImportGroup Label="ExtensionSettings">
@@ -85,7 +88,11 @@
8588
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8689
<ClCompile>
8790
<WarningLevel>Level3</WarningLevel>
88-
<Optimization>Disabled</Optimization>
91+
<Optimization>MaxSpeedHighLevel</Optimization>
92+
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
93+
<IntrinsicFunctions>true</IntrinsicFunctions>
94+
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
95+
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
8996
</ClCompile>
9097
<Link>
9198
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -130,7 +137,7 @@
130137
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
131138
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
132139
<C99Support>true</C99Support>
133-
<FloatingPointModel>Precise</FloatingPointModel>
140+
<FloatingPointModel>Fast2</FloatingPointModel>
134141
<VectorizerDiagnosticLevel>LoopsSuccessUnsuccessVect2</VectorizerDiagnosticLevel>
135142
<PreprocessorDefinitions>_WIN64;_MBCS;%(PreprocessorDefinitions);NOALIAS</PreprocessorDefinitions>
136143
<Parallelization>false</Parallelization>
@@ -141,23 +148,24 @@
141148
<StringPooling>true</StringPooling>
142149
<BufferSecurityCheck>false</BufferSecurityCheck>
143150
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
144-
<CheckUndimensionedArrays>false</CheckUndimensionedArrays>
151+
<CheckUndimensionedArrays>true</CheckUndimensionedArrays>
145152
<DisableIntelLangExtensions>false</DisableIntelLangExtensions>
146153
<OptimizeForWindowsApplication>true</OptimizeForWindowsApplication>
147-
<StructMemberAlignment>Default</StructMemberAlignment>
154+
<StructMemberAlignment>8Bytes</StructMemberAlignment>
148155
<DisableSpecificWarnings>
149156
</DisableSpecificWarnings>
150157
<OmitFramePointers>true</OmitFramePointers>
151158
<CallingConvention>FastCall</CallingConvention>
152159
<Optimization>MaxSpeedHighLevel</Optimization>
153160
<ExceptionHandling>Sync</ExceptionHandling>
154161
<DisableLanguageExtensions>false</DisableLanguageExtensions>
162+
<CompileAs>CompileAsC</CompileAs>
155163
</ClCompile>
156164
<Link>
157-
<GenerateDebugInformation>true</GenerateDebugInformation>
165+
<GenerateDebugInformation>false</GenerateDebugInformation>
158166
<EnableCOMDATFolding>true</EnableCOMDATFolding>
159167
<OptimizeReferences>true</OptimizeReferences>
160-
<SubSystem>Console</SubSystem>
168+
<SubSystem>NotSet</SubSystem>
161169
<InterproceduralOptimization>true</InterproceduralOptimization>
162170
</Link>
163171
</ItemDefinitionGroup>

src/SMP_init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ typedef struct
5353
t_args ARGS[MaxCPUs];
5454
volatile int init_threads;
5555
volatile int io_init;
56-
static boolean SMPInit = false;
56+
static bool SMPInit = false;
5757
static int CurrCPUs = 0;
58-
static boolean volatile Destroy;
59-
static boolean volatile Destroyed;
58+
static bool volatile Destroy;
59+
static bool volatile Destroyed;
6060
typePos* volatile Working[MaxCPUs];
6161

6262
void EndSMP()

src/fire.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,14 @@ volatile bool Stop;
335335
volatile bool UCINewGame;
336336

337337
#ifdef FischerRandom
338-
boolean Chess960;
338+
bool Chess960;
339339
uint8 Chess960KingRookFile;
340340
uint8 Chess960QueenRookFile;
341341
uint8 Chess960KingFile;
342342
#endif
343343

344344
#ifdef Bench
345-
boolean BenchMarking;
345+
bool BenchMarking;
346346
#endif
347347

348348
bool Ponder;

src/utility.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ bool TryInput()
261261
int v;
262262
fd_set fd[1];
263263
struct timeval tv[1];
264-
if (SupressInput)
264+
if (SuppressInput)
265265
return false;
266266
if (!SearchIsDone && StallInput)
267267
return false;

src/win-linux.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ GNU General Public License for more details.
2929
You should have received a copy of the GNU General Public License
3030
along with this program. If not, see http://www.gnu.org/licenses/.
3131
*******************************************************************************/
32-
32+
#include "fire.h" // added by YC 01/29/2014 to provide bool
3333
#if defined(_WIN32) || defined(_WIN64)
3434
#include <windows.h>
3535
#define NomeWindows
@@ -59,7 +59,7 @@ typedef __int8 sint8;
5959
typedef __int16 sint16;
6060
typedef __int32 sint32;
6161
typedef __int64 sint64;
62-
typedef unsigned __int8 boolean;
62+
typedef unsigned __int8 bool;
6363
typedef unsigned __int8 uint8;
6464
typedef unsigned __int16 uint16;
6565
typedef unsigned __int32 uint32;

0 commit comments

Comments
 (0)