Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c81a5e2f
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
c81a5e2f
编写于
12月 21, 2021
作者:
sangshuduo
提交者:
GitHub
12月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-12349]<fix>: make windows compile with VS2013 and VS2022 (#9227)
上级
35ba07bd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
2 deletion
+11
-2
cmake/define.inc
cmake/define.inc
+1
-1
src/os/inc/osAtomic.h
src/os/inc/osAtomic.h
+9
-0
src/os/src/detail/osTime.c
src/os/src/detail/osTime.c
+1
-1
未找到文件。
cmake/define.inc
浏览文件 @
c81a5e2f
...
...
@@ -265,7 +265,7 @@ IF (TD_WINDOWS)
ADD_DEFINITIONS
(
-
D_MBCS
-
D_CRT_SECURE_NO_DEPRECATE
-
D_CRT_NONSTDC_NO_DEPRECATE
)
SET
(
CMAKE_GENERATOR
"NMake Makefiles"
CACHE
INTERNAL
""
FORCE
)
IF
(
NOT
TD_GODLL
)
SET
(
COMMON_FLAGS
"/nologo /WX /wd4018 /wd
5
999 /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-"
)
SET
(
COMMON_FLAGS
"/nologo /WX /wd4018 /wd
4
999 /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-"
)
IF
(
MSVC
AND
(
MSVC_VERSION
GREATER_EQUAL
1900
))
SET
(
COMMON_FLAGS
"${COMMON_FLAGS} /Wv:18"
)
ENDIF
()
...
...
src/os/inc/osAtomic.h
浏览文件 @
c81a5e2f
...
...
@@ -36,7 +36,11 @@ extern "C" {
#define atomic_exchange_8(ptr, val) _InterlockedExchange8((char volatile*)(ptr), (char)(val))
#define atomic_exchange_16(ptr, val) _InterlockedExchange16((short volatile*)(ptr), (short)(val))
#define atomic_exchange_32(ptr, val) _InterlockedExchange((long volatile*)(ptr), (long)(val))
#if _MSC_VER >= 1930
#define atomic_exchange_64(ptr, val) InterlockedExchange64((__int64 volatile*)(ptr), (__int64)(val))
#else
#define atomic_exchange_64(ptr, val) _InterlockedExchange64((__int64 volatile*)(ptr), (__int64)(val))
#endif
#ifdef _WIN64
#define atomic_exchange_ptr(ptr, val) _InterlockedExchangePointer((void* volatile*)(ptr), (void*)(val))
#else
...
...
@@ -91,7 +95,12 @@ extern "C" {
#define atomic_fetch_add_8(ptr, val) _InterlockedExchangeAdd8((char volatile*)(ptr), (char)(val))
#define atomic_fetch_add_16(ptr, val) _InterlockedExchangeAdd16((short volatile*)(ptr), (short)(val))
#define atomic_fetch_add_32(ptr, val) _InterlockedExchangeAdd((long volatile*)(ptr), (long)(val))
#if _MSC_VER >= 1930
#define atomic_fetch_add_64(ptr, val) InterlockedExchangeAdd64((__int64 volatile*)(ptr), (__int64)(val))
#else
#define atomic_fetch_add_64(ptr, val) _InterlockedExchangeAdd64((__int64 volatile*)(ptr), (__int64)(val))
#endif
#define atomic_sub_fetch_8(ptr, val) interlocked_add_fetch_8((char volatile*)(ptr), -(char)(val))
#define atomic_sub_fetch_16(ptr, val) interlocked_add_fetch_16((short volatile*)(ptr), -(short)(val))
...
...
src/os/src/detail/osTime.c
浏览文件 @
c81a5e2f
...
...
@@ -121,7 +121,7 @@ bool checkTzPresent(char *str, int32_t len) {
}
inline
int32_t
taos_parse_time
(
char
*
timestr
,
int64_t
*
time
,
int32_t
len
,
int32_t
timePrec
,
int8_t
day_light
)
{
FORCE_INLINE
int32_t
taos_parse_time
(
char
*
timestr
,
int64_t
*
time
,
int32_t
len
,
int32_t
timePrec
,
int8_t
day_light
)
{
return
taosParseTime
(
timestr
,
time
,
len
,
timePrec
,
day_light
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录