Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71676 - in branches/release: boost/config/compiler boost/date_time libs/thread/src/win32
From: marshall_at_[hidden]
Date: 2011-05-02 16:56:54


Author: marshall
Date: 2011-05-02 16:56:53 EDT (Mon, 02 May 2011)
New Revision: 71676
URL: http://svn.boost.org/trac/boost/changeset/71676

Log:
Merge fixes to release; Fixes #1988
Properties modified:
   branches/release/boost/config/compiler/visualc.hpp (contents, props changed)
   branches/release/boost/date_time/filetime_functions.hpp (contents, props changed)
   branches/release/libs/thread/src/win32/thread.cpp (contents, props changed)
Text files modified:
   branches/release/boost/config/compiler/visualc.hpp | 8 ++++++--
   branches/release/boost/date_time/filetime_functions.hpp | 6 +++---
   branches/release/libs/thread/src/win32/thread.cpp | 4 ++--
   3 files changed, 11 insertions(+), 7 deletions(-)

Modified: branches/release/boost/config/compiler/visualc.hpp
==============================================================================
--- branches/release/boost/config/compiler/visualc.hpp (original)
+++ branches/release/boost/config/compiler/visualc.hpp 2011-05-02 16:56:53 EDT (Mon, 02 May 2011)
@@ -129,11 +129,15 @@
 #endif
 
 #if defined(_WIN32_WCE) || defined(UNDER_CE)
-# define BOOST_NO_THREADEX
-# define BOOST_NO_GETSYSTEMTIMEASFILETIME
 # define BOOST_NO_SWPRINTF
 #endif
 
+// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE
+#if !defined(_WIN32_WCE) && !defined(UNDER_CE)
+# define BOOST_HAS_THREADEX
+# define BOOST_HAS_GETSYSTEMTIMEASFILETIME
+#endif
+
 //
 // check for exception handling support:
 #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)

Modified: branches/release/boost/date_time/filetime_functions.hpp
==============================================================================
--- branches/release/boost/date_time/filetime_functions.hpp (original)
+++ branches/release/boost/date_time/filetime_functions.hpp 2011-05-02 16:56:53 EDT (Mon, 02 May 2011)
@@ -73,12 +73,12 @@
         file_time ft_utc;
         GetSystemTimeAsFileTime(&ft_utc);
         FileTimeToLocalFileTime(&ft_utc, &ft);
-#elif defined(BOOST_NO_GETSYSTEMTIMEASFILETIME)
+#elif defined(BOOST_HAS_GETSYSTEMTIMEASFILETIME)
+ GetSystemTimeAsFileTime(&ft);
+#else
         system_time st;
         GetSystemTime(&st);
         SystemTimeToFileTime(&st, &ft);
-#else
- GetSystemTimeAsFileTime(&ft);
 #endif
     }
 

Modified: branches/release/libs/thread/src/win32/thread.cpp
==============================================================================
--- branches/release/libs/thread/src/win32/thread.cpp (original)
+++ branches/release/libs/thread/src/win32/thread.cpp 2011-05-02 16:56:53 EDT (Mon, 02 May 2011)
@@ -9,7 +9,6 @@
 
 #include <boost/thread/thread.hpp>
 #include <algorithm>
-#include <windows.h>
 #ifndef UNDER_CE
 #include <process.h>
 #endif
@@ -20,6 +19,7 @@
 #include <boost/throw_exception.hpp>
 #include <boost/thread/detail/tss_hooks.hpp>
 #include <boost/date_time/posix_time/conversion.hpp>
+#include <windows.h>
 
 namespace boost
 {
@@ -67,7 +67,7 @@
                 boost::throw_exception(thread_resource_error());
         }
 
-#ifdef BOOST_NO_THREADEX
+#ifndef BOOST_HAS_THREADEX
 // Windows CE doesn't define _beginthreadex
 
         struct ThreadProxyData


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