From 6f07da35714ed19149be572952eb5bc5584f7fc4 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 2 Nov 2010 18:52:38 +0000 Subject: Add a BOTAN_DEPRECATED macro which can provide compile-time deprecation warnings (at least for GCC and VC++). Use in some places. --- src/build-data/buildh.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/build-data/buildh.in') diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 03f8b8f2e..53c66e133 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -57,12 +57,23 @@ %{target_compiler_defines} -#if defined(BOTAN_BUILD_COMPILER_IS_MSVC) +#if defined(_MSC_VER) // 4250: inherits via dominance (diamond inheritence issue) // 4251: needs DLL interface (STL DLL exports) #pragma warning(disable: 4250 4251) #endif +/* +* Compile-time deprecatation warnings +*/ +#if defined(__GNUG__) + #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated, warning(why))) +#elif defined(_MSC_VER) + #define BOTAN_DEPRECATED(msg) __declspec(deprecated(why)) +#else + #define BOTAN_DEPRECATED(msg) +#endif + /* Module definitions */ %{module_defines} -- cgit v1.2.3