Repository: geode-native Updated Branches: refs/heads/develop 0c5c809bf -> ac76aaced
GEODE-2408: Fixes deprecated attribute detection. Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/ac76aace Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/ac76aace Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/ac76aace Branch: refs/heads/develop Commit: ac76aaced574fd36527ceb62979a34e2b5c8e61c Parents: 0c5c809 Author: Jacob Barrett <[email protected]> Authored: Mon Feb 13 18:37:07 2017 -0500 Committer: Jacob Barrett <[email protected]> Committed: Mon Feb 13 18:46:49 2017 -0500 ---------------------------------------------------------------------- src/cppcache/include/gfcpp/gfcpp_globals.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/ac76aace/src/cppcache/include/gfcpp/gfcpp_globals.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/gfcpp/gfcpp_globals.hpp b/src/cppcache/include/gfcpp/gfcpp_globals.hpp index 712fd59..5750ee6 100644 --- a/src/cppcache/include/gfcpp/gfcpp_globals.hpp +++ b/src/cppcache/include/gfcpp/gfcpp_globals.hpp @@ -92,11 +92,18 @@ #endif -#if defined(__has_cpp_attribute) && __has_cpp_attribute(deprecated) +#ifndef __has_cpp_attribute +#define __has_cpp_attribute(x) 0 +#endif + +#if __has_cpp_attribute(deprecated) +// C++14 standard deprecated attribute #define __DEPRECATED__(msg) [[deprecated(msg)]] #elif defined(__GNUC__) -#define __DEPRECATED__(msg) __attribute__(deprecated(msg)) +// GCC style deprecated attribute +#define __DEPRECATED__(msg) __attribute__((deprecated(msg))) #elif defined(_MSC_VER) +// Visual C++ style deprecated attribute #define __DEPRECATED__(msg) __declspec(deprecated(msg)) #else #define __DEPRECATED__(msg) @@ -126,4 +133,4 @@ extern void CPPCACHE_EXPORT setNewAndDelete(pNew, pDelete); #include "Log.hpp" #include "Assert.hpp" -#endif // GEODE_GFCPP_GFCPP_GLOBALS_H_ +#endif // GEODE_GFCPP_GFCPP_GLOBALS_H_
