Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9195: WinRT detection failed
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-03 11:54:03
#9195: WinRT detection failed
-------------------------------+----------------------------
Reporter: anonymous | Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------
Comment (by chris_kohlhoff):
I suspect the problem is even more complicated, because I also need to
ensure the macros in winapifamily.h are defined ahead of the test. As that
header is only available from the v8.0 sdk and later, I've enclosed that
#include within a test for `__cplusplus_winrt`.
Can you please try the following and let me know if it works for you:
{{{
Index: config.hpp
===================================================================
--- config.hpp (revision 86090)
+++ config.hpp (working copy)
@@ -454,11 +454,12 @@
// WinRT target.
#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# if defined(WINAPI_FAMILY)
-# if ((WINAPI_FAMILY & WINAPI_PARTITION_APP) != 0)
+# if defined(__cplusplus_winrt)
+# include <winapifamily.h>
+# if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
# define BOOST_ASIO_WINDOWS_RUNTIME 1
-# endif // ((WINAPI_FAMILY & WINAPI_PARTITION_APP) != 0)
-# endif // defined(WINAPI_FAMILY)
+# endif // WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY,
WINAPI_PARTITION_APP)
+# endif // defined(__cplusplus_winrt)
#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
// Windows target. Excludes WinRT.
@@ -869,12 +870,12 @@
# endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
# endif // defined(__GNUC__) && (defined(__i386__) ||
defined(__x86_64__))
# endif // defined(__linux__)
-# if defined(BOOST_ASIO_MSVC) && defined(WINAPI_FAMILY)
+# if defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
# if (_MSC_VER >= 1700)
# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
# define BOOST_ASIO_THREAD_KEYWORD __declspec(thread)
# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC) && defined(WINAPI_FAMILY)
+# endif // defined(BOOST_ASIO_MSVC) &&
defined(BOOST_ASIO_WINDOWS_RUNTIME)
#endif // !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
#if !defined(BOOST_ASIO_THREAD_KEYWORD)
# define BOOST_ASIO_THREAD_KEYWORD __thread
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9195#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC