Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61010 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2010-04-02 20:29:07


Author: chris_kohlhoff
Date: 2010-04-02 20:29:06 EDT (Fri, 02 Apr 2010)
New Revision: 61010
URL: http://svn.boost.org/trac/boost/changeset/61010

Log:
Try to fix compile errors on various platforms in fenced_block.

Text files modified:
   trunk/boost/asio/detail/fenced_block.hpp | 12 ++++++++----
   trunk/boost/asio/detail/gcc_fenced_block.hpp | 6 +++++-
   trunk/boost/asio/detail/win_fenced_block.hpp | 24 ++++++++++++++++++++++--
   3 files changed, 35 insertions(+), 7 deletions(-)

Modified: trunk/boost/asio/detail/fenced_block.hpp
==============================================================================
--- trunk/boost/asio/detail/fenced_block.hpp (original)
+++ trunk/boost/asio/detail/fenced_block.hpp 2010-04-02 20:29:06 EDT (Fri, 02 Apr 2010)
@@ -28,11 +28,13 @@
 #elif defined(__sun)
 # include <boost/asio/detail/solaris_fenced_block.hpp>
 #elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC)
 # include <boost/asio/detail/gcc_fenced_block.hpp>
 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 # include <boost/asio/detail/gcc_x86_fenced_block.hpp>
-#elif defined(BOOST_WINDOWS)
+#elif defined(BOOST_WINDOWS) && !defined(UNDER_CE)
 # include <boost/asio/detail/win_fenced_block.hpp>
 #else
 # include <boost/asio/detail/null_fenced_block.hpp>
@@ -49,11 +51,13 @@
 #elif defined(__sun)
 typedef solaris_fenced_block fenced_block;
 #elif defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC)
 typedef gcc_fenced_block fenced_block;
 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
 typedef gcc_x86_fenced_block fenced_block;
-#elif defined(BOOST_WINDOWS)
+#elif defined(BOOST_WINDOWS) && !defined(UNDER_CE)
 typedef win_fenced_block fenced_block;
 #else
 typedef null_fenced_block fenced_block;

Modified: trunk/boost/asio/detail/gcc_fenced_block.hpp
==============================================================================
--- trunk/boost/asio/detail/gcc_fenced_block.hpp (original)
+++ trunk/boost/asio/detail/gcc_fenced_block.hpp 2010-04-02 20:29:06 EDT (Fri, 02 Apr 2010)
@@ -22,7 +22,9 @@
 #include <boost/asio/detail/pop_options.hpp>
 
 #if defined(__GNUC__) \
- && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
+ && !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !defined(__ICC) && !defined(__ECC)
 
 namespace boost {
 namespace asio {
@@ -55,6 +57,8 @@
 
 #endif // defined(__GNUC__)
        // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4))
+ // && !defined(__INTEL_COMPILER) && !defined(__ICL)
+ // && !defined(__ICC) && !defined(__ECC)
 
 #include <boost/asio/detail/pop_options.hpp>
 

Modified: trunk/boost/asio/detail/win_fenced_block.hpp
==============================================================================
--- trunk/boost/asio/detail/win_fenced_block.hpp (original)
+++ trunk/boost/asio/detail/win_fenced_block.hpp 2010-04-02 20:29:06 EDT (Fri, 02 Apr 2010)
@@ -21,7 +21,7 @@
 #include <boost/config.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
-#if defined(BOOST_WINDOWS)
+#if defined(BOOST_WINDOWS) && !defined(UNDER_CE)
 
 #include <boost/asio/detail/socket_types.hpp>
 
@@ -36,13 +36,33 @@
   // Constructor.
   win_fenced_block()
   {
+#if defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
+# if defined(_M_IX86)
+# pragma warning(push)
+# pragma warning(disable:4793)
+ LONG barrier;
+ __asm { xchg barrier, eax }
+# pragma warning(pop)
+# endif // defined(_M_IX86)
+#else // defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
     MemoryBarrier();
+#endif // defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
   }
 
   // Destructor.
   ~win_fenced_block()
   {
+#if defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
+# if defined(_M_IX86)
+# pragma warning(push)
+# pragma warning(disable:4793)
+ LONG barrier;
+ __asm { xchg barrier, eax }
+# pragma warning(pop)
+# endif // defined(_M_IX86)
+#else // defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
     MemoryBarrier();
+#endif // defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
   }
 };
 
@@ -50,7 +70,7 @@
 } // namespace asio
 } // namespace boost
 
-#endif // defined(BOOST_WINDOWS)
+#endif // defined(BOOST_WINDOWS) && !defined(UNDER_CE)
 
 #include <boost/asio/detail/pop_options.hpp>
 


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