summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorZeroC Staff <git@zeroc.com>2007-12-21 16:01:29 -0500
committerZeroC Staff <git@zeroc.com>2007-12-21 16:01:29 -0500
commite2371ec5865e46ed5a7f080efafaf3e19bb4a8ee (patch)
tree1a55bd36abebc1623769f8597c24ba1e96fb8732 /cpp/src
parentFixed depend (diff)
downloadice-e2371ec5865e46ed5a7f080efafaf3e19bb4a8ee.tar.bz2
ice-e2371ec5865e46ed5a7f080efafaf3e19bb4a8ee.tar.xz
ice-e2371ec5865e46ed5a7f080efafaf3e19bb4a8ee.zip
Windows / VC6 fixes
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/Ice/StringConverter.cpp5
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp4
-rw-r--r--cpp/src/IceUtil/Cond.cpp22
-rw-r--r--cpp/src/IceUtil/Random.cpp2
-rwxr-xr-xcpp/src/IceUtil/Shared.cpp7
5 files changed, 20 insertions, 20 deletions
diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp
index b5ad213a597..ec88ab47188 100755
--- a/cpp/src/Ice/StringConverter.cpp
+++ b/cpp/src/Ice/StringConverter.cpp
@@ -9,6 +9,7 @@
#include <Ice/StringConverter.h>
#include <IceUtil/IceUtil.h>
+#include <IceUtil/ScopedArray.h>
#include <Ice/LocalException.h>
using namespace IceUtil;
@@ -149,7 +150,7 @@ WindowsStringConverter::toUTF8(const char* sourceStart,
size_t size = 0;
int writtenWchar = 0;
- IceUtil::ScopedArray<wchar_t> wbuffer;
+ ScopedArray<wchar_t> wbuffer;
do
{
size = size == 0 ? static_cast<size_t>(sourceSize) + 2 : 2 * size;
@@ -191,7 +192,7 @@ WindowsStringConverter::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd,
//
size_t size = 0;
int writtenChar = 0;
- IceUtil::ScopedArray<char> buffer;
+ ScopedArray<char> buffer;
do
{
size = size == 0 ? static_cast<size_t>(sourceEnd - sourceStart) + 2 : 2 * size;
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index ab004658ee8..3ab40a4d411 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -574,9 +574,9 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
// Add the service properties to the shared communicator properties.
//
PropertyDict props = svcProperties->getPropertiesForPrefix("");
- for(PropertyDict::const_iterator p = props.begin(); p != props.end(); ++p)
+ for(PropertyDict::const_iterator q = props.begin(); q != props.end(); ++q)
{
- properties->setProperty(p->first, p->second);
+ properties->setProperty(q->first, q->second);
}
//
diff --git a/cpp/src/IceUtil/Cond.cpp b/cpp/src/IceUtil/Cond.cpp
index d1c00138839..f1781c9468f 100644
--- a/cpp/src/IceUtil/Cond.cpp
+++ b/cpp/src/IceUtil/Cond.cpp
@@ -15,54 +15,54 @@
#ifdef _WIN32
-IceUtil::Semaphore::Semaphore(long initial)
+IceUtilInternal::Semaphore::Semaphore(long initial)
{
_sem = CreateSemaphore(0, initial, 0x7fffffff, 0);
if(_sem == INVALID_HANDLE_VALUE)
{
- throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
}
-IceUtil::Semaphore::~Semaphore()
+IceUtilInternal::Semaphore::~Semaphore()
{
CloseHandle(_sem);
}
void
-IceUtil::Semaphore::wait() const
+IceUtilInternal::Semaphore::wait() const
{
int rc = WaitForSingleObject(_sem, INFINITE);
if(rc != WAIT_OBJECT_0)
{
- throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
}
bool
-IceUtil::Semaphore::timedWait(const Time& timeout) const
+IceUtilInternal::Semaphore::timedWait(const IceUtil::Time& timeout) const
{
- Int64 msTimeout = timeout.toMilliSeconds();
+ IceUtil::Int64 msTimeout = timeout.toMilliSeconds();
if(msTimeout < 0 || msTimeout > 0x7FFFFFFF)
{
- throw InvalidTimeoutException(__FILE__, __LINE__, timeout);
+ throw IceUtil::InvalidTimeoutException(__FILE__, __LINE__, timeout);
}
int rc = WaitForSingleObject(_sem, static_cast<DWORD>(msTimeout));
if(rc != WAIT_TIMEOUT && rc != WAIT_OBJECT_0)
{
- throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
return rc != WAIT_TIMEOUT;
}
void
-IceUtil::Semaphore::post(int count) const
+IceUtilInternal::Semaphore::post(int count) const
{
int rc = ReleaseSemaphore(_sem, count, 0);
if(rc == 0)
{
- throw ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
}
diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp
index 69f68d95505..d884dbb9a35 100644
--- a/cpp/src/IceUtil/Random.cpp
+++ b/cpp/src/IceUtil/Random.cpp
@@ -143,7 +143,7 @@ IceUtilInternal::generateRandom(char* buffer, int size)
// mutex.
//
- IceUtilInternal::StaticMutex::Lock lock(staticMutex);
+ IceUtil::StaticMutex::Lock lock(staticMutex);
if(context == NULL)
{
if(!CryptAcquireContext(&context, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
diff --git a/cpp/src/IceUtil/Shared.cpp b/cpp/src/IceUtil/Shared.cpp
index de10b77bc7b..f72583c2711 100755
--- a/cpp/src/IceUtil/Shared.cpp
+++ b/cpp/src/IceUtil/Shared.cpp
@@ -9,10 +9,10 @@
#include <IceUtil/Shared.h>
-#ifdef ICE_HAS_ATOMIC_FUNCTIONS
-
namespace IceUtilInternal
{
+#ifdef ICE_HAS_ATOMIC_FUNCTIONS
+
/*
* atomicSet - set ice_atomic variable
* @v: pointer of type AtomicCounter
@@ -80,9 +80,8 @@ inline int atomicExchangeAdd(int i, AtomicCounter* v)
: "memory");
return tmp + i;
}
-}
#endif
-
+}
using namespace IceUtil;
using namespace IceUtilInternal;