Opened 14 years ago

Closed 14 years ago

#2536 closed Patches (fixed)

cxxabi.h not available with non-GNU library

Reported by: Niklas Angare <li51ckf02@…> Owned by: Matthias Schabel
Milestone: Boost 1.38.0 Component: units
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

cxxabi.h isn't available on QNX 6 when the default Dinkumware library is used. boost/units/detail/utility.hpp assumes that cxxabi.h is available whenever GCC is used (with one exception).

The first attached patch utility.hpp.QNX.patch adds a check that the GNU C++ Library is used on QNX 6. It doesn't affect other OSes.

The second alternative patch utility.hpp.clean.patch is a cleanup for all platforms that just checks if the GNU C++ Library is used and enables demangling with cxxabi.h if it is.

According to the documentation, either _GLIBCXX_ or _GLIBCPP_ is defined by the library ever since GCC 3.1:
http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch03s04.html

Unless the demangling code absolutely needs to be used on GCC 3.0.x or on other platforms with cxxabi.h but no GNU library (if they exist), I would suggest the cleanup patch.

The definition of BOOST_UNITS_USE_DEMANGLING and the second #if seemed redundant so I removed them. The two #if lines were the same at revision 46171 but they had since gone out of sync.

All tests for Units pass with either the GNU library or the Dinkumware library with either patch on QNX 6.4.0 (GCC 4.2.4).

Attachments (2)

utility.hpp.QNX.patch (495 bytes ) - added by Niklas Angare <li51ckf02@…> 14 years ago.
utility.hpp.clean.patch (896 bytes ) - added by Niklas Angare <li51ckf02@…> 14 years ago.

Download all attachments as: .zip

Change History (3)

by Niklas Angare <li51ckf02@…>, 14 years ago

Attachment: utility.hpp.QNX.patch added

by Niklas Angare <li51ckf02@…>, 14 years ago

Attachment: utility.hpp.clean.patch added

comment:1 by Steven Watanabe, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in the trunk in [49945] Merged to release in [50236]

Note: See TracTickets for help on using tickets.