|
Boost-Commit : |
From: guillaume.melquiond_at_[hidden]
Date: 2007-11-01 12:01:30
Author: gmelquio
Date: 2007-11-01 12:01:30 EDT (Thu, 01 Nov 2007)
New Revision: 40642
URL: http://svn.boost.org/trac/boost/changeset/40642
Log:
Ported patch from 1.34.1 about conflicting math.h functions on PPC. Commented use of old control function for MSVC.
Text files modified:
trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp | 3 +++
trunk/boost/numeric/interval/detail/ppc_rounding_control.hpp | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
Modified: trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp
==============================================================================
--- trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp (original)
+++ trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp 2007-11-01 12:01:30 EDT (Thu, 01 Nov 2007)
@@ -17,6 +17,9 @@
#include <float.h> // MSVC rounding control
+// Although the function is called _control87, it seems to work for
+// other FPUs too, so it does not have to be changed to _controlfp.
+
namespace boost {
namespace numeric {
namespace interval_lib {
Modified: trunk/boost/numeric/interval/detail/ppc_rounding_control.hpp
==============================================================================
--- trunk/boost/numeric/interval/detail/ppc_rounding_control.hpp (original)
+++ trunk/boost/numeric/interval/detail/ppc_rounding_control.hpp 2007-11-01 12:01:30 EDT (Thu, 01 Nov 2007)
@@ -51,10 +51,14 @@
} // namespace detail
+// Do not declare the following C99 symbols if <math.h> provides them.
+// Otherwise, conflicts may occur, due to differences between prototypes.
+#if !defined(_ISOC99_SOURCE) && !defined(__USE_ISOC99)
extern "C" {
float rintf(float);
double rint(double);
}
+#endif
template<>
struct rounding_control<float>:
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