Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Rattenking
TDengine
提交
48b1fd65
T
TDengine
项目概览
Rattenking
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
48b1fd65
编写于
10月 26, 2020
作者:
F
freemine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
header file workaround for win_flex
上级
1a5ec2e2
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
54 addition
and
11 deletion
+54
-11
src/connector/odbc/src/todbc_conv.c
src/connector/odbc/src/todbc_conv.c
+2
-1
src/connector/odbc/src/todbc_conv.h
src/connector/odbc/src/todbc_conv.h
+1
-2
src/connector/odbc/src/todbc_flex_workaround.h
src/connector/odbc/src/todbc_flex_workaround.h
+30
-0
src/connector/odbc/src/todbc_scanner.l
src/connector/odbc/src/todbc_scanner.l
+12
-0
src/connector/odbc/src/todbc_util.c
src/connector/odbc/src/todbc_util.c
+0
-3
src/connector/odbc/src/todbc_util.h
src/connector/odbc/src/todbc_util.h
+1
-2
src/connector/odbc/tests/CMakeLists.txt
src/connector/odbc/tests/CMakeLists.txt
+1
-1
src/connector/odbc/tests/main.c
src/connector/odbc/tests/main.c
+7
-2
未找到文件。
src/connector/odbc/src/todbc_conv.c
浏览文件 @
48b1fd65
...
...
@@ -14,9 +14,10 @@
*/
#include "todbc_conv.h"
#include "todbc_util.h"
#include "os.h"
#include <errno.h>
#include <limits.h>
#include <stdio.h>
...
...
src/connector/odbc/src/todbc_conv.h
浏览文件 @
48b1fd65
...
...
@@ -16,8 +16,7 @@
#ifndef _todbc_conv_h_
#define _todbc_conv_h_
#include <inttypes.h>
#include <sqltypes.h>
#include "todbc_flex_workaround.h"
#include <stddef.h>
#include "iconv.h"
...
...
src/connector/odbc/src/todbc_flex_workaround.h
0 → 100644
浏览文件 @
48b1fd65
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _todbc_flex_workaround_h_
#define _todbc_flex_workaround_h_
#ifdef _MSC_VER
#include <winsock2.h>
#include <windows.h>
#endif
#ifndef INT8_MIN
#include <stdint.h>
#endif
#include <sql.h>
#include <sqlext.h>
#endif // _todbc_flex_workaround_h_
src/connector/odbc/src/todbc_scanner.l
浏览文件 @
48b1fd65
%{
#include <winsock2.h>
#include <windows.h>
#include <sql.h>
#include "todbc_util.h"
#include <stdio.h>
#ifdef _MSC_VER
#include "msvcLibgen.h"
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#endif
typedef struct params_s params_t;
struct params_s {
char *key;
...
...
@@ -68,6 +78,8 @@ do { \
%option prefix="todbc_yy"
%option extra-type="struct params_s *"
%option nounistd
%option never-interactive
%option reentrant
%option noyywrap
%option noinput nounput
...
...
src/connector/odbc/src/todbc_util.c
浏览文件 @
48b1fd65
...
...
@@ -17,9 +17,6 @@
#include "iconv.h"
#include <sql.h>
#include <sqltypes.h>
#include <sqlext.h>
#include <stdlib.h>
#include <string.h>
...
...
src/connector/odbc/src/todbc_util.h
浏览文件 @
48b1fd65
...
...
@@ -16,10 +16,9 @@
#ifndef _TODBC_UTIL_H_
#define _TODBC_UTIL_H_
#include "todbc_flex_workaround.h"
#include "todbc_log.h"
#include <stddef.h>
#include <sql.h>
const
char
*
sql_sql_type
(
int
type
);
const
char
*
sql_c_type
(
int
type
);
...
...
src/connector/odbc/tests/CMakeLists.txt
浏览文件 @
48b1fd65
...
...
@@ -9,5 +9,5 @@ ENDIF ()
IF
(
TD_WINDOWS_64
)
AUX_SOURCE_DIRECTORY
(
. SRC
)
ADD_EXECUTABLE
(
tcodbc main.c
)
TARGET_LINK_LIBRARIES
(
tcodbc odbc
)
#
TARGET_LINK_LIBRARIES(tcodbc odbc)
ENDIF
()
src/connector/odbc/tests/main.c
浏览文件 @
48b1fd65
#include
<libgen.h>
#include
"os.h"
#include <sql.h>
#include <sqlext.h>
...
...
@@ -423,7 +423,12 @@ int test_sqls_in_stmt(SQLHENV env, SQLHDBC conn, SQLHSTMT stmt, const char *sqls
char
*
line
=
NULL
;
size_t
len
=
0
;
ssize_t
n
=
getline
(
&
line
,
&
len
,
f
);
ssize_t
n
=
0
;
#ifdef _MSC_VER
n
=
taosGetlineImp
(
&
line
,
&
len
,
f
);
#else
n
=
getline
(
&
line
,
&
len
,
f
);
#endif
if
(
n
==-
1
)
break
;
const
char
*
p
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录