From 704bb6644b964a681d7f70dced6ddcb721dc297c Mon Sep 17 00:00:00 2001 From: David Deakins Date: Thu, 24 Feb 2011 18:21:52 +0000 Subject: [PATCH] Changes to complete Boost.Chrono support for Windows CE. Closes ticket 5218. [SVN r69240] --- include/boost/detail/win/GetCurrentThread.hpp | 8 ++++++++ include/boost/detail/win/GetProcessTimes.hpp | 2 ++ include/boost/detail/win/time.hpp | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/include/boost/detail/win/GetCurrentThread.hpp b/include/boost/detail/win/GetCurrentThread.hpp index a0922e9..4e12d60 100644 --- a/include/boost/detail/win/GetCurrentThread.hpp +++ b/include/boost/detail/win/GetCurrentThread.hpp @@ -14,11 +14,19 @@ namespace boost { namespace detail { namespace win32 { +#if defined( UNDER_CE ) +// Windows CE define GetCurrentThread as an inline function in kfuncs.h +inline HANDLE_ GetCurrentThread() +{ + return ::GetCurrentThread(); +} +#else #if defined( BOOST_USE_WINDOWS_H ) using ::GetCurrentThread; #else extern "C" __declspec(dllimport) HANDLE_ WINAPI GetCurrentThread(); #endif +#endif } } } diff --git a/include/boost/detail/win/GetProcessTimes.hpp b/include/boost/detail/win/GetProcessTimes.hpp index b1d95e0..d8ccb35 100644 --- a/include/boost/detail/win/GetProcessTimes.hpp +++ b/include/boost/detail/win/GetProcessTimes.hpp @@ -14,6 +14,7 @@ namespace boost { namespace detail { namespace win32 { +#if !defined(UNDER_CE) // Windows CE does not define GetProcessTimes #if defined( BOOST_USE_WINDOWS_H ) using ::GetProcessTimes; #else @@ -26,6 +27,7 @@ namespace win32 { LPFILETIME_ lpUserTime ); #endif +#endif } } } diff --git a/include/boost/detail/win/time.hpp b/include/boost/detail/win/time.hpp index 1707423..e1c912b 100644 --- a/include/boost/detail/win/time.hpp +++ b/include/boost/detail/win/time.hpp @@ -23,7 +23,9 @@ namespace win32 { typedef SYSTEMTIME SYSTEMTIME_; typedef SYSTEMTIME* PSYSTEMTIME_; + #ifndef UNDER_CE // Windows CE does not define GetSystemTimeAsFileTime using ::GetSystemTimeAsFileTime; + #endif using ::FileTimeToLocalFileTime; using ::GetSystemTime; using ::SystemTimeToFileTime; @@ -47,8 +49,10 @@ extern "C" { WORD_ wMilliseconds; } SYSTEMTIME_, *PSYSTEMTIME_; + #ifndef UNDER_CE // Windows CE does not define GetSystemTimeAsFileTime __declspec(dllimport) void WINAPI GetSystemTimeAsFileTime(FILETIME_* lpFileTime); + #endif __declspec(dllimport) int WINAPI FileTimeToLocalFileTime(const FILETIME_* lpFileTime, FILETIME_* lpLocalFileTime);