兼容VC编译器
This commit is contained in:
parent
2dd269fd9e
commit
5447220c29
|
@ -499,6 +499,9 @@ int String::CompareTo(const String& s) const
|
|||
return CompareTo(s._Arr, s._Length, false);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
int String::CompareTo(cstring cstr, int len, bool ignoreCase) const
|
||||
{
|
||||
if(len < 0) len = strlen(cstr);
|
||||
|
@ -944,6 +947,7 @@ int String::Compare(const void* v1, const void* v2)
|
|||
|
||||
/******************************** 辅助 ********************************/
|
||||
|
||||
#ifndef _MSC_VER
|
||||
extern char* itoa(int value, char *string, int radix)
|
||||
{
|
||||
return ltoa(value, string, radix) ;
|
||||
|
@ -987,6 +991,7 @@ extern char* ltoa(Int64 value, char* string, int radix)
|
|||
|
||||
return string;
|
||||
}
|
||||
#endif
|
||||
|
||||
char* utohex(uint value, byte size, char* string, bool upper)
|
||||
{
|
||||
|
@ -1011,6 +1016,7 @@ char* utohex(uint value, byte size, char* string, bool upper)
|
|||
return string;
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
extern char* utoa(uint value, char* string, int radix)
|
||||
{
|
||||
return ultoa(value, string, radix ) ;
|
||||
|
@ -1043,6 +1049,7 @@ extern char* ultoa(UInt64 value, char* string, int radix)
|
|||
|
||||
return string;
|
||||
}
|
||||
#endif
|
||||
|
||||
char *dtostrf (double val, byte prec, char* str)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup />
|
||||
<ItemGroup />
|
||||
</Project>
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmartOS", "SmartOS.vcxproj", "{6C0D43A8-8411-48F3-989E-51C5379A5563}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6C0D43A8-8411-48F3-989E-51C5379A5563}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{6C0D43A8-8411-48F3-989E-51C5379A5563}.Debug|x86.Build.0 = Debug|Win32
|
||||
{6C0D43A8-8411-48F3-989E-51C5379A5563}.Release|x86.ActiveCfg = Release|Win32
|
||||
{6C0D43A8-8411-48F3-989E-51C5379A5563}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Core\Array.cpp" />
|
||||
<ClCompile Include="..\Core\Buffer.cpp" />
|
||||
<ClCompile Include="..\Core\ByteArray.cpp" />
|
||||
<ClCompile Include="..\Core\DateTime.cpp" />
|
||||
<ClCompile Include="..\Core\Delegate.cpp" />
|
||||
<ClCompile Include="..\Core\Dictionary.cpp" />
|
||||
<ClCompile Include="..\Core\Environment.cpp" />
|
||||
<ClCompile Include="..\Core\List.cpp" />
|
||||
<ClCompile Include="..\Core\Queue.cpp" />
|
||||
<ClCompile Include="..\Core\Random.cpp" />
|
||||
<ClCompile Include="..\Core\Stream.cpp" />
|
||||
<ClCompile Include="..\Core\String.cpp" />
|
||||
<ClCompile Include="..\Core\TimeSpan.cpp" />
|
||||
<ClCompile Include="..\Core\Type.cpp" />
|
||||
<ClCompile Include="..\Core\Version.cpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{6C0D43A8-8411-48F3-989E-51C5379A5563}</ProjectGuid>
|
||||
<RootNamespace>SmartOS</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="PropertySheet.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="PropertySheet.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>..\;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>..\;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="App">
|
||||
<UniqueIdentifier>{68cafcf9-0446-45fb-9ba0-e29094e97816}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Board">
|
||||
<UniqueIdentifier>{55eaf1b2-508a-4bdb-8dff-4e99c96e458f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Core">
|
||||
<UniqueIdentifier>{da241b09-cddc-414b-a87a-9a22187f53b9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Device">
|
||||
<UniqueIdentifier>{ce8de3bb-b0e4-4d24-8899-96ed1dafc5c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Drivers">
|
||||
<UniqueIdentifier>{ac8cd3cc-8f65-45e0-8b86-0cdb78b4bfdf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Kernel">
|
||||
<UniqueIdentifier>{1ec82080-7ddc-43ec-9171-4716b5a73bba}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Message">
|
||||
<UniqueIdentifier>{50d9af31-12f9-4fe9-869c-a86e9db183bf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Net">
|
||||
<UniqueIdentifier>{9ce7a428-911e-41f6-9064-e5ddaa413bcb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Platform">
|
||||
<UniqueIdentifier>{ef28b1f5-18bf-4969-a50f-b7c0e0ab52ab}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Security">
|
||||
<UniqueIdentifier>{46d87250-c97b-4733-834b-78c8cd385591}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Storage">
|
||||
<UniqueIdentifier>{78919a0d-baca-4dc9-bb17-b451e78ef98a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Test">
|
||||
<UniqueIdentifier>{571c34d7-b9f1-4707-9a68-c4927ee96dc8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TinyIP">
|
||||
<UniqueIdentifier>{06ee290f-07a2-4f74-ba74-6af3b238d0db}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TinyNet">
|
||||
<UniqueIdentifier>{8217de0f-89b4-4070-951a-ac0c7cb119f9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TokenNet">
|
||||
<UniqueIdentifier>{05569624-5acc-4f56-96eb-8f0c4aefd004}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Drivers\Esp8266">
|
||||
<UniqueIdentifier>{5148c153-2531-43dd-b3d0-c6e56c956568}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Core\Type.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Version.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Array.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Buffer.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\ByteArray.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\DateTime.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Delegate.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Dictionary.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Environment.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\List.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Queue.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Random.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\Stream.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\String.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Core\TimeSpan.cpp">
|
||||
<Filter>Core</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue