From 6c23ce8b429c2ed4e8b52edd7026179dc8a9cf8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Fri, 1 Jan 2021 23:44:07 +0100 Subject: [PATCH] Avoid including windows.h --- include/boost/container/detail/mutex.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/container/detail/mutex.hpp b/include/boost/container/detail/mutex.hpp index 56e72a8..7c90f89 100644 --- a/include/boost/container/detail/mutex.hpp +++ b/include/boost/container/detail/mutex.hpp @@ -53,7 +53,8 @@ #endif #if defined(BOOST_WINDOWS) - #include + #include + #include #ifndef BOOST_MUTEX_HELPER #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_WIN32 #endif @@ -135,7 +136,7 @@ #define SPINS_PER_YIELD 63 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) #define SLEEP_EX_DURATION 50 /* delay for yield/sleep */ - #define SPIN_LOCK_YIELD SleepEx(SLEEP_EX_DURATION, FALSE) + #define SPIN_LOCK_YIELD boost::winapi::SleepEx(SLEEP_EX_DURATION, 0) #elif defined (__SVR4) && defined (__sun) /* solaris */ #include #define SPIN_LOCK_YIELD thr_yield();