summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp12
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp5
-rw-r--r--cpp/src/Ice/Initialize.cpp5
-rw-r--r--cpp/src/Ice/Reference.cpp5
-rw-r--r--cpp/src/Ice/SliceChecksums.cpp10
-rw-r--r--cpp/src/IceGrid/NodeI.cpp4
-rw-r--r--cpp/src/IceGrid/ServerI.cpp4
-rw-r--r--cpp/src/IcePatch2/Calc.cpp2
-rw-r--r--cpp/src/IcePatch2/ClientUtil.cpp18
-rw-r--r--cpp/src/IcePatch2/FileServerI.cpp2
-rw-r--r--cpp/src/IcePatch2/OS.cpp35
-rw-r--r--cpp/src/IcePatch2/OS.h5
-rw-r--r--cpp/src/IcePatch2/Server.cpp2
-rw-r--r--cpp/src/IcePatch2/Util.cpp66
-rw-r--r--cpp/src/IceUtil/UUID.cpp5
15 files changed, 109 insertions, 71 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index cc61ce97c52..86e1fc4fba1 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -35,6 +35,9 @@ IceUtil::Handle<IceInternal::GC> theCollector = 0;
}
+namespace
+{
+
struct GarbageCollectorStats
{
GarbageCollectorStats() :
@@ -47,9 +50,6 @@ struct GarbageCollectorStats
IceUtil::Time time;
};
-namespace
-{
-
int communicatorCount = 0;
IceUtil::Mutex* gcMutex = 0;
GarbageCollectorStats gcStats;
@@ -77,9 +77,7 @@ public:
Init init;
-}
-
-static void
+void
printGCStats(const IceInternal::GCStats& stats)
{
if(gcTraceLevel)
@@ -96,6 +94,8 @@ printGCStats(const IceInternal::GCStats& stats)
}
}
+}
+
void
Ice::CommunicatorI::destroy()
{
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index ecce6f07866..32de59ba16e 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -1345,6 +1345,9 @@ IceInternal::IncomingConnectionFactory::read(BasicStream&)
return false;
}
+namespace
+{
+
class PromoteFollower
{
public:
@@ -1364,6 +1367,8 @@ private:
const ThreadPoolPtr _threadPool;
};
+}
+
void
IceInternal::IncomingConnectionFactory::message(BasicStream&, const ThreadPoolPtr& threadPool)
{
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp
index e950b960bb1..e6804109138 100644
--- a/cpp/src/Ice/Initialize.cpp
+++ b/cpp/src/Ice/Initialize.cpp
@@ -108,6 +108,9 @@ Ice::createProperties(int& argc, char* argv[], const PropertiesPtr& defaults, co
return properties;
}
+namespace
+{
+
inline void checkIceVersion(Int version)
{
#ifndef ICE_IGNORE_VERSION
@@ -151,6 +154,8 @@ inline void checkIceVersion(Int version)
#endif
}
+}
+
CommunicatorPtr
Ice::initialize(int& argc, char* argv[], const InitializationData& initializationData, Int version)
{
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index 521699474ec..a77e098f225 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -1830,6 +1830,9 @@ IceInternal::RoutableReference::RoutableReference(const RoutableReference& r) :
{
}
+namespace
+{
+
struct EndpointIsOpaque : public unary_function<EndpointIPtr, bool>
{
public:
@@ -1841,6 +1844,8 @@ public:
}
};
+}
+
vector<EndpointIPtr>
IceInternal::RoutableReference::filterEndpoints(const vector<EndpointIPtr>& allEndpoints) const
{
diff --git a/cpp/src/Ice/SliceChecksums.cpp b/cpp/src/Ice/SliceChecksums.cpp
index 5e5b9f5fd73..122d01a4be9 100644
--- a/cpp/src/Ice/SliceChecksums.cpp
+++ b/cpp/src/Ice/SliceChecksums.cpp
@@ -14,10 +14,11 @@
using namespace std;
using namespace Ice;
-static SliceChecksumDict* _sliceChecksums = 0;
namespace
{
+SliceChecksumDict* _sliceChecksums = 0;
+
IceUtil::Mutex* _mutex = 0;
class Init
@@ -38,8 +39,6 @@ public:
Init init;
-}
-
class SliceChecksumDictDestroyer
{
public:
@@ -50,7 +49,10 @@ public:
_sliceChecksums = 0;
}
};
-static SliceChecksumDictDestroyer destroyer;
+
+SliceChecksumDictDestroyer destroyer;
+
+}
SliceChecksumDict
Ice::sliceChecksums()
diff --git a/cpp/src/IceGrid/NodeI.cpp b/cpp/src/IceGrid/NodeI.cpp
index bf4c17e72c7..5303d82acb9 100644
--- a/cpp/src/IceGrid/NodeI.cpp
+++ b/cpp/src/IceGrid/NodeI.cpp
@@ -1153,8 +1153,8 @@ NodeI::removeServer(const ServerIPtr& server, const std::string& application)
_serversByApplication.erase(p);
string appDir = _dataDir + "/distrib/" + application;
- OS::structstat buf;
- if(OS::osstat(appDir, &buf) != -1 && S_ISDIR(buf.st_mode))
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(appDir, &buf) != -1 && S_ISDIR(buf.st_mode))
{
try
{
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index 901fc5eae30..176c41f20c5 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -97,8 +97,8 @@ chownRecursive(const string& path, uid_t uid, gid_t gid)
{
name = path + "/" + name;
- OS::structstat buf;
- if(OS::osstat(name, &buf) == -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(name, &buf) == -1)
{
throw "cannot stat `" + name + "':\n" + IceUtilInternal::lastErrorToString();
}
diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp
index 5c67f7445ee..9d2472c2ea4 100644
--- a/cpp/src/IcePatch2/Calc.cpp
+++ b/cpp/src/IcePatch2/Calc.cpp
@@ -195,7 +195,7 @@ main(int argc, char* argv[])
string absDataDir = dataDir;
string cwd;
- if(OS::getcwd(cwd) != 0)
+ if(IceInternal::OS::getcwd(cwd) != 0)
{
throw "cannot get the current directory:\n" + IceUtilInternal::lastErrorToString();
}
diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp
index d2198c5d5ba..364be6b8190 100644
--- a/cpp/src/IcePatch2/ClientUtil.cpp
+++ b/cpp/src/IcePatch2/ClientUtil.cpp
@@ -199,6 +199,9 @@ IcePatch2::Patcher::~Patcher()
{
}
+namespace
+{
+
class PatcherGetFileInfoSeqCB : public GetFileInfoSeqCB
{
public:
@@ -291,6 +294,8 @@ private:
typedef IceUtil::Handle<AMIGetFileInfoSeq> AMIGetFileInfoSeqPtr;
+}
+
bool
IcePatch2::Patcher::prepare()
{
@@ -454,7 +459,7 @@ IcePatch2::Patcher::prepare()
sort(_updateFlags.begin(), _updateFlags.end(), FileInfoLess());
string pathLog = simplify(_dataDir + '/' + logFile);
- _log = OS::fopen(pathLog, "w");
+ _log = IceInternal::OS::fopen(pathLog, "w");
if(!_log)
{
throw "cannot open `" + pathLog + "' for writing:\n" + IceUtilInternal::lastErrorToString();
@@ -615,7 +620,7 @@ IcePatch2::Patcher::init(const FileServerPrx& server)
if(!IceUtilInternal::isAbsolutePath(_dataDir))
{
string cwd;
- if(OS::getcwd(cwd) != 0)
+ if(IceInternal::OS::getcwd(cwd) != 0)
{
throw "cannot get the current directory:\n" + IceUtilInternal::lastErrorToString();
}
@@ -714,6 +719,9 @@ IcePatch2::Patcher::updateFiles(const FileInfoSeq& files)
return result;
}
+namespace
+{
+
class AMIGetFileCompressed : public AMI_FileServer_getFileCompressed, public IceUtil::Monitor<IceUtil::Mutex>
{
public:
@@ -774,6 +782,8 @@ private:
typedef IceUtil::Handle<AMIGetFileCompressed> AMIGetFileCompressedPtr;
+}
+
bool
IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const DecompressorPtr& decompressor)
{
@@ -813,7 +823,7 @@ IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const Decompre
if(p->size == 0)
{
string path = simplify(_dataDir + '/' + p->path);
- FILE* fp = OS::fopen(path, "wb");
+ FILE* fp = IceInternal::OS::fopen(path, "wb");
if(fp == 0)
{
throw "cannot open `" + path +"' for writing:\n" + IceUtilInternal::lastErrorToString();
@@ -838,7 +848,7 @@ IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const Decompre
{
}
- FILE* fileBZ2 = OS::fopen(pathBZ2, "wb");
+ FILE* fileBZ2 = IceInternal::OS::fopen(pathBZ2, "wb");
if(fileBZ2 == 0)
{
throw "cannot open `" + pathBZ2 + "' for writing:\n" + IceUtilInternal::lastErrorToString();
diff --git a/cpp/src/IcePatch2/FileServerI.cpp b/cpp/src/IcePatch2/FileServerI.cpp
index 3e14b22e048..7d2c735d174 100644
--- a/cpp/src/IcePatch2/FileServerI.cpp
+++ b/cpp/src/IcePatch2/FileServerI.cpp
@@ -92,7 +92,7 @@ IcePatch2::FileServerI::getFileCompressed_async(const AMD_FileServer_getFileComp
return;
}
- int fd = OS::open(_dataDir + '/' + path + ".bz2", O_RDONLY|O_BINARY);
+ int fd = IceInternal::OS::open(_dataDir + '/' + path + ".bz2", O_RDONLY|O_BINARY);
if(fd == -1)
{
FileAccessException ex;
diff --git a/cpp/src/IcePatch2/OS.cpp b/cpp/src/IcePatch2/OS.cpp
index 61decba5332..dc6b6e2c2f8 100644
--- a/cpp/src/IcePatch2/OS.cpp
+++ b/cpp/src/IcePatch2/OS.cpp
@@ -13,59 +13,60 @@
#include <IceUtil/Unicode.h>
#include <climits>
+#include <sys/stat.h>
+
#ifdef __BCPLUSPLUS__
# include <dir.h>
# include <io.h>
#endif
using namespace std;
-using namespace OS;
#ifdef _WIN32
int
-OS::osstat(const string& path, structstat* buf)
+IceInternal::OS::osstat(const string& path, structstat* buf)
{
return ::_wstat(IceUtil::stringToWstring(path).c_str(), buf);
}
int
-OS::remove(const string& path)
+IceInternal::OS::remove(const string& path)
{
return ::_wremove(IceUtil::stringToWstring(path).c_str());
}
int
-OS::rename(const string& from, const string& to)
+IceInternal::OS::rename(const string& from, const string& to)
{
return ::_wrename(IceUtil::stringToWstring(from).c_str(), IceUtil::stringToWstring(to).c_str());
}
int
-OS::rmdir(const string& path)
+IceInternal::OS::rmdir(const string& path)
{
return ::_wrmdir(IceUtil::stringToWstring(path).c_str());
}
int
-OS::mkdir(const string& path, int)
+IceInternal::OS::mkdir(const string& path, int)
{
return ::_wmkdir(IceUtil::stringToWstring(path).c_str());
}
FILE*
-OS::fopen(const string& path, const string& mode)
+IceInternal::OS::fopen(const string& path, const string& mode)
{
return ::_wfopen(IceUtil::stringToWstring(path).c_str(), IceUtil::stringToWstring(mode).c_str());
}
int
-OS::open(const string& path, int flags)
+IceInternal::OS::open(const string& path, int flags)
{
return ::_wopen(IceUtil::stringToWstring(path).c_str(), flags);
}
int
-OS::getcwd(string& cwd)
+IceInternal::OS::getcwd(string& cwd)
{
wchar_t cwdbuf[_MAX_PATH];
if(_wgetcwd(cwdbuf, _MAX_PATH) == NULL)
@@ -79,49 +80,49 @@ OS::getcwd(string& cwd)
#else
int
-OS::osstat(const string& path, structstat* buf)
+IceInternal::OS::osstat(const string& path, structstat* buf)
{
return ::stat(path.c_str(), buf);
}
int
-OS::remove(const string& path)
+IceInternal::OS::remove(const string& path)
{
return ::remove(path.c_str());
}
int
-OS::rename(const string& from, const string& to)
+IceInternal::OS::rename(const string& from, const string& to)
{
return ::rename(from.c_str(), to.c_str());
}
int
-OS::rmdir(const string& path)
+IceInternal::OS::rmdir(const string& path)
{
return ::rmdir(path.c_str());
}
int
-OS::mkdir(const string& path, int perm)
+IceInternal::OS::mkdir(const string& path, int perm)
{
return ::mkdir(path.c_str(), perm);
}
FILE*
-OS::fopen(const string& path, const string& mode)
+IceInternal::OS::fopen(const string& path, const string& mode)
{
return ::fopen(path.c_str(), mode.c_str());
}
int
-OS::open(const string& path, int flags)
+IceInternal::OS::open(const string& path, int flags)
{
return ::open(path.c_str(), flags);
}
int
-OS::getcwd(string& cwd)
+IceInternal::OS::getcwd(string& cwd)
{
char cwdbuf[PATH_MAX];
if(::getcwd(cwdbuf, PATH_MAX) == NULL)
diff --git a/cpp/src/IcePatch2/OS.h b/cpp/src/IcePatch2/OS.h
index 09352685c51..c3baac4bdd5 100644
--- a/cpp/src/IcePatch2/OS.h
+++ b/cpp/src/IcePatch2/OS.h
@@ -23,6 +23,9 @@
# endif
#endif
+namespace IceInternal
+{
+
namespace OS
{
@@ -57,4 +60,6 @@ ICE_PATCH2_API int getcwd(std::string&);
}
+}
+
#endif
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index 91e71d708aa..a007a154c73 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -125,7 +125,7 @@ IcePatch2::PatcherService::start(int argc, char* argv[])
if(!IceUtilInternal::isAbsolutePath(dataDir))
{
string cwd;
- if(OS::getcwd(cwd) != 0)
+ if(IceInternal::OS::getcwd(cwd) != 0)
{
throw "cannot get the current directory:\n" + IceUtilInternal::lastErrorToString();
}
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index 05d91aa9bec..1c12c1694e4 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -403,9 +403,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();
}
@@ -416,15 +416,15 @@ IcePatch2::remove(const string& pa)
{
const string path = simplify(pa);
- OS::structstat buf;
- if(OS::osstat(path, &buf) == -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString();
}
if(S_ISDIR(buf.st_mode))
{
- if(OS::rmdir(path) == -1)
+ if(IceInternal::OS::rmdir(path) == -1)
{
if(errno == EACCES)
{
@@ -435,7 +435,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();
}
@@ -447,8 +447,8 @@ IcePatch2::removeRecursive(const string& pa)
{
const string path = simplify(pa);
- OS::structstat buf;
- if(OS::osstat(path, &buf) == -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString();
}
@@ -463,7 +463,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();
}
@@ -471,7 +471,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();
}
@@ -607,7 +607,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)
{
@@ -629,8 +629,8 @@ IcePatch2::createDirectoryRecursive(const string& pa)
if(!isRoot(path + "/"))
{
- OS::structstat buf;
- if(OS::osstat(path, &buf) != -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(path, &buf) != -1)
{
if(S_ISDIR(buf.st_mode))
{
@@ -638,7 +638,7 @@ IcePatch2::createDirectoryRecursive(const string& pa)
}
}
- if(OS::mkdir(path, 0777) == -1)
+ if(IceInternal::OS::mkdir(path, 0777) == -1)
{
if(errno != EEXIST)
{
@@ -653,7 +653,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();
@@ -713,13 +713,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();
@@ -854,8 +854,8 @@ IcePatch2::setFileFlags(const string& pa, const FileInfo& info)
{
#ifndef _WIN32 // Windows doesn't support the executable flag
const string path = simplify(pa);
- OS::structstat buf;
- if(OS::osstat(path, &buf) == -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString();
}
@@ -889,8 +889,8 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
}
else
{
- OS::structstat buf;
- if(OS::osstat(getWithoutSuffix(path), &buf) == -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(getWithoutSuffix(path), &buf) == -1)
{
if(errno == ENOENT)
{
@@ -920,8 +920,8 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
else
{
- OS::structstat buf;
- if(OS::osstat(path, &buf) == -1)
+ IceInternal::OS::structstat buf;
+ if(IceInternal::OS::osstat(path, &buf) == -1)
{
throw "cannot stat `" + path + "':\n" + IceUtilInternal::lastErrorToString();
}
@@ -970,7 +970,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
info.executable = buf.st_mode & S_IXUSR;
#endif
- OS::structstat bufBZ2;
+ IceInternal::OS::structstat bufBZ2;
const string pathBZ2 = path + ".bz2";
bool doCompress = false;
if(buf.st_size != 0 && compress > 0)
@@ -980,7 +980,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
// compress == 1: Compress if necessary.
// compress >= 2: Always compress.
//
- if(compress >= 2 || OS::osstat(pathBZ2, &bufBZ2) == -1 || buf.st_mtime >= bufBZ2.st_mtime)
+ if(compress >= 2 || IceInternal::OS::osstat(pathBZ2, &bufBZ2) == -1 || buf.st_mtime >= bufBZ2.st_mtime)
{
if(cb && !cb->compress(relPath))
{
@@ -1023,7 +1023,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();
@@ -1055,7 +1055,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);
@@ -1069,7 +1069,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();
@@ -1082,7 +1082,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)
@@ -1191,7 +1191,7 @@ getFileInfoSeqInt(const string& basePath, const string& relPath, int compress, G
rename(pathBZ2Temp, pathBZ2);
- if(OS::osstat(pathBZ2, &bufBZ2) == -1)
+ if(IceInternal::OS::osstat(pathBZ2, &bufBZ2) == -1)
{
throw "cannot stat `" + pathBZ2 + "':\n" + IceUtilInternal::lastErrorToString();
}
@@ -1244,7 +1244,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();
@@ -1286,7 +1286,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();
@@ -1313,7 +1313,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;
diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp
index 917609685e3..0748670d2fa 100644
--- a/cpp/src/IceUtil/UUID.cpp
+++ b/cpp/src/IceUtil/UUID.cpp
@@ -56,6 +56,9 @@ PidInitializer pidInitializer;
};
#endif
+namespace
+{
+
// Helper char to hex functions
//
inline void halfByteToHex(unsigned char hb, char*& hexBuffer)
@@ -79,6 +82,8 @@ inline void bytesToHex(unsigned char* bytes, size_t len, char*& hexBuffer)
}
}
+}
+
string
IceUtil::generateUUID()
{