diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-26 05:35:42 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-03-26 05:35:42 +0000 |
commit | 3569c3c86d520bd04ea806f84c9cb5aad0615fdf (patch) | |
tree | f9fcb5772dd668f165b69e502f9ca9886c920e27 /include/gtest/internal | |
parent | 2429dfc6414762a692d3fbe02e8f00bbcba58c5e (diff) | |
download | googletest-3569c3c86d520bd04ea806f84c9cb5aad0615fdf.tar.gz googletest-3569c3c86d520bd04ea806f84c9cb5aad0615fdf.tar.bz2 googletest-3569c3c86d520bd04ea806f84c9cb5aad0615fdf.zip |
Fixes compatibility with Visual Age versions lower than 9.0 (by Hady Zalek); updates the release notes.
Diffstat (limited to 'include/gtest/internal')
-rw-r--r-- | include/gtest/internal/gtest-port.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 1b2d2dec..66cfe46e 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -335,24 +335,19 @@ #define GTEST_HAS_RTTI 0 #endif -#elif defined(__GNUC__) - // Starting with version 4.3.2, gcc defines __GXX_RTTI iff RTTI is enabled. -#if GTEST_GCC_VER_ >= 40302 +#elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40302) + #ifdef __GXX_RTTI #define GTEST_HAS_RTTI 1 #else #define GTEST_HAS_RTTI 0 #endif // __GXX_RTTI -#else -// For gcc versions smaller than 4.3.2, we assume RTTI is enabled. -#define GTEST_HAS_RTTI 1 -#endif // GTEST_GCC_VER >= 40302 -#elif defined(__IBMCPP__) +// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if +// both the typeid and dynamic_cast features are present. +#elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) -// IBM Visual Age defines __RTTI_ALL__ to 1 if both the typeid and -// dynamic_cast features are present. #ifdef __RTTI_ALL__ #define GTEST_HAS_RTTI 1 #else @@ -361,7 +356,7 @@ #else -// Unknown compiler - assume RTTI is enabled. +// For all other compilers, we assume RTTI is enabled. #define GTEST_HAS_RTTI 1 #endif // _MSC_VER |