summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-09-09 20:47:14 +0200
committerBenoit Foucher <benoit@zeroc.com>2009-09-09 20:47:14 +0200
commit42046f618d3ca66f8fa1ff8f27f862416d3d0ac8 (patch)
tree48f1ef05110d097025e4c68f786713c3cd75a1a3 /cpp/src
parent- cpp/demo/Ice/session now uses a timer for the periodic reaping. (diff)
downloadice-42046f618d3ca66f8fa1ff8f27f862416d3d0ac8.tar.bz2
ice-42046f618d3ca66f8fa1ff8f27f862416d3d0ac8.tar.xz
ice-42046f618d3ca66f8fa1ff8f27f862416d3d0ac8.zip
Fixed Visual Studio compilation error related to printStackTraces and minor cleanup
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Instance.cpp12
-rw-r--r--cpp/src/IceUtil/Exception.cpp21
2 files changed, 8 insertions, 25 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 790c34cead1..c5b2b4bff1b 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -57,17 +57,11 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
-namespace IceUtil
-{
-
-extern bool ICE_DECLSPEC_IMPORT nullHandleAbort;
-
-}
-
namespace IceUtilInternal
{
-extern bool printStackTraces;
+extern bool ICE_DECLSPEC_IMPORT nullHandleAbort;
+extern bool ICE_DECLSPEC_IMPORT printStackTraces;
};
@@ -829,7 +823,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
if(_initData.properties->getPropertyAsInt("Ice.NullHandleAbort") > 0)
{
- IceUtil::nullHandleAbort = true;
+ IceUtilInternal::nullHandleAbort = true;
}
#ifdef NDEBUG
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index a2f973fc979..f3e2cc9b750 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -24,7 +24,8 @@ using namespace std;
namespace IceUtilInternal
{
-bool printStackTraces = false;
+bool ICE_DECLSPEC_EXPORT printStackTraces = false;
+bool ICE_DECLSPEC_EXPORT nullHandleAbort = false;
}
@@ -51,19 +52,7 @@ public:
Init init;
-}
-
-namespace IceUtil
-{
-
-bool ICE_DECLSPEC_EXPORT nullHandleAbort = false;
-
-};
-
#ifdef __GNUC__
-namespace
-{
-
string
getStackTrace()
{
@@ -187,10 +176,10 @@ getStackTrace()
return stackTrace;
}
-
-};
#endif
+}
+
IceUtil::Exception::Exception() :
_file(0),
_line(0)
@@ -293,7 +282,7 @@ IceUtil::operator<<(ostream& out, const IceUtil::Exception& ex)
IceUtil::NullHandleException::NullHandleException(const char* file, int line) :
Exception(file, line)
{
- if(nullHandleAbort)
+ if(IceUtilInternal::nullHandleAbort)
{
abort();
}