Skip to content

Commit

Permalink
Fixed msvc build.
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockoS committed Oct 19, 2015
1 parent 4fdcc87 commit b9fc7dc
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 32 deletions.
14 changes: 14 additions & 0 deletions platform/windows/config_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#pragma warning(disable : 4996)

#include <Windows.h>
#include <io.h>

#include <stdlib.h>
#include <stdio.h>
Expand All @@ -31,6 +32,19 @@
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#define snprintf _snprintf
#define access _access

// access mode names.
#ifndef R_OK
#define R_OK 0x02
#endif
#ifndef W_OK
#define W_OK 0x04
#endif
// X_OK does not exist on msvc
#ifndef F_OK
#define F_OK 0x00
#endif

#include "getopt_win.h"
#include "stdint.h"
Expand Down
39 changes: 21 additions & 18 deletions platform/windows/etripator.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand All @@ -39,7 +41,7 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\build\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)\obj\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\build\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)\obj\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
Expand All @@ -51,13 +53,13 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
Expand All @@ -66,6 +68,7 @@
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
</Link>
<BuildLog>
<Path>$(OutDir)\$(MSBuildProjectName).log</Path>
Expand Down Expand Up @@ -118,19 +121,19 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\config.h" />
<ClCompile Include="..\..\message.h" />
<ClCompile Include="..\..\decode.h" />
<ClCompile Include="..\..\cfg.h" />
<ClCompile Include="..\..\section.h" />
<ClCompile Include="..\..\opcodes.h" />
<ClCompile Include="..\..\labels.h" />
<ClCompile Include="..\..\labelsloader.h" />
<ClCompile Include="..\..\irq.h" />
<ClCompile Include="..\..\memory.h" />
<ClCompile Include="..\..\memorymap.h" />
<ClCompile Include="..\..\rom.h" />
<ClCompile Include="..\..\cd.h" />
<ClCompile Include="..\..\options.h" />
<ClInclude Include="..\..\message.h" />
<ClInclude Include="..\..\decode.h" />
<ClInclude Include="..\..\cfg.h" />
<ClInclude Include="..\..\section.h" />
<ClInclude Include="..\..\opcodes.h" />
<ClInclude Include="..\..\labels.h" />
<ClInclude Include="..\..\labelsloader.h" />
<ClInclude Include="..\..\irq.h" />
<ClInclude Include="..\..\memory.h" />
<ClInclude Include="..\..\memorymap.h" />
<ClInclude Include="..\..\rom.h" />
<ClInclude Include="..\..\cd.h" />
<ClInclude Include="..\..\options.h" />
<ClInclude Include="config_win.h" />
<ClInclude Include="getopt_win.h" />
<ClInclude Include="inttypes.h" />
Expand All @@ -139,4 +142,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
28 changes: 14 additions & 14 deletions platform/windows/etripator.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\config.h" />
<ClCompile Include="..\..\message.h" />
<ClCompile Include="..\..\decode.h" />
<ClCompile Include="..\..\cfg.h" />
<ClCompile Include="..\..\section.h" />
<ClCompile Include="..\..\opcodes.h" />
<ClCompile Include="..\..\labels.h" />
<ClCompile Include="..\..\labelsloader.h" />
<ClCompile Include="..\..\irq.h" />
<ClCompile Include="..\..\memory.h" />
<ClCompile Include="..\..\memorymap.h" />
<ClCompile Include="..\..\rom.h" />
<ClCompile Include="..\..\cd.h" />
<ClCompile Include="..\..\options.h" />
<ClInclude Include="getopt_win.h">
<Filter>platform\windows</Filter>
</ClInclude>
Expand All @@ -57,5 +44,18 @@
<ClInclude Include="config_win.h">
<Filter>platform\windows</Filter>
</ClInclude>
<ClInclude Include="..\..\cfg.h" />
<ClInclude Include="..\..\cd.h" />
<ClInclude Include="..\..\decode.h" />
<ClInclude Include="..\..\irq.h" />
<ClInclude Include="..\..\labels.h" />
<ClInclude Include="..\..\labelsloader.h" />
<ClInclude Include="..\..\memory.h" />
<ClInclude Include="..\..\memorymap.h" />
<ClInclude Include="..\..\message.h" />
<ClInclude Include="..\..\opcodes.h" />
<ClInclude Include="..\..\options.h" />
<ClInclude Include="..\..\rom.h" />
<ClInclude Include="..\..\section.h" />
</ItemGroup>
</Project>
</Project>

0 comments on commit b9fc7dc

Please sign in to comment.