diff --git a/src/condition.cpp b/src/condition.cpp index ae3ddfdc..0ac6f4a9 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -40,7 +40,7 @@ condition_impl::condition_impl() { m_gate = reinterpret_cast(CreateSemaphore(0, 1, 1, 0)); m_queue = reinterpret_cast(CreateSemaphore(0, 0, - std::numeric_limits::max(), + (std::numeric_limits::max)(), 0)); m_mutex = reinterpret_cast(CreateMutex(0, 0, 0)); @@ -220,7 +220,7 @@ void condition_impl::do_wait() m_gone = 0; } } - else if (++m_gone == (std::numeric_limits::max() / 2)) + else if (++m_gone == ((std::numeric_limits::max)() / 2)) { // timeout occured, normalize the m_gone count // this may occur if many calls to wait with a timeout are made and @@ -304,7 +304,7 @@ bool condition_impl::do_timed_wait(const xtime& xt) m_gone = 0; } } - else if (++m_gone == (std::numeric_limits::max() / 2)) + else if (++m_gone == ((std::numeric_limits::max)() / 2)) { // timeout occured, normalize the m_gone count // this may occur if many calls to wait with a timeout are made and @@ -568,7 +568,7 @@ void condition_impl::do_wait() m_gone = 0; } } - else if (++m_gone == (std::numeric_limits::max() / 2)) + else if (++m_gone == ((std::numeric_limits::max)() / 2)) { // timeout occured, normalize the m_gone count // this may occur if many calls to wait with a timeout are made and @@ -636,7 +636,7 @@ bool condition_impl::do_timed_wait(const xtime& xt) m_gone = 0; } } - else if (++m_gone == (std::numeric_limits::max() / 2)) + else if (++m_gone == ((std::numeric_limits::max)() / 2)) { // timeout occured, normalize the m_gone count // this may occur if many calls to wait with a timeout are made and diff --git a/src/mac/safe.cpp b/src/mac/safe.cpp index cc858a81..3edce3c6 100644 --- a/src/mac/safe.cpp +++ b/src/mac/safe.cpp @@ -171,7 +171,7 @@ OSStatus safe_wait(function &rFunction, Duration lDuration) // get the expiration time in UpTime units if(lDuration == kDurationForever) { - ullExpiration = ::std::numeric_limits::max(); + ullExpiration = (::std::numeric_limits::max)(); } else if(lDuration == kDurationImmediate) {