From: Nick Terrell Date: Wed, 26 Apr 2017 17:03:23 +0000 (-0700) Subject: [LZ4F] Allow users to disable LZ4F_DEPRECATE X-Git-Tag: upstream/1.9.3~11^2~87^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b3e807043514ca4d232d9a92fd261fedb3afb13;p=platform%2Fupstream%2Flz4.git [LZ4F] Allow users to disable LZ4F_DEPRECATE --- diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 1b3e498..2e79a17 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -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