summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2017-04-26 20:13:42 (GMT)
committerGitHub <noreply@github.com>2017-04-26 20:13:42 (GMT)
commit37ef330cd8780accf07f872ed465962a56bb8be7 (patch)
treeccde7757fc3d09184ffc2ba3c6edaf509c293bcb
parent31e9ed612bfafade0a8589fb71b6f1f43bd439c2 (diff)
parent0b3e807043514ca4d232d9a92fd261fedb3afb13 (diff)
downloadlz4-37ef330cd8780accf07f872ed465962a56bb8be7.zip
lz4-37ef330cd8780accf07f872ed465962a56bb8be7.tar.gz
lz4-37ef330cd8780accf07f872ed465962a56bb8be7.tar.bz2
Merge pull request #348 from terrelln/deprecate
[LZ4F] Allow users to disable LZ4F_DEPRECATE
-rw-r--r--lib/lz4frame.h14
1 files changed, 9 insertions, 5 deletions
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