From d2a9d5e5fe28c264841ce68f7627f372bab25d0f Mon Sep 17 00:00:00 2001 From: haydentech Date: Tue, 3 Jun 2003 18:34:34 +0000 Subject: [PATCH] Namespace- and gcc3-related fixes git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3407 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/support/DataIO.cpp | 11 ++++++----- src/kits/support/StopWatch.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/kits/support/DataIO.cpp b/src/kits/support/DataIO.cpp index afc73f5c6d..50e3eef1d5 100644 --- a/src/kits/support/DataIO.cpp +++ b/src/kits/support/DataIO.cpp @@ -30,9 +30,10 @@ //------------------------------------------------------------------------------ // Standard Includes ----------------------------------------------------------- -#include +#include #include #include +#include // System Includes ------------------------------------------------------------- #include @@ -198,7 +199,7 @@ BMemoryIO::ReadAt(off_t pos, void *buffer, size_t size) ssize_t sizeRead = 0; if (pos < fLen) { - sizeRead = min(static_cast(size), fLen - pos); + sizeRead = min_c(static_cast(size), fLen - pos); memcpy(buffer, fBuf + pos, sizeRead); } return sizeRead; @@ -217,7 +218,7 @@ BMemoryIO::WriteAt(off_t pos, const void *buffer, size_t size) ssize_t sizeWritten = 0; if (pos < fPhys) { - sizeWritten = min(static_cast(size), fPhys - pos); + sizeWritten = min_c(static_cast(size), fPhys - pos); memcpy(fBuf + pos, buffer, sizeWritten); } @@ -325,7 +326,7 @@ BMallocIO::ReadAt(off_t pos, void *buffer, size_t size) ssize_t sizeRead = 0; if (pos < fLength) { - sizeRead = min(static_cast(size), fLength - pos); + sizeRead = min_c(static_cast(size), fLength - pos); memcpy(buffer, fData + pos, sizeRead); } return sizeRead; @@ -339,7 +340,7 @@ BMallocIO::WriteAt(off_t pos, const void *buffer, size_t size) if (buffer == NULL) return B_BAD_VALUE; - size_t newSize = max(pos + size, static_cast(fLength)); + size_t newSize = max_c(pos + size, static_cast(fLength)); status_t error = B_OK; diff --git a/src/kits/support/StopWatch.cpp b/src/kits/support/StopWatch.cpp index 6d0a53bbb8..6840aacf0c 100644 --- a/src/kits/support/StopWatch.cpp +++ b/src/kits/support/StopWatch.cpp @@ -1,5 +1,5 @@ // 100% done -#include "support/StopWatch.h" +#include #include #include