From 2b311f21944bfda0e2b5b5229a098903c4ac2252 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 23 Apr 2016 16:45:35 -0400 Subject: [PATCH] Add CRYPTOPP_DEPRECATED macro --- config.h | 10 ++++++++++ config.recommend | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/config.h b/config.h index 4b543ae9..4e2eb68c 100644 --- a/config.h +++ b/config.h @@ -625,6 +625,16 @@ NAMESPACE_END // Moved from misc.h due to circular depenedencies. #define CRYPTOPP_UNUSED(x) ((void)x) +// ************** Deprecated *************** + +#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_CLANG_VERSION >= 20800) +# define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated (msg))); +#elif (CRYPTOPP_GCC_VERSION) +# define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated)); +#else +# define CRYPTOPP_DEPRECATED(msg) +#endif + // ***************** C++11 related ******************** // Visual Studio began at VS2010, http://msdn.microsoft.com/en-us/library/hh567368%28v=vs.110%29.aspx. diff --git a/config.recommend b/config.recommend index 2dba9225..0189f4e3 100644 --- a/config.recommend +++ b/config.recommend @@ -625,6 +625,16 @@ NAMESPACE_END // Moved from misc.h due to circular depenedencies. #define CRYPTOPP_UNUSED(x) ((void)x) +// ************** Deprecated *************** + +#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_CLANG_VERSION >= 20800) +# define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated (msg))); +#elif (CRYPTOPP_GCC_VERSION) +# define CRYPTOPP_DEPRECATED(msg) __attribute__((deprecated)); +#else +# define CRYPTOPP_DEPRECATED(msg) +#endif + // ***************** C++11 related ******************** // Visual Studio began at VS2010, http://msdn.microsoft.com/en-us/library/hh567368%28v=vs.110%29.aspx.