summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-11-28 13:24:18 +0000
committerMarc Laukien <marc@zeroc.com>2001-11-28 13:24:18 +0000
commit322b6cf76f6b3e043b03b288b43850ff3f32b3ce (patch)
tree7b0351256524ae6e2b3aa168ff5f6acdcfdbaad3 /cpp/src
parentUpdate project file for the admin tool. (diff)
downloadice-322b6cf76f6b3e043b03b288b43850ff3f32b3ce.tar.bz2
ice-322b6cf76f6b3e043b03b288b43850ff3f32b3ce.tar.xz
ice-322b6cf76f6b3e043b03b288b43850ff3f32b3ce.zip
fixed the select bug under win32
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp2
-rw-r--r--cpp/src/Ice/Network.cpp4
-rw-r--r--cpp/src/Ice/ThreadPool.cpp8
-rw-r--r--cpp/src/slice2cpp/Main.cpp24
4 files changed, 19 insertions, 19 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index 55b680210e4..60704936022 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -227,7 +227,7 @@ Ice::CommunicatorI::CommunicatorI(const PropertiesPtr& properties)
__setNoDelete(false);
//
- // Se the comments in the header file for an explanation of why we
+ // See the comments in the header file for an explanation of why we
// need _threadPool directly in CommunicatorI.
//
_threadPool = _instance->threadPool();
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 1a84e334806..9bbfa0c5afe 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -608,7 +608,7 @@ void
IceInternal::getLocalAddress(int port, struct sockaddr_in& addr)
{
char host[1024 + 1];
- if (gethostname(host, 1024) == -1)
+ if (gethostname(host, 1024) == SOCKET_ERROR)
{
SystemException ex(__FILE__, __LINE__);
ex.error = getSystemErrno();
@@ -650,7 +650,7 @@ string
IceInternal::getLocalHost(bool numeric)
{
char host[1024 + 1];
- if (gethostname(host, 1024) == -1)
+ if (gethostname(host, 1024) == SOCKET_ERROR)
{
SystemException ex(__FILE__, __LINE__);
ex.error = getSystemErrno();
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 1d99565dbe8..2e319cc912f 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -148,7 +148,7 @@ IceInternal::ThreadPool::getMaxConnections()
IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance) :
_instance(instance),
_destroyed(false),
- _lastFd(-1),
+ _lastFd(INVALID_SOCKET),
_servers(0),
_timeout(0)
{
@@ -361,7 +361,7 @@ IceInternal::ThreadPool::run()
if (!_handlerMap.empty())
{
_maxFd = max(_maxFd, (--_handlerMap.end())->first);
- _minFd = min(_minFd, (--_handlerMap.end())->first);
+ _minFd = min(_minFd, (--_handlerMap.begin())->first);
}
if (_handlerMap.empty() || _servers == 0)
{
@@ -384,10 +384,10 @@ IceInternal::ThreadPool::run()
for (list<int>::reverse_iterator p = _reapList.rbegin(); p != _reapList.rend(); ++p)
{
int fd = *p;
- if (fd != -1)
+ if (fd != INVALID_SOCKET)
{
_reapList.pop_back();
- _reapList.push_front(-1);
+ _reapList.push_front(INVALID_SOCKET);
map<int, pair<EventHandlerPtr, list<int>::iterator> >::iterator q = _handlerMap.find(fd);
q->second.second = _reapList.begin();
handler = q->second.first;
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 5ae2b4b44ee..631cb029763 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -19,18 +19,18 @@ usage(const char* n)
{
cerr << "Usage: " << n << " [options] slice-files...\n";
cerr <<
- "Options:\n"
- "-h, --help Show this message.\n"
- "-v, --version Display the Ice version.\n"
- "-DNAME Define NAME as 1.\n"
- "-DNAME=DEF Define NAME as DEF.\n"
- "-UNAME Remove any definition for NAME.\n"
- "-IDIR Put DIR in the include file search path.\n"
- "--include-dir DIR Use DIR as the header include directory.\n"
- "--output-dir DIR Create files in the directory DIR.\n"
- "--dll-export SYMBOL Use SYMBOL for DLL exports.\n"
- "-d, --debug Print debug messages.\n"
- ;
+ "Options:\n"
+ "-h, --help Show this message.\n"
+ "-v, --version Display the Ice version.\n"
+ "-DNAME Define NAME as 1.\n"
+ "-DNAME=DEF Define NAME as DEF.\n"
+ "-UNAME Remove any definition for NAME.\n"
+ "-IDIR Put DIR in the include file search path.\n"
+ "--include-dir DIR Use DIR as the header include directory.\n"
+ "--output-dir DIR Create files in the directory DIR.\n"
+ "--dll-export SYMBOL Use SYMBOL for DLL exports.\n"
+ "-d, --debug Print debug messages.\n"
+ ;
}
int