提交 4d42ec1b 编写于 作者: S Shengliang Guan

TD-1057

上级 afa86981
...@@ -7,7 +7,9 @@ AUX_SOURCE_DIRECTORY(src SRC) ...@@ -7,7 +7,9 @@ AUX_SOURCE_DIRECTORY(src SRC)
IF (TD_LINUX) IF (TD_LINUX)
ADD_LIBRARY(tsdb ${SRC}) ADD_LIBRARY(tsdb ${SRC})
TARGET_LINK_LIBRARIES(tsdb common tutil) TARGET_LINK_LIBRARIES(tsdb common tutil)
# Someone has no gtest directory, so comment it # Someone has no gtest directory, so comment it
# ADD_SUBDIRECTORY(tests) # ADD_SUBDIRECTORY(tests)
ELSEIF (TD_WINDOWS)
ADD_LIBRARY(tsdb ${SRC})
TARGET_LINK_LIBRARIES(tsdb common tutil)
ENDIF () ENDIF ()
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#ifndef _TD_TSDB_MAIN_H_ #ifndef _TD_TSDB_MAIN_H_
#define _TD_TSDB_MAIN_H_ #define _TD_TSDB_MAIN_H_
#include "os.h"
#include "hash.h" #include "hash.h"
#include "tcoding.h" #include "tcoding.h"
#include "tglobal.h" #include "tglobal.h"
...@@ -67,7 +68,7 @@ typedef struct STable { ...@@ -67,7 +68,7 @@ typedef struct STable {
char* sql; char* sql;
void* cqhandle; void* cqhandle;
SRWLatch latch; // TODO: implementa latch functions SRWLatch latch; // TODO: implementa latch functions
T_REF_DECLARE(); T_REF_DECLARE()
} STable; } STable;
typedef struct { typedef struct {
...@@ -115,7 +116,7 @@ typedef struct { ...@@ -115,7 +116,7 @@ typedef struct {
} STableData; } STableData;
typedef struct { typedef struct {
T_REF_DECLARE(); T_REF_DECLARE()
SRWLatch latch; SRWLatch latch;
TSKEY keyFirst; TSKEY keyFirst;
TSKEY keyLast; TSKEY keyLast;
...@@ -127,10 +128,19 @@ typedef struct { ...@@ -127,10 +128,19 @@ typedef struct {
} SMemTable; } SMemTable;
enum { TSDB_UPDATE_META, TSDB_DROP_META }; enum { TSDB_UPDATE_META, TSDB_DROP_META };
#ifdef WINDOWS
#pragma pack(push ,1)
typedef struct {
#else
typedef struct __attribute__((packed)){ typedef struct __attribute__((packed)){
#endif
char act; char act;
uint64_t uid; uint64_t uid;
} SActObj; } SActObj;
#ifdef WINDOWS
#pragma pack(pop)
#endif
typedef struct { typedef struct {
int len; int len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册