summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/osl/unx/file.cxx36
1 files changed, 0 insertions, 36 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 2f1a99a71d27..d1840a3ca72f 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -379,8 +379,6 @@ oslFileError FileHandle_Impl::readAt (
return osl_File_E_None;
}
-#if defined(LINUX) || defined(SOLARIS)
-
ssize_t nBytes = ::pread (m_fd, pBuffer, nBytesRequested, nOffset);
if ((-1 == nBytes) && (EOVERFLOW == errno))
{
@@ -393,22 +391,6 @@ oslFileError FileHandle_Impl::readAt (
if (-1 == nBytes)
return oslTranslateFileError (OSL_FET_ERROR, errno);
-#else /* !(LINUX || SOLARIS) */
-
- if (nOffset != m_offset)
- {
- if (-1 == ::lseek (m_fd, nOffset, SEEK_SET))
- return oslTranslateFileError (OSL_FET_ERROR, errno);
- m_offset = nOffset;
- }
-
- ssize_t nBytes = ::read (m_fd, pBuffer, nBytesRequested);
- if (-1 == nBytes)
- return oslTranslateFileError (OSL_FET_ERROR, errno);
- m_offset += nBytes;
-
-#endif /* !(LINUX || SOLARIS) */
-
OSL_FILE_TRACE("FileHandle_Impl::readAt(%d, %lld, %ld)", m_fd, nOffset, nBytes);
*pBytesRead = nBytes;
return osl_File_E_None;
@@ -428,28 +410,10 @@ oslFileError FileHandle_Impl::writeAt (
if (!(m_state & STATE_WRITEABLE))
return osl_File_E_BADF;
-#if defined(LINUX) || defined(SOLARIS)
-
ssize_t nBytes = ::pwrite (m_fd, pBuffer, nBytesToWrite, nOffset);
if (-1 == nBytes)
return oslTranslateFileError (OSL_FET_ERROR, errno);
-#else /* !(LINUX || SOLARIS) */
-
- if (nOffset != m_offset)
- {
- if (-1 == ::lseek (m_fd, nOffset, SEEK_SET))
- return oslTranslateFileError (OSL_FET_ERROR, errno);
- m_offset = nOffset;
- }
-
- ssize_t nBytes = ::write (m_fd, pBuffer, nBytesToWrite);
- if (-1 == nBytes)
- return oslTranslateFileError (OSL_FET_ERROR, errno);
- m_offset += nBytes;
-
-#endif /* !(LINUX || SOLARIS) */
-
OSL_FILE_TRACE("FileHandle_Impl::writeAt(%d, %lld, %ld)", m_fd, nOffset, nBytes);
m_size = std::max (m_size, sal::static_int_cast< sal_uInt64 >(nOffset + nBytes));