From 686efe100bcb8acb240d4eb6169a74f5014247ea Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 22 Jul 2015 18:23:43 -0400 Subject: [PATCH] Updated Sleep declaration only includes _mingw.h when needed. --- include/boost/smart_ptr/detail/yield_k.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/boost/smart_ptr/detail/yield_k.hpp b/include/boost/smart_ptr/detail/yield_k.hpp index 5beefd6..44d1836 100644 --- a/include/boost/smart_ptr/detail/yield_k.hpp +++ b/include/boost/smart_ptr/detail/yield_k.hpp @@ -27,10 +27,6 @@ #include #include -#if defined __MINGW32__ -#include <_mingw.h> -#endif - #if BOOST_PLAT_WINDOWS_RUNTIME #include #endif @@ -64,12 +60,17 @@ namespace detail { #if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME -#if !BOOST_COMP_CLANG || (defined __MINGW32__ && !defined __MINGW64_VERSION_MAJOR) +#if !BOOST_COMP_CLANG || !defined __MINGW32__ + extern "C" void __stdcall Sleep( unsigned long ms ); +#else +#include <_mingw.h> +#if !defined __MINGW64_VERSION_MAJOR extern "C" void __stdcall Sleep( unsigned long ms ); #else extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms ); #endif #endif +#endif inline void yield( unsigned k ) {