summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-08-09 19:48:29 +0200
committerJose <jose@zeroc.com>2012-08-09 19:48:29 +0200
commit3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9 (patch)
tree7dcbdc482dbfb57631cd5f1edb9bf967c3790da5 /cpp
parentminor fix (diff)
downloadice-3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9.tar.bz2
ice-3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9.tar.xz
ice-3b0475ea1ca1529cf9ff67a7acf1f088956fdbb9.zip
minor fixes
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/src/IcePatch2/FileServerI.cpp8
-rwxr-xr-xcpp/src/IcePatch2Lib/Util.cpp8
-rw-r--r--cpp/test/IceUtil/unicode/Client.cpp4
3 files changed, 18 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)
{
diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp
index e2525c1440e..0e9881deec5 100644
--- a/cpp/test/IceUtil/unicode/Client.cpp
+++ b/cpp/test/IceUtil/unicode/Client.cpp
@@ -207,7 +207,11 @@ main(int argc, char* argv[])
int fd = IceUtilInternal::open(filepath, O_RDONLY);
test(fd > 0);
+#if defined(_MSC_VER)
test(_close(fd) == 0);
+#else
+ test(close(fd) == 0);
+#endif
FILE* f = IceUtilInternal::fopen(filepath, "r");
test(f != 0);