summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-08-14 11:33:44 +0200
committerBenoit Foucher <benoit@zeroc.com>2009-08-14 11:33:44 +0200
commit4b64457fdc377d175ae2ba7e7cceb7f669aea758 (patch)
treee4b083270c351c4b0a3ede12d6edbe251d9a605e
parentFixed encapsulation sizes in raw perf clients (diff)
downloadice-4b64457fdc377d175ae2ba7e7cceb7f669aea758.tar.bz2
ice-4b64457fdc377d175ae2ba7e7cceb7f669aea758.tar.xz
ice-4b64457fdc377d175ae2ba7e7cceb7f669aea758.zip
Review for bug 4071 and fix for bug 4211
-rw-r--r--cpp/demo/Ice/plugin/Makefile2
-rw-r--r--cpp/include/Ice/Config.h5
-rw-r--r--cpp/src/Ice/Service.cpp8
-rw-r--r--cpp/src/IceGrid/Activator.cpp1
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp4
-rw-r--r--cpp/src/IceGrid/PlatformInfo.cpp2
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp2
-rw-r--r--cpp/src/IceUtil/FileUtil.cpp4
8 files changed, 17 insertions, 11 deletions
diff --git a/cpp/demo/Ice/plugin/Makefile b/cpp/demo/Ice/plugin/Makefile
index 4aa23a34d82..7b3a455c85c 100644
--- a/cpp/demo/Ice/plugin/Makefile
+++ b/cpp/demo/Ice/plugin/Makefile
@@ -46,7 +46,7 @@ $(CLIENT): $(OBJS) $(COBJS)
rm -f $@
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
-$(SERVER): $(SOBJS)
+$(SERVER): $(OBJS) $(SOBJS)
rm -f $@
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
diff --git a/cpp/include/Ice/Config.h b/cpp/include/Ice/Config.h
index 1a8167c7a2d..9e4f8c63205 100644
--- a/cpp/include/Ice/Config.h
+++ b/cpp/include/Ice/Config.h
@@ -64,6 +64,9 @@ typedef double Double;
}
+namespace IceInternal
+{
+
// TODO: Should not be inline, this is not performance critical.
#ifdef _WIN32
inline int getSystemErrno() { return GetLastError(); }
@@ -71,4 +74,6 @@ inline int getSystemErrno() { return GetLastError(); }
inline int getSystemErrno() { return errno; }
#endif
+}
+
#endif
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp
index 9ba820445f0..4200764b081 100644
--- a/cpp/src/Ice/Service.cpp
+++ b/cpp/src/Ice/Service.cpp
@@ -1875,7 +1875,7 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa
if(setsid() == -1)
{
SyscallException ex(__FILE__, __LINE__);
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
throw ex;
}
@@ -1892,7 +1892,7 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa
if(pid < 0)
{
SyscallException ex(__FILE__, __LINE__);
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
throw ex;
}
if(pid != 0)
@@ -1908,7 +1908,7 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa
if(chdir("/") != 0)
{
SyscallException ex(__FILE__, __LINE__);
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
throw ex;
}
}
@@ -1926,7 +1926,7 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa
if(fdMax <= 0)
{
SyscallException ex(__FILE__, __LINE__);
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
throw ex;
}
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp
index 00a34e7b66d..ff069bf89dd 100644
--- a/cpp/src/IceGrid/Activator.cpp
+++ b/cpp/src/IceGrid/Activator.cpp
@@ -40,6 +40,7 @@
using namespace std;
using namespace Ice;
+using namespace IceInternal;
using namespace IceGrid;
namespace IceGrid
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index a78d45531a7..a63c8e13a05 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -376,7 +376,7 @@ NodeService::startImpl(int argc, char* argv[])
ostringstream os;
FileException ex(__FILE__, __LINE__);
ex.path = dataPath;
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
os << ex;
error("property `IceGrid.Node.Data' is set to an invalid path:\n" + os.str());
return false;
@@ -388,7 +388,7 @@ NodeService::startImpl(int argc, char* argv[])
ostringstream os;
FileException ex(__FILE__, __LINE__);
ex.path = dataPath;
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
os << ex;
error("property `IceGrid.Node.Data' is set to an invalid path:\n" + os.str());
return false;
diff --git a/cpp/src/IceGrid/PlatformInfo.cpp b/cpp/src/IceGrid/PlatformInfo.cpp
index 8c0843f2cd9..0f6eacd18a7 100644
--- a/cpp/src/IceGrid/PlatformInfo.cpp
+++ b/cpp/src/IceGrid/PlatformInfo.cpp
@@ -179,7 +179,7 @@ PlatformInfo::PlatformInfo(const string& prefix,
if(sysctl(ncpu, 2, &_nProcessors, &sz, 0, 0) == -1)
{
Ice::SyscallException ex(__FILE__, __LINE__);
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
throw ex;
}
#elif defined(__hpux)
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp
index 73ff0e21a4f..4424e748a8d 100644
--- a/cpp/src/IceGrid/RegistryI.cpp
+++ b/cpp/src/IceGrid/RegistryI.cpp
@@ -206,7 +206,7 @@ RegistryI::startImpl()
{
Error out(_communicator->getLogger());
SyscallException ex(__FILE__, __LINE__);
- ex.error = getSystemErrno();
+ ex.error = IceInternal::getSystemErrno();
out << "property `IceGrid.Registry.Data' is set to an invalid path:\n" << ex;
return false;
}
diff --git a/cpp/src/IceUtil/FileUtil.cpp b/cpp/src/IceUtil/FileUtil.cpp
index 2b0b0077543..0bd0e7e46f6 100644
--- a/cpp/src/IceUtil/FileUtil.cpp
+++ b/cpp/src/IceUtil/FileUtil.cpp
@@ -19,7 +19,7 @@
using namespace std;
//
-// Detemine if path is an absolute path
+// Determine if path is an absolute path
//
bool
IceUtilInternal::isAbsolutePath(const string& path)
@@ -60,7 +60,7 @@ IceUtilInternal::isAbsolutePath(const string& path)
}
//
-// Detemine if a directory exists.
+// Determine if a directory exists.
//
bool
IceUtilInternal::directoryExists(const string& path)