diff options
author | Jose <jose@zeroc.com> | 2009-08-04 00:09:36 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-08-04 00:09:36 +0200 |
commit | 06edd41f4521d79844e4012c3e1630a0cadb49f3 (patch) | |
tree | 4ab5e789489431748c1582f206e6240e5c7ea14d /cpp/src/IcePatch2/Util.cpp | |
parent | initialize integer members of Slice::Unit (diff) | |
download | ice-06edd41f4521d79844e4012c3e1630a0cadb49f3.tar.bz2 ice-06edd41f4521d79844e4012c3e1630a0cadb49f3.tar.xz ice-06edd41f4521d79844e4012c3e1630a0cadb49f3.zip |
4171 - Global namespace pollution
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r-- | cpp/src/IcePatch2/Util.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index 8e5c63dba4c..a46a94b68be 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -404,9 +404,9 @@ IcePatch2::rename(const string& fromPa, const string& toPa) const string fromPath = simplify(fromPa); const string toPath = simplify(toPa); - OS::remove(toPath); // We ignore errors, as the file we are renaming to might not exist. + IceInternal::OS::remove(toPath); // We ignore errors, as the file we are renaming to might not exist. - if(OS::rename(fromPath ,toPath) == -1) + if(IceInternal::OS::rename(fromPath ,toPath) == -1) { throw "cannot rename `" + fromPath + "' to `" + toPath + "': " + IceUtilInternal::lastErrorToString(); } @@ -425,7 +425,7 @@ IcePatch2::remove(const string& pa) if(S_ISDIR(buf.st_mode)) { - if(OS::rmdir(path) == -1) + if(IceInternal::OS::rmdir(path) == -1) { if(errno == EACCES) { @@ -436,7 +436,7 @@ IcePatch2::remove(const string& pa) } else { - if(OS::remove(path) == -1) + if(IceInternal::OS::remove(path) == -1) { throw "cannot remove file `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } @@ -464,7 +464,7 @@ IcePatch2::removeRecursive(const string& pa) if(!isRoot(path)) { - if(OS::rmdir(path) == -1) + if(IceInternal::OS::rmdir(path) == -1) { throw "cannot remove directory `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } @@ -472,7 +472,7 @@ IcePatch2::removeRecursive(const string& pa) } else { - if(OS::remove(path) == -1) + if(IceInternal::OS::remove(path) == -1) { throw "cannot remove file `" + path + "':\n" + IceUtilInternal::lastErrorToString(); } @@ -608,7 +608,7 @@ IcePatch2::createDirectory(const string& pa) { const string path = simplify(pa); - if(OS::mkdir(path, 0777) == -1) + if(IceInternal::OS::mkdir(path, 0777) == -1) { if(errno != EEXIST) { @@ -639,7 +639,7 @@ IcePatch2::createDirectoryRecursive(const string& pa) } } - if(OS::mkdir(path, 0777) == -1) + if(IceInternal::OS::mkdir(path, 0777) == -1) { if(errno != EEXIST) { @@ -654,7 +654,7 @@ IcePatch2::compressBytesToFile(const string& pa, const ByteSeq& bytes, Int pos) { const string path = simplify(pa); - FILE* stdioFile = OS::fopen(path, "wb"); + FILE* stdioFile = IceInternal::OS::fopen(path, "wb"); if(!stdioFile) { throw "cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString(); @@ -714,13 +714,13 @@ IcePatch2::decompressFile(const string& pa) try { - fp = OS::fopen(path, "wb"); + fp = IceInternal::OS::fopen(path, "wb"); if(!fp) { throw "cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString(); } - stdioFileBZ2 = OS::fopen(pathBZ2, "rb"); + stdioFileBZ2 = IceInternal::OS::fopen(pathBZ2, "rb"); if(!stdioFileBZ2) { throw "cannot open `" + pathBZ2 + "' for reading:\n" + IceUtilInternal::lastErrorToString(); @@ -1024,7 +1024,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G // if(doCompress) { - int fd = OS::open(path.c_str(), O_BINARY|O_RDONLY); + int fd = IceInternal::OS::open(path.c_str(), O_BINARY|O_RDONLY); if(fd == -1) { throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); @@ -1056,7 +1056,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G close(fd); const string pathBZ2Temp = path + ".bz2temp"; - FILE* stdioFile = OS::fopen(pathBZ2Temp, "wb"); + FILE* stdioFile = IceInternal::OS::fopen(pathBZ2Temp, "wb"); if(fwrite(&compressedBytes[0], compressedLen, 1, stdioFile) != 1) { fclose(stdioFile); @@ -1070,7 +1070,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G } #endif - int fd = OS::open(path.c_str(), O_BINARY|O_RDONLY); + int fd = IceInternal::OS::open(path.c_str(), O_BINARY|O_RDONLY); if(fd == -1) { throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); @@ -1083,7 +1083,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G BZFILE* bzFile = 0; if(doCompress) { - stdioFile = OS::fopen(simplify(pathBZ2Temp), "wb"); + stdioFile = IceInternal::OS::fopen(simplify(pathBZ2Temp), "wb"); if(!stdioFile) { #if defined(_MSC_VER) && (_MSC_VER >= 1400) @@ -1245,7 +1245,7 @@ IcePatch2::saveFileInfoSeq(const string& pa, const FileInfoSeq& infoSeq) { const string path = simplify(pa + '/' + checksumFile); - FILE* fp = OS::fopen(path, "w"); + FILE* fp = IceInternal::OS::fopen(path, "w"); if(!fp) { throw "cannot open `" + path + "' for writing:\n" + IceUtilInternal::lastErrorToString(); @@ -1287,7 +1287,7 @@ IcePatch2::loadFileInfoSeq(const string& pa, FileInfoSeq& infoSeq) { const string path = simplify(pa + '/' + checksumFile); - FILE* fp = OS::fopen(path, "r"); + FILE* fp = IceInternal::OS::fopen(path, "r"); if(!fp) { throw "cannot open `" + path + "' for reading:\n" + IceUtilInternal::lastErrorToString(); @@ -1314,7 +1314,7 @@ IcePatch2::loadFileInfoSeq(const string& pa, FileInfoSeq& infoSeq) { const string pathLog = simplify(pa + '/' + logFile); - FILE* fp = OS::fopen(pathLog, "r"); + FILE* fp = IceInternal::OS::fopen(pathLog, "r"); if(fp != 0) { FileInfoSeq remove; |