Merge pull request #348 from terrelln/deprecate

[LZ4F] Allow users to disable LZ4F_DEPRECATE
This commit is contained in:
Yann Collet 2017-04-26 13:13:42 -07:00 committed by GitHub
commit 37ef330cd8

View File

@ -75,12 +75,16 @@ extern "C" {
# define LZ4FLIB_API
#endif
#if defined(_MSC_VER)
# define LZ4F_DEPRECATE(x) x /* __declspec(deprecated) x - only works with C++ */
#elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6))
# define LZ4F_DEPRECATE(x) x __attribute__((deprecated))
#ifdef LZ4F_DISABLE_DEPRECATE_WARNINGS
# define LZ4F_DEPRECATE(x) x
#else
# define LZ4F_DEPRECATE(x) x /* no deprecation warning for this compiler */
# if defined(_MSC_VER)
# define LZ4F_DEPRECATE(x) x /* __declspec(deprecated) x - only works with C++ */
# elif defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6))
# define LZ4F_DEPRECATE(x) x __attribute__((deprecated))
# else
# define LZ4F_DEPRECATE(x) x /* no deprecation warning for this compiler */
# endif
#endif