diff options
Diffstat (limited to 'src/lib/utils/compiler.h')
-rw-r--r-- | src/lib/utils/compiler.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/utils/compiler.h b/src/lib/utils/compiler.h index c515e0507..abb2a79f0 100644 --- a/src/lib/utils/compiler.h +++ b/src/lib/utils/compiler.h @@ -100,13 +100,16 @@ #if defined(__clang__) #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated)) + #define BOTAN_DEPRECATED_HEADER(hdr) _Pragma("message \"this header is deprecated\"") #elif defined(_MSC_VER) #define BOTAN_DEPRECATED(msg) __declspec(deprecated(msg)) + #define BOTAN_DEPRECATED_HEADER(hdr) __pragma("message \"this header is deprecated\"") #elif defined(__GNUG__) /* msg supported since GCC 4.5, earliest we support is 4.8 */ #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated(msg))) + #define BOTAN_DEPRECATED_HEADER(hdr) _Pragma("GCC warning \"this header is deprecated\"") #endif #endif @@ -115,6 +118,10 @@ #define BOTAN_DEPRECATED(msg) #endif +#if !defined(BOTAN_DEPRECATED_HEADER) + #define BOTAN_DEPRECATED_HEADER(hdr) +#endif + /* * Define BOTAN_NORETURN */ |