diff --git a/contrib/linux-kernel/include/zstd.h b/contrib/linux-kernel/include/zstd.h index 8e1f805d..8b1afa4b 100644 --- a/contrib/linux-kernel/include/zstd.h +++ b/contrib/linux-kernel/include/zstd.h @@ -315,11 +315,6 @@ ZSTDLIB_API size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* outp ZSTDLIB_API size_t ZSTD_DStreamInSize(void); /*!< recommended size for input buffer */ ZSTDLIB_API size_t ZSTD_DStreamOutSize(void); /*!< recommended size for output buffer. Guarantee to successfully flush at least one complete block in all circumstances. */ -#endif /* ZSTD_H_235446 */ - - -#if defined(ZSTD_STATIC_LINKING_ONLY) && !defined(ZSTD_H_ZSTD_STATIC_LINKING_ONLY) -#define ZSTD_H_ZSTD_STATIC_LINKING_ONLY /**************************************************************************************** * START OF ADVANCED AND EXPERIMENTAL FUNCTIONS @@ -753,4 +748,4 @@ ZSTDLIB_API size_t ZSTD_decompressBlock(ZSTD_DCtx* dctx, void* dst, size_t dstCa ZSTDLIB_API size_t ZSTD_insertBlock(ZSTD_DCtx* dctx, const void* blockStart, size_t blockSize); /**< insert block into `dctx` history. Useful for uncompressed blocks */ -#endif /* ZSTD_H_ZSTD_STATIC_LINKING_ONLY */ +#endif /* ZSTD_H_235446 */ diff --git a/contrib/linux-kernel/lib/entropy_common.c b/contrib/linux-kernel/lib/entropy_common.c index c9d489bc..f6a43662 100644 --- a/contrib/linux-kernel/lib/entropy_common.c +++ b/contrib/linux-kernel/lib/entropy_common.c @@ -37,9 +37,7 @@ ***************************************/ #include "mem.h" #include "error_private.h" /* ERR_*, ERROR */ -#define FSE_STATIC_LINKING_ONLY /* FSE_MIN_TABLELOG */ #include "fse.h" -#define HUF_STATIC_LINKING_ONLY /* HUF_TABLELOG_ABSOLUTEMAX */ #include "huf.h" diff --git a/contrib/linux-kernel/lib/fse.h b/contrib/linux-kernel/lib/fse.h index b833f6c2..a5c3980a 100644 --- a/contrib/linux-kernel/lib/fse.h +++ b/contrib/linux-kernel/lib/fse.h @@ -286,8 +286,6 @@ If there is an error, the function will return an error code, which can be teste */ -#ifdef FSE_STATIC_LINKING_ONLY - /* *** Dependency *** */ #include "bitstream.h" @@ -672,7 +670,4 @@ MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr) #define FSE_TABLESTEP(tableSize) ((tableSize>>1) + (tableSize>>3) + 3) -#endif /* FSE_STATIC_LINKING_ONLY */ - - #endif /* FSE_H */ diff --git a/contrib/linux-kernel/lib/fse_compress.c b/contrib/linux-kernel/lib/fse_compress.c index 29071c48..8b85b85f 100644 --- a/contrib/linux-kernel/lib/fse_compress.c +++ b/contrib/linux-kernel/lib/fse_compress.c @@ -43,7 +43,6 @@ ****************************************************************/ #include /* memcpy, memset */ #include "bitstream.h" -#define FSE_STATIC_LINKING_ONLY #include "fse.h" diff --git a/contrib/linux-kernel/lib/fse_decompress.c b/contrib/linux-kernel/lib/fse_decompress.c index 958a068b..ebc228da 100644 --- a/contrib/linux-kernel/lib/fse_decompress.c +++ b/contrib/linux-kernel/lib/fse_decompress.c @@ -44,7 +44,6 @@ ****************************************************************/ #include /* memcpy, memset */ #include "bitstream.h" -#define FSE_STATIC_LINKING_ONLY #include "fse.h" diff --git a/contrib/linux-kernel/lib/huf.h b/contrib/linux-kernel/lib/huf.h index 63306b4b..fd26fcf2 100644 --- a/contrib/linux-kernel/lib/huf.h +++ b/contrib/linux-kernel/lib/huf.h @@ -91,8 +91,6 @@ size_t HUF_compress4X_wksp (void* dst, size_t dstSize, const void* src, size_t s -#ifdef HUF_STATIC_LINKING_ONLY - /* *** Dependencies *** */ #include "mem.h" /* U32 */ @@ -246,6 +244,4 @@ size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const void* cS size_t HUF_decompress1X2_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable); size_t HUF_decompress1X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable); -#endif /* HUF_STATIC_LINKING_ONLY */ - #endif /* HUF_H_298734234 */ diff --git a/contrib/linux-kernel/lib/huf_compress.c b/contrib/linux-kernel/lib/huf_compress.c index af1a1e6c..16576f57 100644 --- a/contrib/linux-kernel/lib/huf_compress.c +++ b/contrib/linux-kernel/lib/huf_compress.c @@ -38,9 +38,7 @@ ****************************************************************/ #include /* memcpy, memset */ #include "bitstream.h" -#define FSE_STATIC_LINKING_ONLY /* FSE_optimalTableLog_internal */ #include "fse.h" /* header compression */ -#define HUF_STATIC_LINKING_ONLY #include "huf.h" diff --git a/contrib/linux-kernel/lib/huf_decompress.c b/contrib/linux-kernel/lib/huf_decompress.c index 1e19666a..4ac28bec 100644 --- a/contrib/linux-kernel/lib/huf_decompress.c +++ b/contrib/linux-kernel/lib/huf_decompress.c @@ -44,7 +44,6 @@ #include /* memcpy, memset */ #include "bitstream.h" /* BIT_* */ #include "fse.h" /* header compression */ -#define HUF_STATIC_LINKING_ONLY #include "huf.h" diff --git a/contrib/linux-kernel/lib/xxhash.c b/contrib/linux-kernel/lib/xxhash.c index 1918836d..44392265 100644 --- a/contrib/linux-kernel/lib/xxhash.c +++ b/contrib/linux-kernel/lib/xxhash.c @@ -73,9 +73,6 @@ static void XXH_free (void* p) { free(p); } #include static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); } -#ifndef XXH_STATIC_LINKING_ONLY -# define XXH_STATIC_LINKING_ONLY -#endif #include "xxhash.h" #include "mem.h" diff --git a/contrib/linux-kernel/lib/xxhash.h b/contrib/linux-kernel/lib/xxhash.h index b6a56707..6c4c79c4 100644 --- a/contrib/linux-kernel/lib/xxhash.h +++ b/contrib/linux-kernel/lib/xxhash.h @@ -206,9 +206,6 @@ XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH64_canonical_t* dst, XXH64_hash_t XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t* src); XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src); -#endif /* XXHASH_H_5627135585666179 */ - - /* ================================================================================================ This section contains definitions which are not guaranteed to remain stable. @@ -216,34 +213,31 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src They shall only be used with static linking. Never use these definitions in association with dynamic linking ! =================================================================================================== */ -#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXH_STATIC_H_3543687687345) -#define XXH_STATIC_H_3543687687345 - /* These definitions are only meant to allow allocation of XXH state statically, on stack, or in a struct for example. Do not use members directly. */ - struct XXH32_state_s { - unsigned total_len_32; - unsigned large_len; - unsigned v1; - unsigned v2; - unsigned v3; - unsigned v4; - unsigned mem32[4]; /* buffer defined as U32 for alignment */ - unsigned memsize; - unsigned reserved; /* never read nor write, will be removed in a future version */ - }; /* typedef'd to XXH32_state_t */ +struct XXH32_state_s { + unsigned total_len_32; + unsigned large_len; + unsigned v1; + unsigned v2; + unsigned v3; + unsigned v4; + unsigned mem32[4]; /* buffer defined as U32 for alignment */ + unsigned memsize; + unsigned reserved; /* never read nor write, will be removed in a future version */ +}; /* typedef'd to XXH32_state_t */ - struct XXH64_state_s { - unsigned long long total_len; - unsigned long long v1; - unsigned long long v2; - unsigned long long v3; - unsigned long long v4; - unsigned long long mem64[4]; /* buffer defined as U64 for alignment */ - unsigned memsize; - unsigned reserved[2]; /* never read nor write, will be removed in a future version */ - }; /* typedef'd to XXH64_state_t */ +struct XXH64_state_s { + unsigned long long total_len; + unsigned long long v1; + unsigned long long v2; + unsigned long long v3; + unsigned long long v4; + unsigned long long mem64[4]; /* buffer defined as U64 for alignment */ + unsigned memsize; + unsigned reserved[2]; /* never read nor write, will be removed in a future version */ +}; /* typedef'd to XXH64_state_t */ -#endif /* XXH_STATIC_LINKING_ONLY && XXH_STATIC_H_3543687687345 */ +#endif /* XXHASH_H_5627135585666179 */ diff --git a/contrib/linux-kernel/lib/zstd_common.c b/contrib/linux-kernel/lib/zstd_common.c index 3d24742e..0788b6ef 100644 --- a/contrib/linux-kernel/lib/zstd_common.c +++ b/contrib/linux-kernel/lib/zstd_common.c @@ -13,7 +13,6 @@ * Dependencies ***************************************/ #include "error_private.h" -#define ZSTD_STATIC_LINKING_ONLY #include "zstd.h" /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */ diff --git a/contrib/linux-kernel/lib/zstd_compress.c b/contrib/linux-kernel/lib/zstd_compress.c index d4b9a475..79b7699b 100644 --- a/contrib/linux-kernel/lib/zstd_compress.c +++ b/contrib/linux-kernel/lib/zstd_compress.c @@ -13,9 +13,7 @@ ***************************************/ #include /* memset */ #include "mem.h" -#define FSE_STATIC_LINKING_ONLY /* FSE_encodeSymbol */ #include "fse.h" -#define HUF_STATIC_LINKING_ONLY #include "huf.h" #include "zstd_internal.h" /* includes zstd.h */ diff --git a/contrib/linux-kernel/lib/zstd_decompress.c b/contrib/linux-kernel/lib/zstd_decompress.c index bb72d6a4..10700257 100644 --- a/contrib/linux-kernel/lib/zstd_decompress.c +++ b/contrib/linux-kernel/lib/zstd_decompress.c @@ -26,9 +26,7 @@ *********************************************************/ #include /* memcpy, memmove, memset */ #include "mem.h" /* low level memory routines */ -#define FSE_STATIC_LINKING_ONLY #include "fse.h" -#define HUF_STATIC_LINKING_ONLY #include "huf.h" #include "zstd_internal.h" diff --git a/contrib/linux-kernel/lib/zstd_internal.h b/contrib/linux-kernel/lib/zstd_internal.h index 16a502a6..57ae7739 100644 --- a/contrib/linux-kernel/lib/zstd_internal.h +++ b/contrib/linux-kernel/lib/zstd_internal.h @@ -22,11 +22,7 @@ ***************************************/ #include "mem.h" #include "error_private.h" -#define ZSTD_STATIC_LINKING_ONLY #include "zstd.h" -#ifndef XXH_STATIC_LINKING_ONLY -# define XXH_STATIC_LINKING_ONLY /* XXH64_state_t */ -#endif #include "xxhash.h" /* XXH_reset, update, digest */