Index: sal/osl/unx/file.cxx =================================================================== --- sal/osl/unx/file.cxx (revision 1431776) +++ sal/osl/unx/file.cxx (working copy) @@ -348,7 +348,7 @@ if (!(m_state & STATE_READABLE)) return osl_File_E_BADF; -#if defined(LINUX) || defined(SOLARIS) +#if defined(LINUX) || defined(SOLARIS) || defined(FREEBSD) || defined(MACOSX) ssize_t nBytes = ::pread (m_fd, pBuffer, nBytesRequested, nOffset); if ((-1 == nBytes) && (EOVERFLOW == errno)) @@ -362,7 +362,7 @@ if (-1 == nBytes) return oslTranslateFileError (OSL_FET_ERROR, errno); -#else /* !(LINUX || SOLARIS) */ +#else /* no pread() ! */ if (nOffset != m_offset) { @@ -376,7 +376,7 @@ return oslTranslateFileError (OSL_FET_ERROR, errno); m_offset += nBytes; -#endif /* !(LINUX || SOLARIS) */ +#endif /* no pread() ! */ OSL_FILE_TRACE("FileHandle_Impl::readAt(%d, %lld, %ld)", m_fd, nOffset, nBytes); *pBytesRead = nBytes; @@ -397,13 +397,13 @@ if (!(m_state & STATE_WRITEABLE)) return osl_File_E_BADF; -#if defined(LINUX) || defined(SOLARIS) +#if defined(LINUX) || defined(SOLARIS) || defined(FREEBSD) || defined(MACOSX) ssize_t nBytes = ::pwrite (m_fd, pBuffer, nBytesToWrite, nOffset); if (-1 == nBytes) return oslTranslateFileError (OSL_FET_ERROR, errno); -#else /* !(LINUX || SOLARIS) */ +#else /* no pread() ! */ if (nOffset != m_offset) { @@ -417,7 +417,7 @@ return oslTranslateFileError (OSL_FET_ERROR, errno); m_offset += nBytes; -#endif /* !(LINUX || SOLARIS) */ +#endif /* no pread() ! */ 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));