]> git.ipfire.org Git - thirdparty/zstd.git/commit
solves warnings when compiling with global XXH_STATIC_LINKING_ONLY
authorYann Collet <cyan@fb.com>
Wed, 1 Mar 2017 19:33:25 +0000 (11:33 -0800)
committerYann Collet <cyan@fb.com>
Wed, 1 Mar 2017 19:33:25 +0000 (11:33 -0800)
commit4bcc69b7616ea7ec39eab75676905a64b2750bed
tree726e036ba5dc668fab2f276b25db2c098a4c7328
parent31432cc57d459e18b660c1623ca72e933a634ef2
solves warnings when compiling with global XXH_STATIC_LINKING_ONLY

XXH_STATIC_LINKING_ONLY protection macro is intended to be triggered just before the include.
The main idea is to keep this setting local :
user module shall explicitly understand and accept the static linking restriction
which becomes transparent when triggering the macro at project level.
Global definition also triggers redefinition warnings for user modules which do locally define the macro.

This new version compiles lib and cli without warning when the macro is set globally.
That's not a scenario to be recommended, since it trades a local effect for a global one,
but it was easy enough to provide from zstd side.
lib/common/xxhash.c
lib/common/zstd_internal.h
lib/compress/zstd_compress.c
lib/compress/zstdmt_compress.c
lib/decompress/zstd_decompress.c
lib/legacy/zstd_v07.c