Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
别团等shy哥发育
redis
提交
72d34a87
R
redis
项目概览
别团等shy哥发育
/
redis
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
72d34a87
编写于
5月 28, 2015
作者:
A
Alexis Campailla
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Portability fixes (ssize_t, off_t)
Fix definition of ssize_t and off_t.
上级
6ac1b5db
变更
36
隐藏空白更改
内联
并排
Showing
36 changed file
with
147 addition
and
64 deletion
+147
-64
deps/hiredis/hiredis.c
deps/hiredis/hiredis.c
+1
-1
msvs/RedisBenchmark/RedisBenchmark.vcxproj
msvs/RedisBenchmark/RedisBenchmark.vcxproj
+4
-4
msvs/RedisCheckAof/RedisCheckAof.vcxproj
msvs/RedisCheckAof/RedisCheckAof.vcxproj
+4
-4
msvs/RedisCheckDump/RedisCheckDump.vcxproj
msvs/RedisCheckDump/RedisCheckDump.vcxproj
+4
-4
msvs/RedisCli/RedisCli.vcxproj
msvs/RedisCli/RedisCli.vcxproj
+4
-4
msvs/RedisServer.vcxproj
msvs/RedisServer.vcxproj
+4
-4
msvs/hiredis/hiredis.vcxproj
msvs/hiredis/hiredis.vcxproj
+4
-4
msvs/lua/lua/lua.vcxproj
msvs/lua/lua/lua.vcxproj
+4
-4
src/RedisLog.c
src/RedisLog.c
+4
-0
src/Win32_Interop/Win32_EventLog.cpp
src/Win32_Interop/Win32_EventLog.cpp
+2
-0
src/Win32_Interop/Win32_FDAPI.cpp
src/Win32_Interop/Win32_FDAPI.cpp
+2
-0
src/Win32_Interop/Win32_FDAPI.h
src/Win32_Interop/Win32_FDAPI.h
+4
-2
src/Win32_Interop/Win32_Interop.vcxproj
src/Win32_Interop/Win32_Interop.vcxproj
+4
-4
src/Win32_Interop/Win32_QFork.cpp
src/Win32_Interop/Win32_QFork.cpp
+2
-0
src/Win32_Interop/Win32_QFork_impl.c
src/Win32_Interop/Win32_QFork_impl.c
+2
-0
src/Win32_Interop/Win32_dlmalloc.c
src/Win32_Interop/Win32_dlmalloc.c
+2
-0
src/Win32_Interop/Win32_service.cpp
src/Win32_Interop/Win32_service.cpp
+2
-0
src/Win32_Interop/Win32_variadicFunctor.cpp
src/Win32_Interop/Win32_variadicFunctor.cpp
+3
-0
src/Win32_Interop/win32_rfdmap.cpp
src/Win32_Interop/win32_rfdmap.cpp
+2
-0
src/Win32_Interop/win32_types.h
src/Win32_Interop/win32_types.h
+40
-0
src/Win32_Interop/win32_wsiocp.c
src/Win32_Interop/win32_wsiocp.c
+1
-1
src/Win32_Interop/win32fixes.h
src/Win32_Interop/win32fixes.h
+3
-1
src/ae.c
src/ae.c
+0
-4
src/anet.c
src/anet.c
+4
-0
src/aof.c
src/aof.c
+4
-4
src/config.c
src/config.c
+4
-0
src/fmacros.h
src/fmacros.h
+0
-4
src/rdb.c
src/rdb.c
+4
-0
src/redis-benchmark.c
src/redis-benchmark.c
+1
-1
src/redis-check-aof.c
src/redis-check-aof.c
+4
-0
src/redis-check-dump.c
src/redis-check-dump.c
+8
-5
src/redis-cli.c
src/redis-cli.c
+4
-4
src/redis.c
src/redis.c
+4
-0
src/replication.c
src/replication.c
+3
-5
src/rio.c
src/rio.c
+1
-0
src/zmalloc.c
src/zmalloc.c
+4
-0
未找到文件。
deps/hiredis/hiredis.c
浏览文件 @
72d34a87
...
...
@@ -1197,7 +1197,7 @@ int redisBufferRead(redisContext *c) {
*
* After this function is called, you may use redisContextReadReply to
* see if there is a reply available. */
int
redisBufferReadDone
(
redisContext
*
c
,
char
*
buf
,
in
t
nread
)
{
int
redisBufferReadDone
(
redisContext
*
c
,
char
*
buf
,
ssize_
t
nread
)
{
if
(
nread
==
-
1
)
{
if
(
errno
==
EAGAIN
&&
!
(
c
->
flags
&
REDIS_BLOCK
))
{
/* Try again later */
...
...
msvs/RedisBenchmark/RedisBenchmark.vcxproj
浏览文件 @
72d34a87
...
...
@@ -88,7 +88,7 @@
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
...
...
@@ -109,7 +109,7 @@
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
...
...
@@ -132,7 +132,7 @@
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
_WIN32IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_
OFF_T_DEFINED;_
WIN32IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
...
...
@@ -155,7 +155,7 @@
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
_WIN32IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_
OFF_T_DEFINED;_
WIN32IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
...
...
msvs/RedisCheckAof/RedisCheckAof.vcxproj
浏览文件 @
72d34a87
...
...
@@ -83,7 +83,7 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;USE_DL_PREFIX;LACKS_STDLIB_H;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_DEBUG;_CONSOLE;USE_DL_PREFIX;LACKS_STDLIB_H;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP
</PreprocessorDefinitions>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
@@ -101,7 +101,7 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;_DEBUG;_CONSOLE;USE_DL_PREFIX;LACKS_STDLIB_H;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_DEBUG;_CONSOLE;USE_DL_PREFIX;LACKS_STDLIB_H;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
@@ -122,7 +122,7 @@
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;USE_DL_PREFIX;LACKS_STDLIB_H;NO_QFORKIMPL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;USE_DL_PREFIX;LACKS_STDLIB_H;NO_QFORKIMPL
</PreprocessorDefinitions>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
@@ -142,7 +142,7 @@
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;USE_DL_PREFIX;LACKS_STDLIB_H;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;USE_DL_PREFIX;LACKS_STDLIB_H;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
msvs/RedisCheckDump/RedisCheckDump.vcxproj
浏览文件 @
72d34a87
...
...
@@ -83,7 +83,7 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
@@ -101,7 +101,7 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
@@ -122,7 +122,7 @@
<Optimization>
Full
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
@@ -143,7 +143,7 @@
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
...
...
msvs/RedisCli/RedisCli.vcxproj
浏览文件 @
72d34a87
...
...
@@ -84,7 +84,7 @@
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\linenoise;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
</ClCompile>
...
...
@@ -103,7 +103,7 @@
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\linenoise;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
</ClCompile>
...
...
@@ -125,7 +125,7 @@
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\linenoise;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);NO_QFORKIMPL
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
...
...
@@ -147,7 +147,7 @@
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\hiredis;$(SolutionDir)..\deps\linenoise;$(SolutionDir)..\deps\lua\src
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;NO_QFORKIMPL;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
</ClCompile>
...
...
msvs/RedisServer.vcxproj
浏览文件 @
72d34a87
...
...
@@ -84,7 +84,7 @@
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);USE_DLMALLOC
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);USE_DLMALLOC
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<WarningLevel>
Level3
</WarningLevel>
...
...
@@ -105,7 +105,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<PreprocessorDefinitions>
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);USE_DLMALLOC;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;_DEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);USE_DLMALLOC;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<WarningLevel>
Level3
</WarningLevel>
...
...
@@ -126,7 +126,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);USE_DLMALLOC
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);USE_DLMALLOC
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<WarningLevel>
Level3
</WarningLevel>
...
...
@@ -158,7 +158,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<PreprocessorDefinitions>
_WIN32IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);WIN32_IOCP;USE_DLMALLOC;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_
OFF_T_DEFINED;_
WIN32IOCP;WIN32;USE_DL_PREFIX;LACKS_STDLIB_H;NDEBUG;_CONSOLE;__x86_64__;%(PreprocessorDefinitions);WIN32_IOCP;USE_DLMALLOC;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(SolutionDir)..\deps\lua\src;$(SolutionDir)..\deps\hiredis
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<WarningLevel>
Level3
</WarningLevel>
...
...
msvs/hiredis/hiredis.vcxproj
浏览文件 @
72d34a87
...
...
@@ -83,7 +83,7 @@
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
</ClCompile>
...
...
@@ -97,7 +97,7 @@
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
</ClCompile>
...
...
@@ -113,7 +113,7 @@
<Optimization>
Full
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
...
...
@@ -132,7 +132,7 @@
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4996
</DisableSpecificWarnings>
</ClCompile>
...
...
msvs/lua/lua/lua.vcxproj
浏览文件 @
72d34a87
...
...
@@ -89,7 +89,7 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4244;4018
</DisableSpecificWarnings>
...
...
@@ -104,7 +104,7 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);WIN32_IOCP;_WIN32_WINNT=0x0501;LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);WIN32_IOCP;_WIN32_WINNT=0x0501;LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DisableSpecificWarnings>
4244;4018
</DisableSpecificWarnings>
...
...
@@ -118,7 +118,7 @@
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4244;4018
</DisableSpecificWarnings>
...
...
@@ -134,7 +134,7 @@
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<PreprocessorDefinitions>
WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;_WIN32_WINNT=0x0501;LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);WIN32_IOCP;WIN32_IOCP;_WIN32_WINNT=0x0501;LUA_ANSI;ENABLE_CJSON_GLOBAL
</PreprocessorDefinitions>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<DisableSpecificWarnings>
4244;4018
</DisableSpecificWarnings>
...
...
src/RedisLog.c
浏览文件 @
72d34a87
...
...
@@ -20,6 +20,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "redisLog.h"
#include <stdio.h>
...
...
src/Win32_Interop/Win32_EventLog.cpp
浏览文件 @
72d34a87
...
...
@@ -20,6 +20,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "win32_types.h"
#include <Windows.h>
#include <string>
#include <iostream>
...
...
src/Win32_Interop/Win32_FDAPI.cpp
浏览文件 @
72d34a87
...
...
@@ -19,6 +19,8 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "win32_types.h"
#define FDAPI_NOCRTREDEFS
#include "Win32_FDAPI.h"
#include "win32_rfdmap.h"
...
...
src/Win32_Interop/Win32_FDAPI.h
浏览文件 @
72d34a87
...
...
@@ -33,8 +33,10 @@
typedef
unsigned
long
nfds_t
;
#if !defined(ssize_t)
typedef
int
ssize_t
;
#if defined(_WIN64)
typedef
__int64
ssize_t
;
#else
typedef
_W64
long
ssize_t
;
#endif
#define INCL_WINSOCK_API_PROTOTYPES 0 // Important! Do not include Winsock API definitions to avoid conflicts with API entry points defnied below.
...
...
src/Win32_Interop/Win32_Interop.vcxproj
浏览文件 @
72d34a87
...
...
@@ -140,7 +140,7 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(ProjectDir)..\..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
</ClCompile>
...
...
@@ -160,7 +160,7 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
</PrecompiledHeader>
<WarningLevel>
Level3
</WarningLevel>
<Optimization>
Disabled
</Optimization>
<PreprocessorDefinitions>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;WIN32_IOCP;PSAPI_VERSION=1;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;WIN32_IOCP;PSAPI_VERSION=1;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(ProjectDir)..\..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
</ClCompile>
...
...
@@ -186,7 +186,7 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
<Optimization>
Full
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32_IOCP;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32_IOCP;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(ProjectDir)..\..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
...
...
@@ -210,7 +210,7 @@ link.exe -dll -noentry resources/EventLog.res -out:$(TargetDir)EventLog.dll
<Optimization>
MaxSpeed
</Optimization>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<PreprocessorDefinitions>
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);_WIN32IOCP;USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_OFF_T_DEFINED;
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);_WIN32IOCP;USE_DL_PREFIX;LACKS_STDLIB_H;USE_DLMALLOC;_CRT_SECURE_NO_WARNINGS;PSAPI_VERSION=1;_WIN32_WINNT=0x0501
</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
$(ProjectDir)..\..\deps\lua\src
</AdditionalIncludeDirectories>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
</ClCompile>
...
...
src/Win32_Interop/Win32_QFork.cpp
浏览文件 @
72d34a87
...
...
@@ -20,6 +20,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "win32_types.h"
#include "Win32_FDAPI.h"
#include <Windows.h>
...
...
src/Win32_Interop/Win32_QFork_impl.c
浏览文件 @
72d34a87
...
...
@@ -58,6 +58,8 @@ int do_aofSave(char* filename)
return
REDIS_OK
;
}
int
rdbSaveRioWithEOFMark
(
rio
*
rdb
,
int
*
error
);
// This function is meant to be an exact replica of the fork() child path in rdbSaveToSlavesSockets
int
do_socketSave2
(
int
*
fds
,
int
numfds
,
uint64_t
*
clientids
)
{
...
...
src/Win32_Interop/Win32_dlmalloc.c
浏览文件 @
72d34a87
...
...
@@ -542,6 +542,8 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
improvement at the expense of carrying around more memory.
*/
#include "win32_types.h"
/* Version identifier to allow people to support multiple versions */
#ifndef DLMALLOC_VERSION
#define DLMALLOC_VERSION 20806
...
...
src/Win32_Interop/Win32_service.cpp
浏览文件 @
72d34a87
...
...
@@ -54,6 +54,8 @@ this should preceed the other arguments passed to redis. For instance:
redis-server --service-install --service-name testServiceName redis.windows.conf --loglevel verbose
*/
#include "win32_types.h"
#include <windows.h>
#include <windowsx.h>
#include <shlobj.h>
...
...
src/Win32_Interop/Win32_variadicFunctor.cpp
浏览文件 @
72d34a87
...
...
@@ -19,6 +19,9 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "win32_types.h"
#include "Win32_variadicFunctor.h"
#include <windows.h>
...
...
src/Win32_Interop/win32_rfdmap.cpp
浏览文件 @
72d34a87
...
...
@@ -21,6 +21,8 @@
*/
#include "win32_types.h"
#include "win32_rfdmap.h"
RFDMap
&
RFDMap
::
getInstance
()
{
...
...
src/Win32_Interop/win32_types.h
0 → 100644
浏览文件 @
72d34a87
/*
* Copyright (c), Microsoft Open Technologies, Inc.
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
/* The Posix version of Redis defines off_t as 64-bit integers, so we do the same.
* On Windows, these types are defined as 32-bit in sys/types.h under and #ifndef _OFF_T_DEFINED
* So we define _OFF_T_DEFINED at the project level, to make sure that that definition is never included.
* If you get an error about re-definition, make sure to include this file before sys/types.h, or any other
* file that include it (eg wchar.h).
* _off_t is also defined #ifndef _OFF_T_DEFINED, so we need to define it here.
* It is used by the CRT internally (but not by Redis), so we leave it as 32-bit.
*/
typedef
__int64
off_t
;
typedef
long
_off_t
;
#ifndef _OFF_T_DEFINED
#define _OFF_T_DEFINED
#endif
src/Win32_Interop/win32_wsiocp.c
浏览文件 @
72d34a87
...
...
@@ -477,7 +477,7 @@ void aeShutdown(int fd) {
if
(
shutdown
(
fd
,
SD_SEND
)
!=
SOCKET_ERROR
)
{
/* read data until no more or error to ensure shutdown completed */
while
(
1
)
{
in
t
rc
=
read
(
fd
,
rbuf
,
100
);
ssize_
t
rc
=
read
(
fd
,
rbuf
,
100
);
if
(
rc
==
0
||
rc
==
SOCKET_ERROR
)
break
;
else
{
...
...
src/Win32_Interop/win32fixes.h
浏览文件 @
72d34a87
...
...
@@ -21,6 +21,8 @@
#define NOGDI
#define __USE_W32_SOCKETS
#include "win32_types.h"
#include "..\fmacros.h"
#include <stdlib.h>
#include <stdio.h>
...
...
@@ -263,7 +265,7 @@ int w32initWinSock(void);
/* int inet_aton(const char *cp_arg, struct in_addr *addr) */
/* redis-check-dump */
void
*
mmap
(
void
*
start
,
size_t
length
,
int
prot
,
int
flags
,
int
fd
,
off
offset
);
void
*
mmap
(
void
*
start
,
size_t
length
,
int
prot
,
int
flags
,
int
fd
,
off
_t
offset
);
int
munmap
(
void
*
start
,
size_t
length
);
void
InitTimeFunctions
();
...
...
src/ae.c
浏览文件 @
72d34a87
...
...
@@ -330,11 +330,7 @@ static int processTimeEvents(aeEventLoop *eventLoop) {
if
(
now_sec
>
te
->
when_sec
||
(
now_sec
==
te
->
when_sec
&&
now_ms
>=
te
->
when_ms
))
{
#ifdef _WIN32
long
long
retval
;
#else
int
retval
;
#endif
id
=
te
->
id
;
retval
=
te
->
timeProc
(
eventLoop
,
id
,
te
->
clientData
);
...
...
src/anet.c
浏览文件 @
72d34a87
...
...
@@ -28,6 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "fmacros.h"
#include <sys/types.h>
...
...
src/aof.c
浏览文件 @
72d34a87
...
...
@@ -27,6 +27,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "redis.h"
#include "bio.h"
#include "rio.h"
...
...
@@ -579,11 +583,7 @@ int loadAppendOnlyFile(char *filename) {
struct
redis_stat
sb
;
int
old_aof_state
=
server
.
aof_state
;
long
loops
=
0
;
#ifdef _WIN64
int64_t
valid_up_to
=
0
;
/* Offset of the latest well-formed command loaded. */
#else
off_t
valid_up_to
=
0
;
/* Offset of the latest well-formed command loaded. */
#endif
if
(
fp
&&
redis_fstat
(
fileno
(
fp
),
&
sb
)
!=
-
1
&&
sb
.
st_size
==
0
)
{
server
.
aof_current_size
=
0
;
...
...
src/config.c
浏览文件 @
72d34a87
...
...
@@ -28,6 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "redis.h"
#ifdef _WIN32
#include <direct.h>
...
...
src/fmacros.h
浏览文件 @
72d34a87
...
...
@@ -58,8 +58,4 @@
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
#ifdef _WIN32
#define off off_t
#endif
#endif
src/rdb.c
浏览文件 @
72d34a87
...
...
@@ -27,6 +27,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "redis.h"
#include "lzf.h"
/* LZF compression library */
#include "zipmap.h"
...
...
src/redis-benchmark.c
浏览文件 @
72d34a87
...
...
@@ -210,7 +210,7 @@ static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
client
c
=
privdata
;
void
*
reply
=
NULL
;
#ifdef WIN32_IOCP
in
t
nread
;
ssize_
t
nread
;
char
buf
[
1024
*
16
];
#endif
REDIS_NOTUSED
(
el
);
...
...
src/redis-check-aof.c
浏览文件 @
72d34a87
...
...
@@ -28,6 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "fmacros.h"
#include <stdlib.h>
#include <stdio.h>
...
...
src/redis-check-dump.c
浏览文件 @
72d34a87
...
...
@@ -29,6 +29,10 @@
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#ifndef _WIN32
...
...
@@ -52,7 +56,7 @@
/* File maping used in redis-check-dump */
/* mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); */
void
*
mmap
(
void
*
start
,
size_t
length
,
int
prot
,
int
flags
,
int
fd
,
off
offset
)
{
void
*
mmap
(
void
*
start
,
size_t
length
,
int
prot
,
int
flags
,
int
fd
,
off
_t
offset
)
{
HANDLE
h
;
void
*
data
;
...
...
@@ -759,12 +763,11 @@ void process(void) {
#endif
int
main
(
int
argc
,
char
**
argv
)
{
int
fd
;
off_t
size
;
#ifdef _WIN32
off
size
;
struct
_stat64
stat
;
struct
_stat64
stat
;
#else
off_t
size
;
struct
stat
stat
;
struct
stat
stat
;
#endif
void
*
data
;
...
...
src/redis-cli.c
浏览文件 @
72d34a87
...
...
@@ -28,6 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "fmacros.h"
#include "version.h"
...
...
@@ -1164,11 +1168,7 @@ static void slaveMode(void) {
/* Discard the payload. */
while
(
payload
)
{
ssize_t
nread
;
#ifdef _WIN32
nread
=
read
(
fd
,
buf
,(
payload
>
sizeof
(
buf
))
?
sizeof
(
buf
)
:
(
unsigned
int
)
payload
);
#else
nread
=
read
(
fd
,
buf
,(
payload
>
sizeof
(
buf
))
?
sizeof
(
buf
)
:
payload
);
#endif
if
(
nread
<=
0
)
{
fprintf
(
stderr
,
"Error reading RDB payload while SYNCing
\n
"
);
exit
(
1
);
...
...
src/redis.c
浏览文件 @
72d34a87
...
...
@@ -27,6 +27,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "redis.h"
#include "slowlog.h"
#include "bio.h"
...
...
src/replication.c
浏览文件 @
72d34a87
...
...
@@ -28,6 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include "redis.h"
...
...
@@ -969,13 +972,8 @@ void replicationEmptyDbCallback(void *privdata) {
#define REPL_MAX_WRITTEN_BEFORE_FSYNC (1024*1024*8)
/* 8 MB */
void
readSyncBulkPayload
(
aeEventLoop
*
el
,
int
fd
,
void
*
privdata
,
int
mask
)
{
char
buf
[
4096
];
#ifdef _WIN64
int64_t
nread
,
readlen
;
int64_t
left
;
#else
ssize_t
nread
,
readlen
;
off_t
left
;
#endif
REDIS_NOTUSED
(
el
);
REDIS_NOTUSED
(
privdata
);
REDIS_NOTUSED
(
mask
);
...
...
src/rio.c
浏览文件 @
72d34a87
...
...
@@ -44,6 +44,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "win32_interop/win32_types.h"
#include "fmacros.h"
#include <string.h>
...
...
src/zmalloc.c
浏览文件 @
72d34a87
...
...
@@ -28,6 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _WIN32
#include "win32_Interop/win32_types.h"
#endif
#include <stdio.h>
#include <stdlib.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录