From 3635dccb60a2260e1cda0002345f7c02988fffcd Mon Sep 17 00:00:00 2001 From: tickduan <417921451@qq.com> Date: Thu, 8 Jul 2021 18:06:35 +0800 Subject: [PATCH] build window lseek problem fixed --- deps/SZ/sz/src/sz.c | 9 --------- deps/SZ/zlib/gzguts.h | 2 ++ deps/SZ/zlib/gzlib.c | 6 ++++++ deps/SZ/zlib/zconf.h | 2 +- deps/SZ/zstd/compress/zstdmt_compress.c | 6 ++++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/deps/SZ/sz/src/sz.c b/deps/SZ/sz/src/sz.c index dcec9670ea..87060b8012 100644 --- a/deps/SZ/sz/src/sz.c +++ b/deps/SZ/sz/src/sz.c @@ -160,15 +160,6 @@ void SZ_Finalize() } } -void modulePath(char *buf, int size) -{ - char path[1024]; - sprintf(path, "/proc/%d/exe", getpid()); - readlink(path, buf, size); - char* pos = strrchr(buf, '/'); - if(pos) - pos[1]=0; -} #ifdef WINDOWS int gettimeofday(struct timeval *tv, struct timezone *tz) { diff --git a/deps/SZ/zlib/gzguts.h b/deps/SZ/zlib/gzguts.h index 990a4d2514..f9e647faf7 100644 --- a/deps/SZ/zlib/gzguts.h +++ b/deps/SZ/zlib/gzguts.h @@ -33,6 +33,8 @@ #ifdef _WIN32 # include +#else +# include #endif #if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) diff --git a/deps/SZ/zlib/gzlib.c b/deps/SZ/zlib/gzlib.c index 4105e6aff9..e2df89474e 100644 --- a/deps/SZ/zlib/gzlib.c +++ b/deps/SZ/zlib/gzlib.c @@ -5,6 +5,12 @@ #include "gzguts.h" +#ifdef WINDOWS +#include +#else +#include +#endif + #if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) # define LSEEK _lseeki64 #else diff --git a/deps/SZ/zlib/zconf.h b/deps/SZ/zlib/zconf.h index 77398c11a1..54b4ac97e6 100644 --- a/deps/SZ/zlib/zconf.h +++ b/deps/SZ/zlib/zconf.h @@ -472,7 +472,7 @@ typedef uLong FAR uLongf; #endif #ifndef Z_SOLO # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +//# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ # ifdef VMS # include /* for off_t */ # endif diff --git a/deps/SZ/zstd/compress/zstdmt_compress.c b/deps/SZ/zstd/compress/zstdmt_compress.c index 6daedca8b3..0c5987b11e 100644 --- a/deps/SZ/zstd/compress/zstdmt_compress.c +++ b/deps/SZ/zstd/compress/zstdmt_compress.c @@ -40,8 +40,10 @@ #if defined(DEBUGLEVEL) && (DEBUGLEVEL>=2) && !defined(_MSC_VER) # include -# include -# include + +//# include +//# include + # define DEBUG_PRINTHEX(l,p,n) { \ unsigned debug_u; \ -- GitLab