diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-01-03 16:58:37 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-01-03 16:58:37 +0100 |
commit | 1f29fbdbff0de80f6187f35ff8f9f0cab3cf09ad (patch) | |
tree | 23911031865aa7da079c098f57bc8c65df68c48f /cpp | |
parent | - Fixed bug 2363, 2623, 2500 (diff) | |
download | ice-1f29fbdbff0de80f6187f35ff8f9f0cab3cf09ad.tar.bz2 ice-1f29fbdbff0de80f6187f35ff8f9f0cab3cf09ad.tar.xz ice-1f29fbdbff0de80f6187f35ff8f9f0cab3cf09ad.zip |
Fix for bug 1945, Sun & HP-UX compilation fixes
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/Make.rules.HP-UX | 4 | ||||
-rw-r--r-- | cpp/config/Make.rules.Linux | 8 | ||||
-rw-r--r-- | cpp/config/Make.rules.SunOS | 8 | ||||
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 6 | ||||
-rw-r--r-- | cpp/src/Ice/EndpointI.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Network.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Selector.h | 4 | ||||
-rw-r--r-- | cpp/src/Ice/TcpAcceptor.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/TcpConnector.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/UdpConnector.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/UdpTransceiver.h | 2 | ||||
-rw-r--r-- | cpp/src/IceSSL/AcceptorI.h | 2 | ||||
-rw-r--r-- | cpp/src/IceSSL/ConnectorI.h | 2 |
13 files changed, 33 insertions, 13 deletions
diff --git a/cpp/config/Make.rules.HP-UX b/cpp/config/Make.rules.HP-UX index 903d2a4a480..d89b0e97814 100644 --- a/cpp/config/Make.rules.HP-UX +++ b/cpp/config/Make.rules.HP-UX @@ -30,6 +30,10 @@ DISABLEDWARNINGS = +W849 CXXFLAGS = -AA -mt $(DISABLEDWARNINGS) $(CXXARCHFLAGS) +ifneq ($(LP64),yes) + CXXFLAGS += -D_FILE_OFFSET_BITS=64 +endif + ifeq ($(STATICLIBS),) CXXFLAGS += +Z endif diff --git a/cpp/config/Make.rules.Linux b/cpp/config/Make.rules.Linux index 196f1b889a4..913f2c3be03 100644 --- a/cpp/config/Make.rules.Linux +++ b/cpp/config/Make.rules.Linux @@ -85,6 +85,10 @@ ifeq ($(CXX),c++) CXXFLAGS = $(CXXARCHFLAGS) -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl + ifneq ($(LP64),yes) + CXXFLAGS += -D_FILE_OFFSET_BITS=64 + endif + ifeq ($(STATICLIBS),) CXXFLAGS += -fPIC endif @@ -136,6 +140,10 @@ ifeq ($(CXX),icpc) $(warning ===================================================================) CXXFLAGS = -D_REENTRANT + ifneq ($(LP64),yes) + CXXFLAGS += -D_FILE_OFFSET_BITS=64 + endif + ifeq ($(STATICLIBS),) CXXFLAGS += -fPIC endif diff --git a/cpp/config/Make.rules.SunOS b/cpp/config/Make.rules.SunOS index f3348cb04ec..fcbe6385667 100644 --- a/cpp/config/Make.rules.SunOS +++ b/cpp/config/Make.rules.SunOS @@ -89,6 +89,10 @@ ifeq ($(CXX),CC) CXXFLAGS = -mt +p -features=tmplife $(CXXSCOPEFLAGS) $(CXXWARNFLAGS) $(CXXARCHFLAGS) + ifneq ($(LP64),yes) + CXXFLAGS += -D_FILE_OFFSET_BITS=64 + endif + ifeq ($(STATICLIBS),) CXXFLAGS += -KPIC endif @@ -130,6 +134,10 @@ ifeq ($(CXX),g++) CXXFLAGS = $(CXXARCHFLAGS) -ftemplate-depth-128 -Wall -D_REENTRANT + ifneq ($(LP64),yes) + CXXFLAGS += -D_FILE_OFFSET_BITS=64 + endif + ifeq ($(STATICLIBS),) CXXFLAGS += -fPIC endif diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 39e5a178dd0..d2d38bfc97b 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -511,7 +511,7 @@ IceInternal::OutgoingConnectionFactory::findConnection(const vector<ConnectorInf { if(q->second->endpoint() != p->endpoint) { - _connectionsByEndpoint.insert(make_pair(p->endpoint, q->second)); + _connectionsByEndpoint.insert(pair<const EndpointIPtr, ConnectionIPtr>(p->endpoint, q->second)); } if(defaultsAndOverrides->overrideCompress) @@ -734,8 +734,8 @@ IceInternal::OutgoingConnectionFactory::createConnection(const TransceiverPtr& t Ice::ConnectionIPtr connection = new ConnectionI(_instance, transceiver, ci.endpoint->compress(false), 0, ci.threadPerConnection, _instance->threadPerConnectionStackSize()); - _connections.insert(make_pair(ci, connection)); - _connectionsByEndpoint.insert(make_pair(ci.endpoint, connection)); + _connections.insert(pair<const ConnectorInfo, ConnectionIPtr>(ci, connection)); + _connectionsByEndpoint.insert(pair<const EndpointIPtr, ConnectionIPtr>(ci.endpoint, connection)); return connection; } catch(const Ice::LocalException&) diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h index 63f8c18abf3..530b9a56476 100644 --- a/cpp/src/Ice/EndpointI.h +++ b/cpp/src/Ice/EndpointI.h @@ -24,7 +24,7 @@ #ifdef _WIN32 # include <winsock2.h> #else -# include <netinet/in.h> // For struct sockaddr_in +# include <sys/socket.h> // For struct sockaddr_storage #endif #include <deque> diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index db66ebc4441..be8e03e6402 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -243,7 +243,7 @@ getLocalAddresses(ProtocolSupport protocol) memcpy(&addr, &ifr[i].ifr_addr, sizeof(sockaddr_in6)); if(!IN6_IS_ADDR_UNSPECIFIED(&reinterpret_cast<struct sockaddr_in6*>(&addr)->sin6_addr)) { - result.push_back(*reinterpret_cast<struct sockaddr_storage*>(curr->ifa_addr)); + result.push_back(addr); } } } diff --git a/cpp/src/Ice/Selector.h b/cpp/src/Ice/Selector.h index 4d680f14302..8b76befa1ce 100644 --- a/cpp/src/Ice/Selector.h +++ b/cpp/src/Ice/Selector.h @@ -75,8 +75,8 @@ public: } return false; #else - assert(_pollFdSet[0]->fd == _fdIntrRead); - return _pollFdSet[0]->revents != 0; + assert(_pollFdSet[0].fd == _fdIntrRead); + return _pollFdSet[0].revents != 0; #endif } void setInterrupt(); diff --git a/cpp/src/Ice/TcpAcceptor.h b/cpp/src/Ice/TcpAcceptor.h index 9d2526914f4..6d5991a641d 100644 --- a/cpp/src/Ice/TcpAcceptor.h +++ b/cpp/src/Ice/TcpAcceptor.h @@ -17,7 +17,7 @@ #include <Ice/Acceptor.h> #ifndef _WIN32 -# include <netinet/in.h> // For struct sockaddr_storage +# include <sys/socket.h> // For struct sockaddr_storage #endif namespace IceInternal diff --git a/cpp/src/Ice/TcpConnector.h b/cpp/src/Ice/TcpConnector.h index 28c42c064b8..b72674bcecc 100644 --- a/cpp/src/Ice/TcpConnector.h +++ b/cpp/src/Ice/TcpConnector.h @@ -19,7 +19,7 @@ #ifdef _WIN32 # include <winsock2.h> #else -# include <netinet/in.h> // For struct sockaddr_storage +# include <sys/socket.h> #endif namespace IceInternal diff --git a/cpp/src/Ice/UdpConnector.h b/cpp/src/Ice/UdpConnector.h index b6ca621cfb9..e73be45206f 100644 --- a/cpp/src/Ice/UdpConnector.h +++ b/cpp/src/Ice/UdpConnector.h @@ -18,7 +18,7 @@ #ifdef _WIN32 # include <winsock2.h> #else -# include <netinet/in.h> // For struct sockaddr_storage +# include <sys/socket.h> // For struct sockaddr_storage #endif namespace IceInternal diff --git a/cpp/src/Ice/UdpTransceiver.h b/cpp/src/Ice/UdpTransceiver.h index ebe9a2f4669..4898c3cc54c 100644 --- a/cpp/src/Ice/UdpTransceiver.h +++ b/cpp/src/Ice/UdpTransceiver.h @@ -18,7 +18,7 @@ #include <IceUtil/Mutex.h> #ifndef _WIN32 -# include <netinet/in.h> // For struct sockaddr_storage +# include <sys/socket.h> // For struct sockaddr_storage #endif namespace IceInternal diff --git a/cpp/src/IceSSL/AcceptorI.h b/cpp/src/IceSSL/AcceptorI.h index 38d1fcf864e..ce786d81c77 100644 --- a/cpp/src/IceSSL/AcceptorI.h +++ b/cpp/src/IceSSL/AcceptorI.h @@ -17,7 +17,7 @@ #include <IceSSL/InstanceF.h> #ifndef _WIN32 -# include <netinet/in.h> // For struct sockaddr_storage +# include <sys/socket.h> // For struct sockaddr_storage #endif namespace IceSSL diff --git a/cpp/src/IceSSL/ConnectorI.h b/cpp/src/IceSSL/ConnectorI.h index 4102a478c48..9eec1f1e5ae 100644 --- a/cpp/src/IceSSL/ConnectorI.h +++ b/cpp/src/IceSSL/ConnectorI.h @@ -18,7 +18,7 @@ #ifdef _WIN32 # include <winsock2.h> #else -# include <netinet/in.h> // For struct sockaddr_storage +# include <sys/socket.h> // For struct sockaddr_storage #endif namespace IceSSL |