Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49945 - trunk/boost/units/detail
From: boost_at_[hidden]
Date: 2008-11-26 15:15:34


Author: matthiasschabel
Date: 2008-11-26 15:15:34 EST (Wed, 26 Nov 2008)
New Revision: 49945
URL: http://svn.boost.org/trac/boost/changeset/49945

Log:
fix for OS using gcc without gnu libraries
Text files modified:
   trunk/boost/units/detail/utility.hpp | 11 ++---------
   1 files changed, 2 insertions(+), 9 deletions(-)

Modified: trunk/boost/units/detail/utility.hpp
==============================================================================
--- trunk/boost/units/detail/utility.hpp (original)
+++ trunk/boost/units/detail/utility.hpp 2008-11-26 15:15:34 EST (Wed, 26 Nov 2008)
@@ -21,16 +21,13 @@
 #include <boost/cstdint.hpp>
 #include <boost/limits.hpp>
 
-#if defined(__GNUC__) && defined(__cplusplus) && (__GNUC__ >= 3) && !defined(_RWSTD_VER)
+#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
 #define BOOST_UNITS_USE_DEMANGLING
+#include <cxxabi.h>
 #endif // __GNUC__
 
 #ifdef BOOST_UNITS_USE_DEMANGLING
 
-#if (__GNUC__ && __cplusplus && __GNUC__ >= 3)
-#include <cxxabi.h>
-#endif // __GNUC__
-
 #include <boost/algorithm/string/replace.hpp>
 
 namespace boost {
@@ -43,7 +40,6 @@
 std::string
 demangle(const char* name)
 {
- #if (__GNUC__ && __cplusplus && __GNUC__ >= 3)
     // need to demangle C++ symbols
     char* realname;
     std::size_t len;
@@ -69,9 +65,6 @@
     }
     
     return std::string("demangle :: error - unable to demangle specified symbol");
- #else
- return name;
- #endif
 }
 
 } // namespace detail


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk