Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54526 - trunk/boost/asio/detail
From: chris_at_[hidden]
Date: 2009-06-30 04:22:04


Author: chris_kohlhoff
Date: 2009-06-30 04:22:03 EDT (Tue, 30 Jun 2009)
New Revision: 54526
URL: http://svn.boost.org/trac/boost/changeset/54526

Log:
Check that WINVER is actually defined when using it.

Text files modified:
   trunk/boost/asio/detail/win_iocp_io_service.hpp | 4 ++--
   trunk/boost/asio/detail/win_thread.hpp | 6 +++---
   2 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/boost/asio/detail/win_iocp_io_service.hpp
==============================================================================
--- trunk/boost/asio/detail/win_iocp_io_service.hpp (original)
+++ trunk/boost/asio/detail/win_iocp_io_service.hpp 2009-06-30 04:22:03 EDT (Tue, 30 Jun 2009)
@@ -132,7 +132,7 @@
     while (::InterlockedExchangeAdd(&outstanding_operations_, 0) > 0)
     {
       DWORD bytes_transferred = 0;
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
       DWORD completion_key = 0;
 #else
       DWORD_PTR completion_key = 0;
@@ -419,7 +419,7 @@
 
       // Get the next operation from the queue.
       DWORD bytes_transferred = 0;
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
       DWORD completion_key = 0;
 #else
       DWORD_PTR completion_key = 0;

Modified: trunk/boost/asio/detail/win_thread.hpp
==============================================================================
--- trunk/boost/asio/detail/win_thread.hpp (original)
+++ trunk/boost/asio/detail/win_thread.hpp 2009-06-30 04:22:03 EDT (Tue, 30 Jun 2009)
@@ -40,7 +40,7 @@
 
 unsigned int __stdcall win_thread_function(void* arg);
 
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
 void __stdcall apc_function(ULONG data);
 #else
 void __stdcall apc_function(ULONG_PTR data);
@@ -156,7 +156,7 @@
 private:
   friend unsigned int __stdcall win_thread_function(void* arg);
 
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
   friend void __stdcall apc_function(ULONG);
 #else
   friend void __stdcall apc_function(ULONG_PTR);
@@ -217,7 +217,7 @@
   return 0;
 }
 
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
 inline void __stdcall apc_function(ULONG) {}
 #else
 inline void __stdcall apc_function(ULONG_PTR) {}


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