fix other platform error

This commit is contained in:
Yihao Deng 2024-04-16 09:52:35 +00:00
parent 6f9de676f0
commit 65c7824165
5 changed files with 28 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# xz
if (${TD_LINUX})
ExternalProject_Add(lzma2
GIT_REPOSITORY https://github.com/conor42/fast-lzma2.git
SOURCE_DIR "${TD_CONTRIB_DIR}/lzma2"
@ -9,4 +11,5 @@ ExternalProject_Add(lzma2
BUILD_COMMAND make
INSTALL_COMMAND ""
TEST_COMMAND ""
)
)
endif()

View File

@ -1,5 +1,7 @@
# xz
if (${TD_LINUX})
ExternalProject_Add(xz
GIT_REPOSITORY https://github.com/xz-mirror/xz.git
GIT_TAG v5.4.4
@ -11,4 +13,5 @@ ExternalProject_Add(xz
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
)
endif()

View File

@ -1,5 +1,8 @@
# zlib
if (${TD_LINUX})
ExternalProject_Add(zlib
GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git
GIT_TAG v1.2.11
@ -10,4 +13,5 @@ ExternalProject_Add(zlib
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
)
endif()

View File

@ -1,5 +1,6 @@
# zstb
#ExternalProject_Add(zstd
#GIT_REPOSITORY https://github.com/facebook/zstd.git
#GIT_TAG v1.5.5

View File

@ -50,14 +50,16 @@
#define _DEFAULT_SOURCE
#include "tcompression.h"
#include "lz4.h"
#include "tcompare.h"
#include "tlog.h"
#include "ttypes.h"
// #include "tmsg.h"
#if defined(WINDOWS) || defined(_TD_DARWIN_64)
#else
#include "fast-lzma2.h"
#include "zlib.h"
#include "zstd.h"
#endif
#ifdef TD_TSZ
#include "td_sz.h"
@ -272,6 +274,15 @@ TCompressL1FnSet compressL1Dict[] = {{"PLAIN", NULL, tsCompressPlain2, tsDecompr
{"BIT-PACKING", NULL, tsCompressBoolImp2, tsDecompressBoolImp2},
{"DELTAD", NULL, tsCompressDoubleImp2, tsDecompressDoubleImp2}};
#if defined(WINDOWS) || defined(_TD_DARWIN_64)
TCompressL2FnSet compressL2Dict[] = {
{"unknown", l2ComressInitImpl_disabled, l2CompressImpl_disabled, l2DecompressImpl_disabled},
{"lz4", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
{"zlib", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
{"zstd", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
{"tsz", l2ComressInitImpl_lz4, l2CompressImpl_tsz, l2DecompressImpl_tsz},
{"xz", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4}};
#else
TCompressL2FnSet compressL2Dict[] = {
{"unknown", l2ComressInitImpl_disabled, l2CompressImpl_disabled, l2DecompressImpl_disabled},
{"lz4", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
@ -280,6 +291,8 @@ TCompressL2FnSet compressL2Dict[] = {
{"tsz", l2ComressInitImpl_tsz, l2CompressImpl_tsz, l2DecompressImpl_tsz},
{"xz", l2ComressInitImpl_xz, l2CompressImpl_xz, l2DecompressImpl_xz}};
#endif
static const int32_t TEST_NUMBER = 1;
#define is_bigendian() ((*(char *)&TEST_NUMBER) == 0)
#define SIMPLE8B_MAX_INT64 ((uint64_t)1152921504606846974LL)