Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
977589de
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
977589de
编写于
11月 03, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
compile err in windows
上级
9c7640e5
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
7 addition
and
8 deletion
+7
-8
src/os/inc/osWindows.h
src/os/inc/osWindows.h
+0
-1
src/os/src/windows/wFile.c
src/os/src/windows/wFile.c
+5
-5
src/query/src/qTsbuf.c
src/query/src/qTsbuf.c
+1
-1
src/util/src/tkvstore.c
src/util/src/tkvstore.c
+1
-1
未找到文件。
src/os/inc/osWindows.h
浏览文件 @
977589de
...
@@ -136,7 +136,6 @@ typedef int (*__compar_fn_t)(const void *, const void *);
...
@@ -136,7 +136,6 @@ typedef int (*__compar_fn_t)(const void *, const void *);
#define in_addr_t unsigned long
#define in_addr_t unsigned long
#define socklen_t int
#define socklen_t int
#define htobe64 htonll
#define htobe64 htonll
#define twrite write
#define getpid _getpid
#define getpid _getpid
struct
tm
*
localtime_r
(
const
time_t
*
timep
,
struct
tm
*
result
);
struct
tm
*
localtime_r
(
const
time_t
*
timep
,
struct
tm
*
result
);
...
...
src/os/src/windows/wFile.c
浏览文件 @
977589de
...
@@ -40,19 +40,19 @@ void taosGetTmpfilePath(const char *fileNamePrefix, char *dstPath) {
...
@@ -40,19 +40,19 @@ void taosGetTmpfilePath(const char *fileNamePrefix, char *dstPath) {
#define _SEND_FILE_STEP_ 1000
#define _SEND_FILE_STEP_ 1000
int
taosFSendFileImp
(
FILE
*
out_file
,
FILE
*
in_file
,
int64_t
*
offset
,
int32
_t
count
)
{
int
64_t
taosFSendFile
(
FILE
*
out_file
,
FILE
*
in_file
,
int64_t
*
offset
,
int64
_t
count
)
{
fseek
(
in_file
,
(
int32_t
)(
*
offset
),
0
);
fseek
(
in_file
,
(
int32_t
)(
*
offset
),
0
);
int
writeLen
=
0
;
int
64_t
writeLen
=
0
;
uint8_t
buffer
[
_SEND_FILE_STEP_
]
=
{
0
};
uint8_t
buffer
[
_SEND_FILE_STEP_
]
=
{
0
};
for
(
int
len
=
0
;
len
<
(
count
-
_SEND_FILE_STEP_
);
len
+=
_SEND_FILE_STEP_
)
{
for
(
int
64_t
len
=
0
;
len
<
(
count
-
_SEND_FILE_STEP_
);
len
+=
_SEND_FILE_STEP_
)
{
size_t
rlen
=
fread
(
buffer
,
1
,
_SEND_FILE_STEP_
,
in_file
);
size_t
rlen
=
fread
(
buffer
,
1
,
_SEND_FILE_STEP_
,
in_file
);
if
(
rlen
<=
0
)
{
if
(
rlen
<=
0
)
{
return
writeLen
;
return
writeLen
;
}
}
else
if
(
rlen
<
_SEND_FILE_STEP_
)
{
else
if
(
rlen
<
_SEND_FILE_STEP_
)
{
fwrite
(
buffer
,
1
,
rlen
,
out_file
);
fwrite
(
buffer
,
1
,
rlen
,
out_file
);
return
(
int
)(
writeLen
+
rlen
);
return
(
int
64_t
)(
writeLen
+
rlen
);
}
}
else
{
else
{
fwrite
(
buffer
,
1
,
_SEND_FILE_STEP_
,
in_file
);
fwrite
(
buffer
,
1
,
_SEND_FILE_STEP_
,
in_file
);
...
@@ -60,7 +60,7 @@ int taosFSendFileImp(FILE* out_file, FILE* in_file, int64_t* offset, int32_t cou
...
@@ -60,7 +60,7 @@ int taosFSendFileImp(FILE* out_file, FILE* in_file, int64_t* offset, int32_t cou
}
}
}
}
int
remain
=
count
-
writeLen
;
int
64_t
remain
=
count
-
writeLen
;
if
(
remain
>
0
)
{
if
(
remain
>
0
)
{
size_t
rlen
=
fread
(
buffer
,
1
,
remain
,
in_file
);
size_t
rlen
=
fread
(
buffer
,
1
,
remain
,
in_file
);
if
(
rlen
<=
0
)
{
if
(
rlen
<=
0
)
{
...
...
src/query/src/qTsbuf.c
浏览文件 @
977589de
...
@@ -772,7 +772,7 @@ int32_t tsBufMerge(STSBuf* pDestBuf, const STSBuf* pSrcBuf) {
...
@@ -772,7 +772,7 @@ int32_t tsBufMerge(STSBuf* pDestBuf, const STSBuf* pSrcBuf) {
int64_t
offset
=
getDataStartOffset
();
int64_t
offset
=
getDataStartOffset
();
int32_t
size
=
(
int32_t
)
pSrcBuf
->
fileSize
-
(
int32_t
)
offset
;
int32_t
size
=
(
int32_t
)
pSrcBuf
->
fileSize
-
(
int32_t
)
offset
;
ssize
_t
rc
=
taosFSendFile
(
pDestBuf
->
f
,
pSrcBuf
->
f
,
&
offset
,
size
);
int64
_t
rc
=
taosFSendFile
(
pDestBuf
->
f
,
pSrcBuf
->
f
,
&
offset
,
size
);
if
(
rc
==
-
1
)
{
if
(
rc
==
-
1
)
{
// tscError("failed to merge tsBuf from:%s to %s, reason:%s\n", pSrcBuf->path, pDestBuf->path, strerror(errno));
// tscError("failed to merge tsBuf from:%s to %s, reason:%s\n", pSrcBuf->path, pDestBuf->path, strerror(errno));
...
...
src/util/src/tkvstore.c
浏览文件 @
977589de
...
@@ -535,7 +535,7 @@ static int tdRestoreKVStore(SKVStore *pStore) {
...
@@ -535,7 +535,7 @@ static int tdRestoreKVStore(SKVStore *pStore) {
ASSERT
(
pStore
->
info
.
size
==
TD_KVSTORE_HEADER_SIZE
);
ASSERT
(
pStore
->
info
.
size
==
TD_KVSTORE_HEADER_SIZE
);
while
(
true
)
{
while
(
true
)
{
ssize
_t
tsize
=
taosRead
(
pStore
->
fd
,
tbuf
,
sizeof
(
SKVRecord
));
int64
_t
tsize
=
taosRead
(
pStore
->
fd
,
tbuf
,
sizeof
(
SKVRecord
));
if
(
tsize
==
0
)
break
;
if
(
tsize
==
0
)
break
;
if
(
tsize
<
sizeof
(
SKVRecord
))
{
if
(
tsize
<
sizeof
(
SKVRecord
))
{
uError
(
"failed to read %"
PRIzu
" bytes from file %s at offset %"
PRId64
"since %s"
,
sizeof
(
SKVRecord
),
pStore
->
fname
,
uError
(
"failed to read %"
PRIzu
" bytes from file %s at offset %"
PRId64
"since %s"
,
sizeof
(
SKVRecord
),
pStore
->
fname
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录