diff options
author | lloyd <[email protected]> | 2010-11-03 15:53:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-11-03 15:53:49 +0000 |
commit | 58d00cd6517adba290510bac0d8f240f033095cb (patch) | |
tree | f59fba0b52659c808d0cfdb336f2a50c97c1c142 | |
parent | 37b9be97f26741fff8fb48ffa21df511e10d6fbe (diff) |
Modify definition of BOTAN_DEPRECATED macro to deal with Clang (which
pretends to be GCC but doesn't understand the warning attribute), and
older GCC (which also has issues with it)
-rw-r--r-- | src/build-data/buildh.in | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 862a3a823..5b524a745 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -76,10 +76,20 @@ */ #if !defined(BOTAN_NO_DEPRECATED_WARNINGS) - #if defined(__GNUG__) - #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated, warning(why))) + #if defined(__clang__) + #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated(why))) + #elif defined(_MSC_VER) #define BOTAN_DEPRECATED(msg) __declspec(deprecated(why)) + + #elif defined(__GNUG__) + + #if BOTAN_GCC_VERSION >= 450 + #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated(why))) + #else + #define BOTAN_DEPRECATED(msg) __attribute__ ((deprecated)) + #endif + #endif #endif |