wrap unistd.h with compile switch

This commit is contained in:
JPoirier 2015-06-07 23:24:34 -05:00
parent 0e58d1a23d
commit cc0882d830
3 changed files with 12 additions and 12 deletions

View file

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 11
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "picoc", "picoc.vcxproj", "{C0156FB3-55AB-4F82-8A97-A776DFC57951}"
EndProject
Global
@ -9,8 +11,8 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C0156FB3-55AB-4F82-8A97-A776DFC57951}.Debug|Win32.ActiveCfg = Debug|Win32
{C0156FB3-55AB-4F82-8A97-A776DFC57951}.Debug|Win32.Build.0 = Debug|Win32
{C0156FB3-55AB-4F82-8A97-A776DFC57951}.Debug|Win32.ActiveCfg = Release|Win32
{C0156FB3-55AB-4F82-8A97-A776DFC57951}.Debug|Win32.Build.0 = Release|Win32
{C0156FB3-55AB-4F82-8A97-A776DFC57951}.Release|Win32.ActiveCfg = Release|Win32
{C0156FB3-55AB-4F82-8A97-A776DFC57951}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -10,9 +10,7 @@
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and '$(VisualStudioVersion)' == ''">$(VCTargetsPath11)</VCTargetsPath>
</PropertyGroup>
<PropertyGroup Label="Globals" />
<PropertyGroup Label="Globals">
<ProjectGuid>{C0156FB3-55AB-4F82-8A97-A776DFC57951}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
@ -22,13 +20,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@ -64,14 +62,14 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>

View file

@ -38,7 +38,6 @@
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdarg.h>
#include <setjmp.h>
@ -58,6 +57,7 @@
/* host platform includes */
#ifdef UNIX_HOST
# include <stdint.h>
# include <unistd.h>
# ifndef NO_FP
# include <math.h>
# define USE_READLINE