Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58782 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-01-06 17:44:49


Author: chris_kohlhoff
Date: 2010-01-06 17:44:48 EST (Wed, 06 Jan 2010)
New Revision: 58782
URL: http://svn.boost.org/trac/boost/changeset/58782

Log:
Disable handler allocation and invocation hooks on g++ 2.x. Refs #3743.

Text files modified:
   trunk/boost/asio/detail/handler_alloc_helpers.hpp | 6 ++++--
   trunk/boost/asio/detail/handler_invoke_helpers.hpp | 3 ++-
   2 files changed, 6 insertions(+), 3 deletions(-)

Modified: trunk/boost/asio/detail/handler_alloc_helpers.hpp
==============================================================================
--- trunk/boost/asio/detail/handler_alloc_helpers.hpp (original)
+++ trunk/boost/asio/detail/handler_alloc_helpers.hpp 2010-01-06 17:44:48 EST (Wed, 06 Jan 2010)
@@ -33,7 +33,8 @@
 template <typename Handler>
 inline void* allocate(std::size_t s, Handler& h)
 {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
+ || BOOST_WORKAROUND(__GNUC__, < 3)
   return ::operator new(s);
 #else
   using namespace boost::asio;
@@ -44,7 +45,8 @@
 template <typename Handler>
 inline void deallocate(void* p, std::size_t s, Handler& h)
 {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
+ || BOOST_WORKAROUND(__GNUC__, < 3)
   ::operator delete(p);
 #else
   using namespace boost::asio;

Modified: trunk/boost/asio/detail/handler_invoke_helpers.hpp
==============================================================================
--- trunk/boost/asio/detail/handler_invoke_helpers.hpp (original)
+++ trunk/boost/asio/detail/handler_invoke_helpers.hpp 2010-01-06 17:44:48 EST (Wed, 06 Jan 2010)
@@ -32,7 +32,8 @@
 template <typename Function, typename Context>
 inline void invoke(const Function& function, Context& context)
 {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
+ || BOOST_WORKAROUND(__GNUC__, < 3)
   Function tmp(function);
   tmp();
 #else


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