From 7d3fe72970e6bf4f56e556dd9b68a5f4876d62e6 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Thu, 26 Feb 2004 18:27:02 +0000 Subject: [PATCH] remove minmax hack from win32.hpp and fix all places that could be affected by the minmax macros [SVN r22394] --- src/condition.cpp | 10 +++++----- src/mac/safe.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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) {