From 3a0c571272731166774405e1f96b3161827ca09f Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Wed, 11 Apr 2018 16:31:52 -0400 Subject: Add a LZ4_STATIC_LINKING_ONLY Macro to Guard Experimental APIs --- lib/lz4.c | 1 + lib/lz4.h | 2 ++ lib/lz4frame.c | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/lz4.c b/lib/lz4.c index cee85ec..9e6b1e2 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -89,6 +89,7 @@ /*-************************************ * Dependency **************************************/ +#define LZ4_STATIC_LINKING_ONLY #include "lz4.h" /* see also "memory routines" below */ diff --git a/lib/lz4.h b/lib/lz4.h index f90120e..0dfa19e 100644 --- a/lib/lz4.h +++ b/lib/lz4.h @@ -353,6 +353,7 @@ LZ4LIB_API int LZ4_decompress_fast_usingDict (const char* src, char* dst, int or * Their signatures may change. **************************************/ +#ifdef LZ4_STATIC_LINKING_ONLY /*! LZ4_resetStream_fast() : * When an LZ4_stream_t is known to be in a internally coherent state, @@ -414,6 +415,7 @@ LZ4LIB_API int LZ4_compress_fast_extState_fastReset (void* state, const char* sr */ LZ4LIB_API void LZ4_attach_dictionary(LZ4_stream_t *working_stream, const LZ4_stream_t *dictionary_stream); +#endif /*-************************************ * Private definitions diff --git a/lib/lz4frame.c b/lib/lz4frame.c index d973b5f..7608d90 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -74,6 +74,7 @@ You can contact the author at : * Includes **************************************/ #include "lz4frame_static.h" +#define LZ4_STATIC_LINKING_ONLY #include "lz4.h" #define LZ4_HC_STATIC_LINKING_ONLY #include "lz4hc.h" -- cgit v0.12