mirror of
https://github.com/wassname/ray.git
synced 2026-08-20 12:40:44 +08:00
Windows compatibility (#57)
* Add Python and Redis submodules, and remove old third-party modules
* Update VS projects (WARNING: references files that do not exist yet)
* Update code & add shims for APIs except AF_UNIX/{send,recv}msg()
* Minor style changes.
This commit is contained in:
committed by
Robert Nishihara
parent
a93c6b7596
commit
7237ec4124
+15
@@ -0,0 +1,15 @@
|
||||
@SetLocal
|
||||
@Echo Off
|
||||
@PushD "%~dp0"
|
||||
git submodule update --init --jobs="%NUMBER_OF_PROCESSORS%"
|
||||
@If Not Exist "python\.git" git clone "https://github.com/austinsc/python.git"
|
||||
Call :GitApply "python" "%CD%/patches/windows/python-pyconfig.patch"
|
||||
Call :GitApply "redis-windows" "%CD%/patches/windows/redis.patch"
|
||||
@PopD
|
||||
@EndLocal
|
||||
@GoTo :EOF
|
||||
|
||||
:GitApply <ChangeToFolder> <Patch>
|
||||
@REM Check if patch already applied by attempting to apply it in reverse; if not, then force-reapply it
|
||||
git -C "%~1" apply "%~2" -R --check 2> NUL || git -C "%~1" apply "%~2" --3way 2> NUL || git -C "%~1" reset --hard && git -C "%~1" apply "%~2" --3way
|
||||
@GoTo :EOF
|
||||
@@ -0,0 +1 @@
|
||||
*.patch text eol=lf
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/inc/Windows/pyconfig.h b/inc/Windows/pyconfig.h
|
||||
index 1cfc59b..d4861cb
|
||||
--- a/inc/Windows/pyconfig.h
|
||||
+++ b/inc/Windows/pyconfig.h
|
||||
@@ -1,6 +1,11 @@
|
||||
#ifndef Py_CONFIG_H
|
||||
#define Py_CONFIG_H
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma push_macro("_DEBUG")
|
||||
+#undef _DEBUG
|
||||
+#endif
|
||||
+
|
||||
/* pyconfig.h. NOT Generated automatically by configure.
|
||||
|
||||
This is a manually maintained version used for the Watcom,
|
||||
@@ -756,4 +761,8 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
||||
least significant byte first */
|
||||
#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma pop_macro("_DEBUG")
|
||||
+#endif
|
||||
+
|
||||
#endif /* !Py_CONFIG_H */
|
||||
+772
@@ -0,0 +1,772 @@
|
||||
diff --git a/msvs/RedisServer.vcxproj b/msvs/RedisServer.vcxproj
|
||||
index 115ce90..68afb44
|
||||
--- a/msvs/RedisServer.vcxproj
|
||||
+++ b/msvs/RedisServer.vcxproj
|
||||
@@ -24,26 +24,26 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
- <ConfigurationType>Application</ConfigurationType>
|
||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
- <ConfigurationType>Application</ConfigurationType>
|
||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
- <ConfigurationType>Application</ConfigurationType>
|
||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
- <ConfigurationType>Application</ConfigurationType>
|
||||
+ <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -61,41 +61,23 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
+ <PropertyGroup>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>redis-server</TargetName>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
- <LinkIncremental>false</LinkIncremental>
|
||||
- <TargetName>redis-server</TargetName>
|
||||
- <GenerateManifest>false</GenerateManifest>
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
- <LinkIncremental>false</LinkIncremental>
|
||||
- <TargetName>redis-server</TargetName>
|
||||
- <GenerateManifest>false</GenerateManifest>
|
||||
- <CustomBuildAfterTargets>Build</CustomBuildAfterTargets>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
- <LinkIncremental>false</LinkIncremental>
|
||||
- <TargetName>redis-server</TargetName>
|
||||
- <GenerateManifest>false</GenerateManifest>
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
+ <OutDir>$(SolutionDir)build\$(Platform)\$(Configuration)\</OutDir>
|
||||
+ <IntDir>$(SolutionDir)build\$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
- <PreprocessorDefinitions>USE_JEMALLOC;_OFF_T_DEFINED;WIN32;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
- <AdditionalIncludeDirectories>$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\deps\lua\src;$(ProjectDir)..\deps\hiredis;$(ProjectDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<DisableSpecificWarnings>4996;4146</DisableSpecificWarnings>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -109,14 +91,14 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
- <PreprocessorDefinitions>USE_JEMALLOC;_OFF_T_DEFINED;WIN32;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
- <AdditionalIncludeDirectories>$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\deps\lua\src;$(ProjectDir)..\deps\hiredis;$(ProjectDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<DisableSpecificWarnings>4996;4146</DisableSpecificWarnings>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -130,14 +112,13 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
- <PreprocessorDefinitions>USE_JEMALLOC;_OFF_T_DEFINED;WIN32;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
- <AdditionalIncludeDirectories>$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\deps\lua\src;$(ProjectDir)..\deps\hiredis;$(ProjectDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;4146</DisableSpecificWarnings>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<Optimization>Full</Optimization>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -162,13 +143,12 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
- <PreprocessorDefinitions>USE_JEMALLOC;_OFF_T_DEFINED;_WIN32;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
- <AdditionalIncludeDirectories>$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;_WIN32;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
+ <AdditionalIncludeDirectories>$(ProjectDir)..\deps\lua\src;$(ProjectDir)..\deps\hiredis;$(ProjectDir)..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4996;4146</DisableSpecificWarnings>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -271,9 +251,6 @@
|
||||
<ClInclude Include="..\src\zmalloc.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
- <ProjectReference Include="..\deps\jemalloc-win\projects\jemalloc\proj.win32\vc2013\jemalloc.vcxproj">
|
||||
- <Project>{8b897e33-6428-4254-8335-4911d179bad1}</Project>
|
||||
- </ProjectReference>
|
||||
<ProjectReference Include="..\src\Win32_Interop\Win32_Interop.vcxproj">
|
||||
<Project>{8c07f811-c81c-432c-b334-1ae6faecf951}</Project>
|
||||
</ProjectReference>
|
||||
diff --git a/msvs/hiredis/hiredis.vcxproj b/msvs/hiredis/hiredis.vcxproj
|
||||
index 0622958..efaedae
|
||||
--- a/msvs/hiredis/hiredis.vcxproj
|
||||
+++ b/msvs/hiredis/hiredis.vcxproj
|
||||
@@ -28,27 +28,25 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -66,30 +64,20 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
+ <PropertyGroup>
|
||||
<TargetName>hiredis</TargetName>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
- <TargetName>hiredis</TargetName>
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
- <TargetName>hiredis</TargetName>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
- <TargetName>hiredis</TargetName>
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
+ <OutDir>$(ProjectDir)..\$(Platform)\$(Configuration)\</OutDir>
|
||||
+ <IntDir>$(SolutionDir)build\$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -101,9 +89,10 @@
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -117,10 +106,9 @@
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
- <PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -136,10 +124,9 @@
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
- <PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;_OFF_T_DEFINED;WIN32;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
diff --git a/msvs/lua/lua/lua.vcxproj b/msvs/lua/lua/lua.vcxproj
|
||||
index b187130..adef07b
|
||||
--- a/msvs/lua/lua/lua.vcxproj
|
||||
+++ b/msvs/lua/lua/lua.vcxproj
|
||||
@@ -30,28 +30,28 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CLRSupport>false</CLRSupport>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -69,25 +69,16 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
- <TargetExt>.lib</TargetExt>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
- <LinkIncremental>true</LinkIncremental>
|
||||
- <TargetExt>.lib</TargetExt>
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
- <TargetExt>.lib</TargetExt>
|
||||
</PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
- <LinkIncremental>false</LinkIncremental>
|
||||
+ <PropertyGroup>
|
||||
<TargetExt>.lib</TargetExt>
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
+ <OutDir>$(SolutionDir)build\$(Platform)\$(Configuration)\</OutDir>
|
||||
+ <IntDir>$(SolutionDir)build\$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@@ -95,8 +86,9 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);LUA_ANSI;ENABLE_CJSON_GLOBAL</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -110,8 +102,9 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501;LUA_ANSI;ENABLE_CJSON_GLOBAL</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -124,10 +117,10 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);LUA_ANSI;ENABLE_CJSON_GLOBAL</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
|
||||
<Optimization>Full</Optimization>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -140,8 +133,8 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PreprocessorDefinitions>_OFF_T_DEFINED;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_WIN32_WINNT=0x0501;LUA_ANSI;ENABLE_CJSON_GLOBAL</PreprocessorDefinitions>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
diff --git a/src/Win32_Interop/Win32_ANSI.c b/src/Win32_Interop/Win32_ANSI.c
|
||||
index 404b84f..e7c55d2
|
||||
--- a/src/Win32_Interop/Win32_ANSI.c
|
||||
+++ b/src/Win32_Interop/Win32_ANSI.c
|
||||
@@ -737,7 +737,7 @@ void ANSI_printf(char *format, ...) {
|
||||
memset(buffer, 0, cBufLen);
|
||||
|
||||
va_start(args, format);
|
||||
- retVal = vsprintf_s(buffer, cBufLen, format, args);
|
||||
+ retVal = vsnprintf(buffer, cBufLen - 1, format, args);
|
||||
va_end(args);
|
||||
|
||||
if (retVal > 0) {
|
||||
diff --git a/src/Win32_Interop/Win32_EventLog.cpp b/src/Win32_Interop/Win32_EventLog.cpp
|
||||
index 1856540..3db4ddd
|
||||
--- a/src/Win32_Interop/Win32_EventLog.cpp
|
||||
+++ b/src/Win32_Interop/Win32_EventLog.cpp
|
||||
@@ -30,7 +30,6 @@ using namespace std;
|
||||
|
||||
#include "Win32_EventLog.h"
|
||||
#include "Win32_SmartHandle.h"
|
||||
-#include "EventLog.h"
|
||||
|
||||
static bool eventLogEnabled = true;
|
||||
static string eventLogIdentity = "redis";
|
||||
@@ -129,17 +128,17 @@ void RedisEventLog::LogMessage(LPCSTR msg, const WORD type) {
|
||||
DWORD eventID;
|
||||
switch (type) {
|
||||
case EVENTLOG_ERROR_TYPE:
|
||||
- eventID = MSG_ERROR_1;
|
||||
+ eventID = 0x2;
|
||||
break;
|
||||
case EVENTLOG_WARNING_TYPE:
|
||||
- eventID = MSG_WARNING_1;
|
||||
+ eventID = 0x1;
|
||||
break;
|
||||
case EVENTLOG_INFORMATION_TYPE:
|
||||
- eventID = MSG_INFO_1;
|
||||
+ eventID = 0x0;
|
||||
break;
|
||||
default:
|
||||
std::cerr << "Unrecognized type: " << type << "\n";
|
||||
- eventID = MSG_INFO_1;
|
||||
+ eventID = 0x0;
|
||||
break;
|
||||
}
|
||||
|
||||
diff --git a/src/Win32_Interop/Win32_FDAPI.cpp b/src/Win32_Interop/Win32_FDAPI.cpp
|
||||
index 3df9af1..f60e3d4
|
||||
--- a/src/Win32_Interop/Win32_FDAPI.cpp
|
||||
+++ b/src/Win32_Interop/Win32_FDAPI.cpp
|
||||
@@ -46,11 +46,13 @@ fdapi_access access = NULL;
|
||||
fdapi_bind bind = NULL;
|
||||
fdapi_connect connect = NULL;
|
||||
fdapi_fcntl fcntl = NULL;
|
||||
+fdapi_ioctl ioctl = NULL;
|
||||
fdapi_fstat fdapi_fstat64 = NULL;
|
||||
fdapi_fsync fsync = NULL;
|
||||
fdapi_ftruncate ftruncate = NULL;
|
||||
fdapi_freeaddrinfo freeaddrinfo = NULL;
|
||||
fdapi_getaddrinfo getaddrinfo = NULL;
|
||||
+fdapi_gethostbyname gethostbyname = NULL;
|
||||
fdapi_getpeername getpeername = NULL;
|
||||
fdapi_getsockname getsockname = NULL;
|
||||
fdapi_getsockopt getsockopt = NULL;
|
||||
@@ -67,7 +69,9 @@ fdapi_open open = NULL;
|
||||
fdapi_pipe pipe = NULL;
|
||||
fdapi_poll poll = NULL;
|
||||
fdapi_read read = NULL;
|
||||
+fdapi_recv recv = NULL;
|
||||
fdapi_select select = NULL;
|
||||
+fdapi_send send = NULL;
|
||||
fdapi_setsockopt setsockopt = NULL;
|
||||
fdapi_socket socket = NULL;
|
||||
fdapi_write write = NULL;
|
||||
@@ -622,6 +626,23 @@ int FDAPI_fcntl(int rfd, int cmd, int flags = 0 ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
+int FDAPI_ioctl(int rfd, int cmd, char *buf) {
|
||||
+ try {
|
||||
+ SocketInfo* socket_info = RFDMap::getInstance().lookupSocketInfo(rfd);
|
||||
+ if (socket_info != NULL && socket_info->socket != INVALID_SOCKET) {
|
||||
+ if (f_ioctlsocket(socket_info->socket, cmd, (u_long *)buf) != SOCKET_ERROR) {
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ errno = f_WSAGetLastError();
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+ } CATCH_AND_REPORT();
|
||||
+
|
||||
+ errno = EBADF;
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
int FDAPI_poll(struct pollfd *fds, nfds_t nfds, int timeout) {
|
||||
try {
|
||||
struct pollfd* pollCopy = new struct pollfd[nfds];
|
||||
@@ -777,6 +798,42 @@ ssize_t FDAPI_read(int rfd, void *buf, size_t count) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ssize_t FDAPI_recv(int rfd, void *buf, size_t count, int flags) {
|
||||
+ try {
|
||||
+ SOCKET socket = RFDMap::getInstance().lookupSocket(rfd);
|
||||
+ if (socket != INVALID_SOCKET) {
|
||||
+ int retval = f_recv(socket, (char*) buf, (unsigned int) count, flags);
|
||||
+ if (retval == -1) {
|
||||
+ errno = GetLastError();
|
||||
+ if (errno == WSAEWOULDBLOCK) {
|
||||
+ errno = EAGAIN;
|
||||
+ }
|
||||
+ }
|
||||
+ return retval;
|
||||
+ }
|
||||
+ } CATCH_AND_REPORT();
|
||||
+ errno = EBADF;
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+ssize_t FDAPI_send(int rfd, const void *buf, size_t count, int flags) {
|
||||
+ try {
|
||||
+ SOCKET socket = RFDMap::getInstance().lookupSocket(rfd);
|
||||
+ if (socket != INVALID_SOCKET) {
|
||||
+ int retval = f_send(socket, (const char*) buf, (unsigned int) count, flags);
|
||||
+ if (retval == -1) {
|
||||
+ errno = GetLastError();
|
||||
+ if (errno == WSAEWOULDBLOCK) {
|
||||
+ errno = EAGAIN;
|
||||
+ }
|
||||
+ }
|
||||
+ return retval;
|
||||
+ }
|
||||
+ } CATCH_AND_REPORT();
|
||||
+ errno = EBADF;
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
ssize_t FDAPI_write(int rfd, const void *buf, size_t count) {
|
||||
try {
|
||||
SOCKET socket = RFDMap::getInstance().lookupSocket(rfd);
|
||||
@@ -1195,12 +1252,14 @@ private:
|
||||
bind = FDAPI_bind;
|
||||
connect = FDAPI_connect;
|
||||
fcntl = FDAPI_fcntl;
|
||||
+ ioctl = FDAPI_ioctl;
|
||||
fdapi_fstat64 = (fdapi_fstat) FDAPI_fstat64;
|
||||
freeaddrinfo = FDAPI_freeaddrinfo;
|
||||
fsync = FDAPI_fsync;
|
||||
ftruncate = FDAPI_ftruncate;
|
||||
getaddrinfo = FDAPI_getaddrinfo;
|
||||
getsockopt = FDAPI_getsockopt;
|
||||
+ gethostbyname = FDAPI_gethostbyname;
|
||||
getpeername = FDAPI_getpeername;
|
||||
getsockname = FDAPI_getsockname;
|
||||
htonl = FDAPI_htonl;
|
||||
@@ -1216,9 +1275,11 @@ private:
|
||||
pipe = FDAPI_pipe;
|
||||
poll = FDAPI_poll;
|
||||
read = FDAPI_read;
|
||||
+ recv = FDAPI_recv;
|
||||
select = FDAPI_select;
|
||||
setsockopt = FDAPI_setsockopt;
|
||||
socket = FDAPI_socket;
|
||||
+ send = FDAPI_send;
|
||||
write = FDAPI_write;
|
||||
}
|
||||
|
||||
diff --git a/src/Win32_Interop/Win32_FDAPI.h b/src/Win32_Interop/Win32_FDAPI.h
|
||||
index 8fae9c7..6e09596
|
||||
--- a/src/Win32_Interop/Win32_FDAPI.h
|
||||
+++ b/src/Win32_Interop/Win32_FDAPI.h
|
||||
@@ -116,9 +116,12 @@ typedef int (*fdapi_open)(const char * _Filename, int _OpenFlag, int flags);
|
||||
typedef int (*fdapi_accept)(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
typedef int (*fdapi_setsockopt)(int sockfd, int level, int optname,const void *optval, socklen_t optlen);
|
||||
typedef int (*fdapi_fcntl)(int fd, int cmd, int flags);
|
||||
+typedef int (*fdapi_ioctl)(int fd, int cmd, char *buf);
|
||||
typedef int (*fdapi_poll)(struct pollfd *fds, nfds_t nfds, int timeout);
|
||||
typedef int (*fdapi_getsockopt)(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
|
||||
typedef int (*fdapi_connect)(int sockfd, const struct sockaddr *addr, size_t addrlen);
|
||||
+typedef ssize_t (*fdapi_recv)(int fd, void *buf, size_t count, int flags);
|
||||
+typedef ssize_t (*fdapi_send)(int rfd, void const *buf, size_t count, int flags);
|
||||
typedef ssize_t (*fdapi_read)(int fd, void *buf, size_t count);
|
||||
typedef ssize_t (*fdapi_write)(int fd, const void *buf, size_t count);
|
||||
typedef int (*fdapi_fsync)(int fd);
|
||||
@@ -128,6 +131,7 @@ typedef int (*fdapi_bind)(int sockfd, const struct sockaddr *addr, socklen_t add
|
||||
typedef u_short (*fdapi_htons)(u_short hostshort);
|
||||
typedef u_long (*fdapi_htonl)(u_long hostlong);
|
||||
typedef u_short (*fdapi_ntohs)(u_short netshort);
|
||||
+typedef struct hostent* (*fdapi_gethostbyname)(const char *name);
|
||||
typedef int (*fdapi_getpeername)(int sockfd, struct sockaddr *addr, socklen_t * addrlen);
|
||||
typedef int (*fdapi_getsockname)(int sockfd, struct sockaddr* addrsock, int* addrlen );
|
||||
typedef void (*fdapi_freeaddrinfo)(struct addrinfo *ai);
|
||||
@@ -159,12 +163,14 @@ extern fdapi_access access;
|
||||
extern fdapi_bind bind;
|
||||
extern fdapi_connect connect;
|
||||
extern fdapi_fcntl fcntl;
|
||||
+extern fdapi_ioctl ioctl;
|
||||
extern fdapi_fstat fdapi_fstat64;
|
||||
extern fdapi_freeaddrinfo freeaddrinfo;
|
||||
extern fdapi_fsync fsync;
|
||||
extern fdapi_ftruncate ftruncate;
|
||||
extern fdapi_getaddrinfo getaddrinfo;
|
||||
extern fdapi_getsockopt getsockopt;
|
||||
+extern fdapi_gethostbyname gethostbyname;
|
||||
extern fdapi_getpeername getpeername;
|
||||
extern fdapi_getsockname getsockname;
|
||||
extern fdapi_htonl htonl;
|
||||
@@ -180,7 +186,9 @@ extern fdapi_open open;
|
||||
extern fdapi_pipe pipe;
|
||||
extern fdapi_poll poll;
|
||||
extern fdapi_read read;
|
||||
+extern fdapi_recv recv;
|
||||
extern fdapi_select select;
|
||||
+extern fdapi_send send;
|
||||
extern fdapi_setsockopt setsockopt;
|
||||
extern fdapi_socket socket;
|
||||
extern fdapi_write write;
|
||||
diff --git a/src/Win32_Interop/Win32_Interop.vcxproj b/src/Win32_Interop/Win32_Interop.vcxproj
|
||||
index 93fc44b..b75d89b
|
||||
--- a/src/Win32_Interop/Win32_Interop.vcxproj
|
||||
+++ b/src/Win32_Interop/Win32_Interop.vcxproj
|
||||
@@ -74,35 +74,6 @@
|
||||
<ClInclude Include="win32_wsiocp2.h" />
|
||||
<ClInclude Include="WS2tcpip.h" />
|
||||
</ItemGroup>
|
||||
- <ItemGroup>
|
||||
- <CustomBuild Include="EventLog.mc">
|
||||
- <FileType>Document</FileType>
|
||||
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">md resources
|
||||
-mc.exe -A -b -c -h . -r resources EventLog.mc
|
||||
-rc.exe -foresources/EventLog.res resources/EventLog.rc
|
||||
-link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
-</Command>
|
||||
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">md resources
|
||||
-mc.exe -A -b -c -h . -r resources EventLog.mc
|
||||
-rc.exe -foresources/EventLog.res resources/EventLog.rc
|
||||
-link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
-</Command>
|
||||
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EventLog.h</Outputs>
|
||||
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EventLog.h</Outputs>
|
||||
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">md resources
|
||||
-mc.exe -A -b -c -h . -r resources EventLog.mc
|
||||
-rc.exe -foresources/EventLog.res resources/EventLog.rc
|
||||
-link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
-</Command>
|
||||
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">md resources
|
||||
-mc.exe -A -b -c -h . -r resources EventLog.mc
|
||||
-rc.exe -foresources/EventLog.res resources/EventLog.rc
|
||||
-link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
-</Command>
|
||||
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">EventLog.h</Outputs>
|
||||
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">EventLog.h</Outputs>
|
||||
- </CustomBuild>
|
||||
- </ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8C07F811-C81C-432C-B334-1AE6FAECF951}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
@@ -113,27 +84,25 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
- <PlatformToolset>v120</PlatformToolset>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <PlatformToolset>v140_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
@@ -152,13 +121,9 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
- </PropertyGroup>
|
||||
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
- <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
- <IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
+ <PropertyGroup>
|
||||
+ <OutDir>$(SolutionDir)build\$(Platform)\$(Configuration)\</OutDir>
|
||||
+ <IntDir>$(SolutionDir)build\$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@@ -166,9 +131,10 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <PreprocessorDefinitions>USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;_NO_CRT_STDIO_INLINE;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\deps\lua\src;$(ProjectDir)..\..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -186,9 +152,10 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <PreprocessorDefinitions>USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1;_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;_NO_CRT_STDIO_INLINE;_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1;_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\deps\lua\src;$(ProjectDir)..\..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
+ <MinimalRebuild>false</MinimalRebuild>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -211,10 +178,9 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
<Optimization>Full</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
- <PreprocessorDefinitions>USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;_NO_CRT_STDIO_INLINE;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\deps\lua\src;$(ProjectDir)..\..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
- <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -235,9 +201,9 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
- <PreprocessorDefinitions>USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1;_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;USE_STATIC;USE_JEMALLOC;_OFF_T_DEFINED;_NO_CRT_STDIO_INLINE;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);LACKS_STDLIB_H;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1;_WIN32_WINNT=0x0501</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\deps\lua\src;$(ProjectDir)..\..\deps\jemalloc-win\include</AdditionalIncludeDirectories>
|
||||
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
diff --git a/src/Win32_Interop/Win32_service.cpp b/src/Win32_Interop/Win32_service.cpp
|
||||
index 488538e..1c33f53
|
||||
--- a/src/Win32_Interop/Win32_service.cpp
|
||||
+++ b/src/Win32_Interop/Win32_service.cpp
|
||||
@@ -59,7 +59,6 @@ this should preceed the other arguments passed to redis. For instance:
|
||||
#include <windowsx.h>
|
||||
#include <shlobj.h>
|
||||
#include <tchar.h>
|
||||
-#include <strsafe.h>
|
||||
#include <aclapi.h>
|
||||
#include "Win32_EventLog.h"
|
||||
#include <algorithm>
|
||||
diff --git a/src/ziplist.c b/src/ziplist.c
|
||||
index 24b0a7c..29d445d
|
||||
--- a/src/ziplist.c
|
||||
+++ b/src/ziplist.c
|
||||
@@ -920,7 +920,7 @@ void ziplistRepr(unsigned char *zl) {
|
||||
entry = zipEntry(p);
|
||||
printf(
|
||||
"{"
|
||||
- "addr 0x%08lx, " /* TODO" verify 0x%08lx */
|
||||
+ "addr %p, "
|
||||
"index %2d, "
|
||||
"offset %5ld, "
|
||||
"rl: %5u, "
|
||||
@@ -929,9 +929,9 @@ void ziplistRepr(unsigned char *zl) {
|
||||
"pls: %2u, "
|
||||
"payload %5u"
|
||||
"} ",
|
||||
- (PORT_ULONG)p,
|
||||
+ (void *)p,
|
||||
index,
|
||||
- (PORT_ULONG)(p-zl),
|
||||
+ (long)(p-zl),
|
||||
entry.headersize+entry.len,
|
||||
entry.headersize,
|
||||
entry.prevrawlen,
|
||||
+1
Submodule src/common/thirdparty/python added at 3f8fa00528
+1
Submodule src/common/thirdparty/redis-windows added at 10a978f7b4
Reference in New Issue
Block a user