Updated Sleep declaration only includes _mingw.h when needed.

This commit is contained in:
Edward Diener
2015-07-22 18:23:43 -04:00
parent acb880d8c2
commit 686efe100b

View File

@ -27,10 +27,6 @@
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/predef.h> #include <boost/predef.h>
#if defined __MINGW32__
#include <_mingw.h>
#endif
#if BOOST_PLAT_WINDOWS_RUNTIME #if BOOST_PLAT_WINDOWS_RUNTIME
#include <thread> #include <thread>
#endif #endif
@ -64,12 +60,17 @@ namespace detail
{ {
#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME #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 ); extern "C" void __stdcall Sleep( unsigned long ms );
#else #else
extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms ); extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms );
#endif #endif
#endif #endif
#endif
inline void yield( unsigned k ) inline void yield( unsigned k )
{ {