Namespace- and gcc3-related fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
haydentech 2003-06-03 18:34:34 +00:00
parent f5bf638f01
commit d2a9d5e5fe
2 changed files with 7 additions and 6 deletions

View File

@ -30,9 +30,10 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Standard Includes ----------------------------------------------------------- // Standard Includes -----------------------------------------------------------
#include <algobase.h> #include <algorithm>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
// System Includes ------------------------------------------------------------- // System Includes -------------------------------------------------------------
#include <DataIO.h> #include <DataIO.h>
@ -198,7 +199,7 @@ BMemoryIO::ReadAt(off_t pos, void *buffer, size_t size)
ssize_t sizeRead = 0; ssize_t sizeRead = 0;
if (pos < fLen) { if (pos < fLen) {
sizeRead = min(static_cast<off_t>(size), fLen - pos); sizeRead = min_c(static_cast<off_t>(size), fLen - pos);
memcpy(buffer, fBuf + pos, sizeRead); memcpy(buffer, fBuf + pos, sizeRead);
} }
return sizeRead; return sizeRead;
@ -217,7 +218,7 @@ BMemoryIO::WriteAt(off_t pos, const void *buffer, size_t size)
ssize_t sizeWritten = 0; ssize_t sizeWritten = 0;
if (pos < fPhys) { if (pos < fPhys) {
sizeWritten = min(static_cast<off_t>(size), fPhys - pos); sizeWritten = min_c(static_cast<off_t>(size), fPhys - pos);
memcpy(fBuf + pos, buffer, sizeWritten); memcpy(fBuf + pos, buffer, sizeWritten);
} }
@ -325,7 +326,7 @@ BMallocIO::ReadAt(off_t pos, void *buffer, size_t size)
ssize_t sizeRead = 0; ssize_t sizeRead = 0;
if (pos < fLength) { if (pos < fLength) {
sizeRead = min(static_cast<off_t>(size), fLength - pos); sizeRead = min_c(static_cast<off_t>(size), fLength - pos);
memcpy(buffer, fData + pos, sizeRead); memcpy(buffer, fData + pos, sizeRead);
} }
return sizeRead; return sizeRead;
@ -339,7 +340,7 @@ BMallocIO::WriteAt(off_t pos, const void *buffer, size_t size)
if (buffer == NULL) if (buffer == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;
size_t newSize = max(pos + size, static_cast<off_t>(fLength)); size_t newSize = max_c(pos + size, static_cast<off_t>(fLength));
status_t error = B_OK; status_t error = B_OK;

View File

@ -1,5 +1,5 @@
// 100% done // 100% done
#include "support/StopWatch.h" #include <StopWatch.h>
#include <OS.h> #include <OS.h>
#include <stdio.h> #include <stdio.h>