From d436bcd12128f7df4b409e88f40e9ee92312f9ac Mon Sep 17 00:00:00 2001 From: "Kirk Shoop (MS OPEN TECH)" Date: Wed, 11 Dec 2013 15:10:53 -0800 Subject: [PATCH 1/4] detail changes for WinRT support --- include/boost/detail/winapi/system.hpp | 14 +++++++++++++- include/boost/detail/winapi/time.hpp | 10 ++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/winapi/system.hpp b/include/boost/detail/winapi/system.hpp index 35b6682..93c8398 100644 --- a/include/boost/detail/winapi/system.hpp +++ b/include/boost/detail/winapi/system.hpp @@ -1,6 +1,9 @@ // system.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba +// Copyright Steve Gates 2013. +// Copyright George Mileka 2013. +// Portions Copyright (c) Microsoft Open Technologies, Inc. // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -20,7 +23,11 @@ namespace detail { namespace winapi { #if defined( BOOST_USE_WINDOWS_H ) typedef ::SYSTEM_INFO SYSTEM_INFO_; - extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *); +# if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP +extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *); +# else +extern "C" __declspec(dllimport) void __stdcall GetNativeSystemInfo (struct system_info *); +# endif #else extern "C" { typedef struct _SYSTEM_INFO { @@ -42,8 +49,13 @@ extern "C" { WORD_ wProcessorRevision; } SYSTEM_INFO_; +# if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *); +# else + __declspec(dllimport) void __stdcall + GetNativeSystemInfo (struct system_info *); +# endif } #endif } diff --git a/include/boost/detail/winapi/time.hpp b/include/boost/detail/winapi/time.hpp index b58df63..3f49599 100644 --- a/include/boost/detail/winapi/time.hpp +++ b/include/boost/detail/winapi/time.hpp @@ -1,6 +1,9 @@ // time.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba +// Copyright Steve Gates 2013. +// Copyright George Mileka 2013. +// Portions Copyright (c) Microsoft Open Technologies, Inc. // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -31,10 +34,15 @@ namespace winapi { #ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime using ::GetSystemTimeAsFileTime; #endif + #ifndef BOOST_WINAPI_FAMILY using ::FileTimeToLocalFileTime; + #endif using ::GetSystemTime; using ::SystemTimeToFileTime; + + #ifndef BOOST_WINAPI_FAMILY using ::GetTickCount; + #endif #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 using ::GetTickCount64; #endif @@ -70,8 +78,10 @@ extern "C" { __declspec(dllimport) int WINAPI SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime, FILETIME_* lpFileTime); + #ifndef BOOST_WINAPI_FAMILY __declspec(dllimport) DWORD_ WINAPI GetTickCount(); + #endif #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 __declspec(dllimport) ULONGLONG_ WINAPI GetTickCount64(); From a46db5a32ea9ad25d9f3b87dc6a2cd39ee44040d Mon Sep 17 00:00:00 2001 From: Steve Gates Date: Tue, 15 Apr 2014 16:50:12 -0700 Subject: [PATCH 2/4] Removing MSOT copyright, replacing with Microsoft. --- include/boost/detail/winapi/system.hpp | 4 +--- include/boost/detail/winapi/time.hpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/boost/detail/winapi/system.hpp b/include/boost/detail/winapi/system.hpp index 93c8398..c68c379 100644 --- a/include/boost/detail/winapi/system.hpp +++ b/include/boost/detail/winapi/system.hpp @@ -1,9 +1,7 @@ // system.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba -// Copyright Steve Gates 2013. -// Copyright George Mileka 2013. -// Portions Copyright (c) Microsoft Open Technologies, Inc. +// Copyright (c) Microsoft Corporation // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt diff --git a/include/boost/detail/winapi/time.hpp b/include/boost/detail/winapi/time.hpp index 3f49599..751ba19 100644 --- a/include/boost/detail/winapi/time.hpp +++ b/include/boost/detail/winapi/time.hpp @@ -1,9 +1,7 @@ // time.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba -// Copyright Steve Gates 2013. -// Copyright George Mileka 2013. -// Portions Copyright (c) Microsoft Open Technologies, Inc. +// Copyright (c) Microsoft Corporation // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt From 78b061c1e1bae1cb63429c893061c3dfca6bcc1e Mon Sep 17 00:00:00 2001 From: Steve Gates Date: Tue, 13 May 2014 16:54:03 -0700 Subject: [PATCH 3/4] Updating macro for detecting WinRT to BOOST_WINDOWS_RUNTIME based on code review feedback. --- include/boost/detail/winapi/time.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/detail/winapi/time.hpp b/include/boost/detail/winapi/time.hpp index 751ba19..09382a2 100644 --- a/include/boost/detail/winapi/time.hpp +++ b/include/boost/detail/winapi/time.hpp @@ -11,6 +11,7 @@ #define BOOST_DETAIL_WINAPI_TIME_HPP #include +#include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once @@ -32,13 +33,13 @@ namespace winapi { #ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime using ::GetSystemTimeAsFileTime; #endif - #ifndef BOOST_WINAPI_FAMILY + #ifndef BOOST_WINDOWS_RUNTIME using ::FileTimeToLocalFileTime; #endif using ::GetSystemTime; using ::SystemTimeToFileTime; - #ifndef BOOST_WINAPI_FAMILY + #ifndef BOOST_WINDOWS_RUNTIME using ::GetTickCount; #endif #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 @@ -76,7 +77,7 @@ extern "C" { __declspec(dllimport) int WINAPI SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime, FILETIME_* lpFileTime); - #ifndef BOOST_WINAPI_FAMILY + #ifndef BOOST_WINDOWS_RUNTIME __declspec(dllimport) DWORD_ WINAPI GetTickCount(); #endif From b4e608fcf2397245bbb11955e5b2447dcc20e7a8 Mon Sep 17 00:00:00 2001 From: Steve Gates Date: Mon, 2 Jun 2014 12:16:56 -0700 Subject: [PATCH 4/4] Updating macro for detecting the Windows Runtime based on accepted changes adding a Boost.Predef. --- include/boost/detail/winapi/system.hpp | 2 +- include/boost/detail/winapi/time.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/detail/winapi/system.hpp b/include/boost/detail/winapi/system.hpp index c68c379..2c2d82a 100644 --- a/include/boost/detail/winapi/system.hpp +++ b/include/boost/detail/winapi/system.hpp @@ -1,7 +1,7 @@ // system.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation 2014 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt diff --git a/include/boost/detail/winapi/time.hpp b/include/boost/detail/winapi/time.hpp index 09382a2..6a6b447 100644 --- a/include/boost/detail/winapi/time.hpp +++ b/include/boost/detail/winapi/time.hpp @@ -1,7 +1,7 @@ // time.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation 2014 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -33,13 +33,13 @@ namespace winapi { #ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime using ::GetSystemTimeAsFileTime; #endif - #ifndef BOOST_WINDOWS_RUNTIME + #if BOOST_PLAT_WINDOWS_DESKTOP using ::FileTimeToLocalFileTime; #endif using ::GetSystemTime; using ::SystemTimeToFileTime; - #ifndef BOOST_WINDOWS_RUNTIME + #if BOOST_PLAT_WINDOWS_DESKTOP using ::GetTickCount; #endif #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 @@ -77,7 +77,7 @@ extern "C" { __declspec(dllimport) int WINAPI SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime, FILETIME_* lpFileTime); - #ifndef BOOST_WINDOWS_RUNTIME + #if BOOST_PLAT_WINDOWS_DESKTOP __declspec(dllimport) DWORD_ WINAPI GetTickCount(); #endif