diff options
author | Yann Collet <cyan@fb.com> | 2020-08-11 21:03:20 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2020-08-11 21:07:51 (GMT) |
commit | 3dd34df75185f132238451ef4fdb68b83f6fb91a (patch) | |
tree | f3687e83c61c0c5bee9b8a505bef19f58d20596b /lib | |
parent | f328e329b3cec38ec8316d454279b79d19c36fdd (diff) | |
download | lz4-3dd34df75185f132238451ef4fdb68b83f6fb91a.zip lz4-3dd34df75185f132238451ef4fdb68b83f6fb91a.tar.gz lz4-3dd34df75185f132238451ef4fdb68b83f6fb91a.tar.bz2 |
added target lz4-wlib
variant of lz4 linking to liblz4 dynamic library
requires the dynamic library to expose static-only symbols (experimental API)
Example for #888
Diffstat (limited to 'lib')
-rw-r--r-- | lib/README.md | 7 | ||||
-rw-r--r-- | lib/lz4frame.h | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/README.md b/lib/README.md index cba2c34..707d777 100644 --- a/lib/README.md +++ b/lib/README.md @@ -35,12 +35,13 @@ So it's necessary to include all `*.c` and `*.h` files present in `/lib`. Definitions which are not guaranteed to remain stable in future versions, are protected behind macros, such as `LZ4_STATIC_LINKING_ONLY`. -As the name implies, these definitions can only be invoked +As the name strongly implies, these definitions should only be invoked in the context of static linking ***only***. Otherwise, dependent application may fail on API or ABI break in the future. -The associated symbols are also not present in dynamic library by default. +The associated symbols are also not exposed by the dynamic library by default. Should they be nonetheless needed, it's possible to force their publication -by using build macro `LZ4_PUBLISH_STATIC_FUNCTIONS`. +by using build macros `LZ4_PUBLISH_STATIC_FUNCTIONS` +and `LZ4F_PUBLISH_STATIC_FUNCTIONS`. #### Build macros diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 77d682b..c669aec 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -381,7 +381,7 @@ LZ4FLIB_API LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx); * note : Frame header size is variable, but is guaranteed to be * >= LZ4F_HEADER_SIZE_MIN bytes, and <= LZ4F_HEADER_SIZE_MAX bytes. */ -size_t LZ4F_headerSize(const void* src, size_t srcSize); +LZ4FLIB_API size_t LZ4F_headerSize(const void* src, size_t srcSize); /*! LZ4F_getFrameInfo() : * This function extracts frame parameters (max blockSize, dictID, etc.). @@ -498,9 +498,9 @@ extern "C" { * Use at your own risk. */ #ifdef LZ4F_PUBLISH_STATIC_FUNCTIONS -#define LZ4FLIB_STATIC_API LZ4FLIB_API +# define LZ4FLIB_STATIC_API LZ4FLIB_API #else -#define LZ4FLIB_STATIC_API +# define LZ4FLIB_STATIC_API #endif |