|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66442 - in trunk/boost: math/tools test test/impl
From: admin_at_[hidden]
Date: 2010-11-07 15:05:06
Author: wash
Date: 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010)
New Revision: 66442
URL: http://svn.boost.org/trac/boost/changeset/66442
Log:
Clang hand-holding, mostly for issues caused by Clang defining GCC macros.
Text files modified:
trunk/boost/math/tools/config.hpp | 2 +-
trunk/boost/test/execution_monitor.hpp | 15 ++++++++-------
trunk/boost/test/impl/execution_monitor.ipp | 18 +++++++++---------
3 files changed, 18 insertions(+), 17 deletions(-)
Modified: trunk/boost/math/tools/config.hpp
==============================================================================
--- trunk/boost/math/tools/config.hpp (original)
+++ trunk/boost/math/tools/config.hpp 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010)
@@ -255,7 +255,7 @@
} // namespace tools
}} // namespace boost namespace math
-#if (defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)
+#if (defined(__linux__) && !defined(__UCLIBC__) && !defined(__clang__)) || defined(__QNX__) || defined(__IBMCPP__)
#include <fenv.h>
Modified: trunk/boost/test/execution_monitor.hpp
==============================================================================
--- trunk/boost/test/execution_monitor.hpp (original)
+++ trunk/boost/test/execution_monitor.hpp 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010)
@@ -77,12 +77,12 @@
#else // based on ISO C standard
-#ifndef __CYGWIN__
-#ifdef __SUNPRO_CC
-#include <stdio.h>
-#endif
-#include <fenv.h>
-#endif
+# if defined(__CYGWIN__) && defined(BOOST_CLANG)
+# if defined(__SUNPRO_CC)
+# include <stdio.h>
+# endif
+# include <fenv.h>
+# endif
#endif
@@ -355,7 +355,7 @@
BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
BOOST_FPE_ALL = MCW_EM,
-#elif defined(__CYGWIN__)
+#elif defined(__CYGWIN__) || defined(BOOST_CLANG)
BOOST_FPE_ALL = 1,
#else
BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
@@ -382,3 +382,4 @@
#include <boost/test/detail/enable_warnings.hpp>
#endif
+
Modified: trunk/boost/test/impl/execution_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/execution_monitor.ipp (original)
+++ trunk/boost/test/impl/execution_monitor.ipp 2010-11-07 15:05:04 EST (Sun, 07 Nov 2010)
@@ -67,7 +67,7 @@
#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
# include <windows.h>
-# if defined(__MWERKS__) || (defined(_MSC_VER) && !defined(UNDER_CE))
+# if defined(__MWERKS__) || (defined(BOOST_MSVC) && !defined(UNDER_CE))
# include <eh.h>
# endif
@@ -79,11 +79,11 @@
typedef unsigned uintptr_t;
# endif
-# if BOOST_WORKAROUND(_MSC_VER, < 1300 ) || defined(UNDER_CE)
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1300 ) || defined(UNDER_CE)
typedef void* uintptr_t;
# endif
-# if !defined(NDEBUG) && defined(_MSC_VER) && !defined(UNDER_CE)
+# if !defined(NDEBUG) && defined(BOOST_MSVC) && !defined(UNDER_CE)
# include <crtdbg.h>
# define BOOST_TEST_CRT_HOOK_TYPE _CRT_REPORT_HOOK
# define BOOST_TEST_CRT_ASSERT _CRT_ASSERT
@@ -96,10 +96,10 @@
# define BOOST_TEST_CRT_SET_HOOK(H) (void*)(H)
# endif
-// como always sets _MSC_VER to 1310, regardless of the
+// como always sets BOOST_MSVC to 1310, regardless of the
// actual underlying msvc version.
-# if (!BOOST_WORKAROUND(_MSC_VER, >= 1400 ) && \
- !defined(__COMO__)) || defined(UNDER_CE)
+# if (!BOOST_WORKAROUND(BOOST_MSVC, >= 1400 ) && \
+ !defined(BOOST_COMO)) || defined(UNDER_CE)
typedef void* _invalid_parameter_handler;
@@ -184,7 +184,7 @@
#ifdef __BORLANDC__
# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) )
-#elif BOOST_WORKAROUND(_MSC_VER, <= 1310) || \
+#elif BOOST_WORKAROUND(BOOST_MSVC, <= 1310) || \
BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) || \
defined(UNDER_CE)
# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) )
@@ -1337,7 +1337,7 @@
#endif
return ~old_cw & BOOST_FPE_ALL;
-#elif defined(__GLIBC__) && defined(__USE_GNU)
+#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG)
::feclearexcept(BOOST_FPE_ALL);
int res = ::feenableexcept( mask );
return res == -1 ? BOOST_FPE_INV : (unsigned)res;
@@ -1372,7 +1372,7 @@
#endif
return ~old_cw & BOOST_FPE_ALL;
-#elif defined(__GLIBC__) && defined(__USE_GNU)
+#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG)
::feclearexcept(BOOST_FPE_ALL);
int res = ::fedisableexcept( mask );
return res == -1 ? BOOST_FPE_INV : (unsigned)res;
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