2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-10 11:52:10 +00:00

Fixed compilation with MSVC-8.

Make sure _WIN32_WINNT is defined when windows.h is included. This is
achieved by (a) making sure boost/detail/winapi/config.hpp is included
before any other headers and (b) BOOST_USE_WINDOWS_H is defined so that
the header defines _WIN32_WINNT based on the default target Windows
version. This ensures that all APIs used by the implementation are
available.

Also extracted WIN32_LEAN_AND_MEAN definition to the Jamfile so that it is
consistently defined for all translation units instead of only tss*.cpp.
This commit is contained in:
Andrey Semashev
2016-07-16 19:50:46 +03:00
parent 6ec16408fc
commit 49ab2e8619
4 changed files with 5 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
//#define BOOST_THREAD_VERSION 3
#include <boost/detail/winapi/config.hpp>
#include <boost/thread/thread_only.hpp>
#include <boost/thread/once.hpp>
#include <boost/thread/tss.hpp>
@@ -28,7 +29,6 @@
#include <stdio.h>
#include <windows.h>
#include <boost/predef/platform.h>
#include <boost/detail/winapi/config.hpp>
#if BOOST_PLAT_WINDOWS_RUNTIME
#include <mutex>