diff options
author | Jose <jose@zeroc.com> | 2009-11-27 00:20:42 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-11-27 00:20:42 +0100 |
commit | 7cdc3633275e1106de5aa17ee3ce4a0678227c15 (patch) | |
tree | 84358f440f4bec59988238490d7a3ac7226175cc /cpp/src/IcePatch2/FileServerI.cpp | |
parent | 4279 - alllTest.py fails to run if source path contains white spaces. (diff) | |
download | ice-7cdc3633275e1106de5aa17ee3ce4a0678227c15.tar.bz2 ice-7cdc3633275e1106de5aa17ee3ce4a0678227c15.tar.xz ice-7cdc3633275e1106de5aa17ee3ce4a0678227c15.zip |
4351 - Move _close & close to FileUtil.
Diffstat (limited to 'cpp/src/IcePatch2/FileServerI.cpp')
-rw-r--r-- | cpp/src/IcePatch2/FileServerI.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp index 858eb449a6e..30235000b62 100644 --- a/cpp/src/IcePatch2/FileServerI.cpp +++ b/cpp/src/IcePatch2/FileServerI.cpp @@ -108,11 +108,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp #endif != static_cast<off_t>(pos)) { -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - _close(fd); -#else - close(fd); -#endif + IceUtilInternal::close(fd); ostringstream posStr; posStr << pos; @@ -138,11 +134,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp if((r = read(fd, bytes.get(), static_cast<size_t>(num))) == -1) #endif { -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - _close(fd); -#else - close(fd); -#endif + IceUtilInternal::close(fd); FileAccessException ex; ex.reason = "cannot read `" + path + "': " + strerror(errno); @@ -150,11 +142,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp return; } -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - _close(fd); -#else - close(fd); -#endif + IceUtilInternal::close(fd); ret.first = bytes.get(); ret.second = ret.first + r; |