Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66289 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-10-30 18:45:41


Author: chris_kohlhoff
Date: 2010-10-30 18:45:29 EDT (Sat, 30 Oct 2010)
New Revision: 66289
URL: http://svn.boost.org/trac/boost/changeset/66289

Log:
Target workaround at non-Apple objective-c++ compilers only, as the previous
workaround broke those platforms. Pragmas push_macro and pop_macro are only
available on gcc 4.4 or later, so use plain ol' #define/#undef instead.

Text files modified:
   trunk/boost/asio/detail/pop_options.hpp | 9 ++++++---
   trunk/boost/asio/detail/push_options.hpp | 13 ++++++++-----
   2 files changed, 14 insertions(+), 8 deletions(-)

Modified: trunk/boost/asio/detail/pop_options.hpp
==============================================================================
--- trunk/boost/asio/detail/pop_options.hpp (original)
+++ trunk/boost/asio/detail/pop_options.hpp 2010-10-30 18:45:29 EDT (Sat, 30 Oct 2010)
@@ -31,9 +31,12 @@
 # pragma pack (pop)
 # endif
 
-# if defined(__OBJC__)
-# pragma pop_macro("Protocol")
-# pragma pop_macro("id")
+# if defined(__OBJC__) && !defined(__APPLE_CC__)
+# if defined(BOOST_ASIO_OBJC_WORKAROUND)
+# undef Protocol
+# undef id
+# undef BOOST_ASIO_OBJC_WORKAROUND
+# endif
 # endif
 
 #elif defined(__KCC)

Modified: trunk/boost/asio/detail/push_options.hpp
==============================================================================
--- trunk/boost/asio/detail/push_options.hpp (original)
+++ trunk/boost/asio/detail/push_options.hpp 2010-10-30 18:45:29 EDT (Sat, 30 Oct 2010)
@@ -31,11 +31,14 @@
 # pragma pack (push, 8)
 # endif
 
-# if defined(__OBJC__)
-# pragma push_macro("Protocol")
-# define Protocol cpp_Protocol
-# pragma push_macro("id")
-# define id cpp_id
+# if defined(__OBJC__) && !defined(__APPLE_CC__)
+# if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
+# if !defined(Protocol) && !defined(id)
+# define Protocol cpp_Protocol
+# define id cpp_id
+# define BOOST_ASIO_OBJC_WORKAROUND
+# endif
+# endif
 # endif
 
 #elif defined(__KCC)


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