diff options
author | Jose <jose@zeroc.com> | 2012-08-09 19:48:29 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-08-09 19:48:29 +0200 |
commit | 3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9 (patch) | |
tree | 7dcbdc482dbfb57631cd5f1edb9bf967c3790da5 /cpp/src | |
parent | minor fix (diff) | |
download | ice-3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9.tar.bz2 ice-3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9.tar.xz ice-3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9.zip |
minor fixes
Diffstat (limited to 'cpp/src')
-rwxr-xr-x | cpp/src/IcePatch2/FileServerI.cpp | 8 | ||||
-rwxr-xr-x | cpp/src/IcePatch2Lib/Util.cpp | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index 5076329b757..666b8d121de 100755 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -105,7 +105,13 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp return; } - if(_lseek(fd, static_cast<off_t>(pos), SEEK_SET) != static_cast<off_t>(pos)) + if( +#if defined(_MSC_VER) + _lseek(fd, static_cast<off_t>(pos), SEEK_SET) +#else + lseek(fd, static_cast<off_t>(pos), SEEK_SET) +#endif + != static_cast<off_t>(pos)) { IceUtilInternal::close(fd); diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index 3c898621c22..7540d21864f 100755 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -965,7 +965,13 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G while(bytesLeft > 0) { ByteSeq bytes(min(bytesLeft, 1024u*1024)); - if(_read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) == -1) + if( +#if defined(_MSC_VER) + _read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) +#else + read(fd, &bytes[0], static_cast<unsigned int>(bytes.size())) +#endif + == -1) { if(doCompress) { |