diff options
-rw-r--r-- | cpp/INSTALL.SOLARIS | 23 | ||||
-rw-r--r-- | cpp/config/Make.rules | 10 | ||||
-rw-r--r-- | cpp/config/Make.rules.Darwin | 2 | ||||
-rw-r--r-- | cpp/config/Make.rules.SunOS | 11 | ||||
-rw-r--r-- | cpp/src/Ice/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Network.cpp | 39 | ||||
-rw-r--r-- | cpp/src/Ice/Selector.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IcePatch2Lib/Util.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IceSSL/Certificate.cpp | 10 | ||||
-rw-r--r-- | cpp/src/IceUtil/Exception.cpp | 8 | ||||
-rw-r--r-- | cpp/test/Ice/info/Makefile | 2 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/AllTests.cpp | 8 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/Test.ice | 4 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/TestAMD.ice | 4 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/TestAMDI.cpp | 2 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/TestI.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Ice/slicing/objects/TestI.h | 2 | ||||
-rw-r--r-- | distribution/src/thirdparty/README | 2 | ||||
-rw-r--r-- | distribution/src/unix/README.SunOS-sparc | 3 | ||||
-rw-r--r-- | distribution/src/unix/README.SunOS-x86 | 7 |
20 files changed, 88 insertions, 61 deletions
diff --git a/cpp/INSTALL.SOLARIS b/cpp/INSTALL.SOLARIS index e555f4cd174..3890149bf8d 100644 --- a/cpp/INSTALL.SOLARIS +++ b/cpp/INSTALL.SOLARIS @@ -8,8 +8,8 @@ Operating System Ice is expected to build and run properly on Solaris 8, Solaris 9 and Solaris 10 on SPARC and x86/x64. However, Ice is officially -supported only on Solaris 10 update 2 or greater on SPARC and -Solaris 10 update 3 or greater on x86/x64. +supported only on Solaris 10 update 5 or greater for both SPARC and +x86/x64. You also need to have /dev/urandom installed. This is installed by default on Solaris 9 and Solaris 10; on Solaris 8, you need to install @@ -19,18 +19,11 @@ patch 112438-01. C++ compiler ------------ -The following Sun compiler is supported: +Ice is expected to build properly with GCC 3.4 or later. However, only +the following compilers are officially supported: -- Sun C++ 5.9 (part of Sun Studio 12) with Patch 124863-01 on SPARC - and Patch 124864-07 on x86/x64 - -Builds with the following compilers are expected to succeed, but these -compilers are not supported at this time: - -- Sun C++ 5.5, 5.6, 5.7 and 5.8 (Sun Studio 8, 9, 10 and 11 - respectively) - -- GCC 3.4, 4.0 and 4.1 +- GCC 3.4.3 on x86/x64 +- GCC 4.3.2 on SPARC Third-party libraries @@ -38,11 +31,12 @@ Third-party libraries Ice has dependencies on a number of third-party libraries: -- Berkeley DB 4.7.25 +- Berkeley DB 4.8.24 - expat 1.95.7 or 2.0.0 - OpenSSL 0.9.7 or later (OpenSSL 0.9.8 or later recommended) - bzip2 1.0.x - mcpp 2.7.2 +- libiconv 1.13.1 (x86/x64 only) We recommend downloading the Ice third-party source archive from @@ -60,6 +54,7 @@ expat http://expat.sourceforge.net OpenSSL http://www.openssl.org bzip2 http://sources.redhat.com/bzip2 mcpp http://mcpp.sourceforge.net +libiconv http://www.gnu.org/software/libiconv GNU Make 3.80 diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index 8d95ab1c8fb..e40cdcdb9f2 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -80,12 +80,18 @@ USE_READLINE ?= no #OPENSSL_HOME ?= /opt/openssl # -# If Mcpp is not installed in a standard location where the compiler +# If MCPP is not installed in a standard location where the compiler # can find it, set MCPP_HOME to the Mcpp installation directory. # #MCPP_HOME ?= /opt/mcpp # +# If libiconv is not installed in a standard location where the compiler +# can find it, set ICONV_HOME to the libiconv installation directory. +# +#ICONV_HOME ?= /opt/libiconv + +# # If readline is not installed in a standard location where the # compiler can find it, AND you want to use readline, set # READLINE_HOME to the readline installation directory. @@ -162,6 +168,8 @@ BZIP2_FLAGS = $(if $(BZIP2_HOME),-I$(BZIP2_HOME)/include) BZIP2_LIBS = $(if $(BZIP2_HOME),-L$(BZIP2_HOME)/$(libsubdir)) -lbz2 BZIP2_RPATH_LINK = $(if $(BZIP2_HOME),$(call rpathlink,$(BZIP2_HOME)/$(libsubdir))) +ICONV_LIBS = $(if $(ICONV_HOME),-L$(ICONV_HOME)/$(libsubdir)) $(ICONV_LIB) + ifneq ($(DB_HOME),) DB_FLAGS = -I$(DB_HOME)/include DB_LIBS = -L$(DB_HOME)/$(libsubdir) -ldb_cxx diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin index a51514d3745..6ecd3fde993 100644 --- a/cpp/config/Make.rules.Darwin +++ b/cpp/config/Make.rules.Darwin @@ -85,6 +85,6 @@ LIBS = -lIce $(BASELIBS) ICONV_LIB = -liconv ICEUTIL_OS_LIBS = -lpthread -ICE_OS_LIBS = -ldl $(ICONV_LIB) +ICE_OS_LIBS = -ldl PLATFORM_HAS_READLINE := no diff --git a/cpp/config/Make.rules.SunOS b/cpp/config/Make.rules.SunOS index b7fc6c76aae..390beeff7d6 100644 --- a/cpp/config/Make.rules.SunOS +++ b/cpp/config/Make.rules.SunOS @@ -12,12 +12,11 @@ # # -# The default compiler on Solaris is CC. -# If you want to build with another compiler, you can edit this line, or -# comment it out and define CXX=<desired-compiler> in your environment. # If CXX is not defined anywhere, the default (from gmake) is g++. +# If you want to build with another compiler, you can edit this line and +# uncomment it, or define CXX=<desired-compiler> in your environment. # -CXX = CC +#CXX = CC # This variable is used to determine the machine type. # For SUN UltraSPARC machines: sun4u @@ -153,7 +152,9 @@ ifeq ($(CXX),g++) mklib = ar cr $(1) $(2) - LDPLATFORMFLAGS = -rdynamic + ifeq ($(MACHINE_TYPE),i86pc) + ICONV_LIB = -liconv + endif endif rpathlink = -L$(1) diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index 08e5e6749ef..03978520aa1 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -156,7 +156,7 @@ include $(top_srcdir)/config/Make.rules CPPFLAGS := -I.. $(CPPFLAGS) -DICE_API_EXPORTS $(BZIP2_FLAGS) SLICE2CPPFLAGS := --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS) -LINKWITH := -lIceUtil $(BZIP2_LIBS) $(ICE_OS_LIBS) +LINKWITH := -lIceUtil $(BZIP2_LIBS) $(ICONV_LIBS) $(ICE_OS_LIBS) $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 089e275f49d..ee60a34585f 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -51,7 +51,7 @@ using namespace std; using namespace Ice; using namespace IceInternal; -#ifdef __sun +#if defined(__sun) && !defined(__GNUC__) # define INADDR_NONE (in_addr_t)0xffffffff #endif @@ -238,22 +238,51 @@ getLocalAddresses(ProtocolSupport protocol) { if(!(ifr[i].ifr_flags & IFF_LOOPBACK)) // Don't include loopback interface addresses { + // + // On Solaris the above Loopback check does not always work so we double + // check the address below. Solaris also returns duplicate entries that need + // to be filtered out. + // if(ifr[i].ifr_addr.sa_family == AF_INET && protocol != EnableIPv6) { sockaddr_storage addr; memcpy(&addr, &ifr[i].ifr_addr, sizeof(sockaddr_in)); - if(reinterpret_cast<struct sockaddr_in*>(&addr)->sin_addr.s_addr != 0) + struct in_addr* inaddr = &reinterpret_cast<struct sockaddr_in*>(&addr)->sin_addr; + if(inaddr->s_addr != 0 && inaddr->s_addr != htonl(INADDR_LOOPBACK)) { - result.push_back(addr); + unsigned int j; + for(j = 0; j < result.size(); ++j) + { + if(compareAddress(addr, result[j]) == 0) + { + break; + } + } + if(j == result.size()) + { + result.push_back(addr); + } } } else if(ifr[i].ifr_addr.sa_family == AF_INET6 && protocol != EnableIPv4) { sockaddr_storage addr; memcpy(&addr, &ifr[i].ifr_addr, sizeof(sockaddr_in6)); - if(!IN6_IS_ADDR_UNSPECIFIED(&reinterpret_cast<struct sockaddr_in6*>(&addr)->sin6_addr)) + struct in6_addr* inaddr6 = &reinterpret_cast<struct sockaddr_in6*>(&addr)->sin6_addr; + if(!IN6_IS_ADDR_UNSPECIFIED(inaddr6) && !IN6_IS_ADDR_LOOPBACK(inaddr6)) { - result.push_back(addr); + unsigned int j; + for(j = 0; j < result.size(); ++j) + { + if(compareAddress(addr, result[j]) == 0) + { + break; + } + } + if(j == result.size()) + { + result.push_back(addr); + } } } } diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp index 471b4d686d5..3344ef96245 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -612,7 +612,7 @@ Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int ti { Ice::SocketException ex(__FILE__, __LINE__, IceInternal::getSocketErrno()); - Error out(_instance->initializationData().logger); + Ice::Error out(_instance->initializationData().logger); out << "fatal error: selector failed:\n" << ex; } abort(); diff --git a/cpp/src/IcePatch2Lib/Util.cpp b/cpp/src/IcePatch2Lib/Util.cpp index ca2510a119c..e8699073978 100644 --- a/cpp/src/IcePatch2Lib/Util.cpp +++ b/cpp/src/IcePatch2Lib/Util.cpp @@ -44,7 +44,7 @@ const char* IcePatch2::logFile = "IcePatch2.log"; // #ifdef __sun -extern "C" static int +extern "C" int ice_scandir(const char* dir, struct dirent*** namelist, int (*select)(const struct dirent*), int (*compar)(const void*, const void*)) @@ -101,7 +101,7 @@ ice_scandir(const char* dir, struct dirent*** namelist, return i; } -extern "C" static int +extern "C" int ice_alphasort(const void* v1, const void* v2) { const struct dirent **a = (const struct dirent **)v1; diff --git a/cpp/src/IceSSL/Certificate.cpp b/cpp/src/IceSSL/Certificate.cpp index 6d942d49103..696be65683b 100644 --- a/cpp/src/IceSSL/Certificate.cpp +++ b/cpp/src/IceSSL/Certificate.cpp @@ -85,7 +85,7 @@ CertificateEncodingException::ice_throw() const namespace { -IceUtil::Mutex* mutex = 0; +IceUtil::Mutex* mut = 0; class Init { @@ -93,13 +93,13 @@ public: Init() { - mutex = new IceUtil::Mutex; + mut = new IceUtil::Mutex; } ~Init() { - delete mutex; - mutex = 0; + delete mut; + mut = 0; } }; @@ -146,7 +146,7 @@ ASMUtcTimeToIceUtilTime(const ASN1_UTCTIME* s) // time_t tzone; { - IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(mutex); + IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(mut); time_t now = time(0); tzone = mktime(localtime(&now)) - mktime(gmtime(&now)); } diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index f3e2cc9b750..6ce81a17c23 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -14,7 +14,7 @@ #include <ostream> #include <cstdlib> -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__sun) # include <execinfo.h> # include <cxxabi.h> #endif @@ -52,7 +52,7 @@ public: Init init; -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__sun) string getStackTrace() { @@ -183,7 +183,7 @@ getStackTrace() IceUtil::Exception::Exception() : _file(0), _line(0) -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__sun) , _stackTrace(getStackTrace()) #endif { @@ -192,7 +192,7 @@ IceUtil::Exception::Exception() : IceUtil::Exception::Exception(const char* file, int line) : _file(file), _line(line) -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__sun) , _stackTrace(getStackTrace()) #endif { diff --git a/cpp/test/Ice/info/Makefile b/cpp/test/Ice/info/Makefile index aa09685ef64..e35a9c97bce 100644 --- a/cpp/test/Ice/info/Makefile +++ b/cpp/test/Ice/info/Makefile @@ -35,7 +35,7 @@ CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ - $(CXX) $(LDFLAGS) -o $@ $(COBJS) -lIceSSL $(LIBS) + $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(OPENSSL_RPATH_LINK) -lIceSSL $(LIBS) $(SERVER): $(SOBJS) rm -f $@ diff --git a/cpp/test/Ice/slicing/objects/AllTests.cpp b/cpp/test/Ice/slicing/objects/AllTests.cpp index e453a22dae2..49fc5496815 100644 --- a/cpp/test/Ice/slicing/objects/AllTests.cpp +++ b/cpp/test/Ice/slicing/objects/AllTests.cpp @@ -456,7 +456,7 @@ typedef IceUtil::Handle<AMI_Test_paramTest4I> AMI_Test_paramTest4IPtr; class AMI_Test_sequenceTestI : public AMI_TestIntf_sequenceTest, public CallbackBase { virtual void - ice_response(const SS& ss) + ice_response(const SS3& ss) { r = ss; called(); @@ -470,7 +470,7 @@ class AMI_Test_sequenceTestI : public AMI_TestIntf_sequenceTest, public Callback public: - SS r; + SS3 r; }; typedef IceUtil::Handle<AMI_Test_sequenceTestI> AMI_Test_sequenceTestIPtr; @@ -1467,7 +1467,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { try { - SS ss; + SS3 ss; { BPtr ss1b = new B; ss1b->sb = "B.sb"; @@ -1554,7 +1554,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { try { - SS ss; + SS3 ss; { BPtr ss1b = new B; ss1b->sb = "B.sb"; diff --git a/cpp/test/Ice/slicing/objects/Test.ice b/cpp/test/Ice/slicing/objects/Test.ice index 2fa79937f53..7083ed6bcb5 100644 --- a/cpp/test/Ice/slicing/objects/Test.ice +++ b/cpp/test/Ice/slicing/objects/Test.ice @@ -47,7 +47,7 @@ class SS2 BSeq s; }; -struct SS +struct SS3 { SS1 c1; SS2 c2; @@ -95,7 +95,7 @@ class Forward; // Forward-declared class defined in another compilation B returnTest2(out B p2, out B p1); B returnTest3(B p1, B p2); - SS sequenceTest(SS1 p1, SS2 p2); + SS3 sequenceTest(SS1 p1, SS2 p2); BDict dictionaryTest(BDict bin, out BDict bout); diff --git a/cpp/test/Ice/slicing/objects/TestAMD.ice b/cpp/test/Ice/slicing/objects/TestAMD.ice index f9d187d345b..1858924afe0 100644 --- a/cpp/test/Ice/slicing/objects/TestAMD.ice +++ b/cpp/test/Ice/slicing/objects/TestAMD.ice @@ -47,7 +47,7 @@ class SS2 BSeq s; }; -struct SS +struct SS3 { SS1 c1; SS2 c2; @@ -95,7 +95,7 @@ class Forward; // Forward-declared class defined in another compilation B returnTest2(out B p2, out B p1); B returnTest3(B p1, B p2); - SS sequenceTest(SS1 p1, SS2 p2); + SS3 sequenceTest(SS1 p1, SS2 p2); BDict dictionaryTest(BDict bin, out BDict bout); diff --git a/cpp/test/Ice/slicing/objects/TestAMDI.cpp b/cpp/test/Ice/slicing/objects/TestAMDI.cpp index 8101ec26098..bc69cf6781b 100644 --- a/cpp/test/Ice/slicing/objects/TestAMDI.cpp +++ b/cpp/test/Ice/slicing/objects/TestAMDI.cpp @@ -255,7 +255,7 @@ void TestI::sequenceTest_async(const AMD_TestIntf_sequenceTestPtr& cb, const SS1Ptr& p1, const SS2Ptr& p2, const ::Ice::Current&) { - SS ss; + SS3 ss; ss.c1 = p1; ss.c2 = p2; cb->ice_response(ss); diff --git a/cpp/test/Ice/slicing/objects/TestI.cpp b/cpp/test/Ice/slicing/objects/TestI.cpp index 94a71a5469d..bff628bdfc4 100644 --- a/cpp/test/Ice/slicing/objects/TestI.cpp +++ b/cpp/test/Ice/slicing/objects/TestI.cpp @@ -229,10 +229,10 @@ TestI::returnTest3(const BPtr& p1, const BPtr& p2, const ::Ice::Current&) return p1; } -SS +SS3 TestI::sequenceTest(const SS1Ptr& p1, const SS2Ptr& p2, const ::Ice::Current&) { - SS ss; + SS3 ss; ss.c1 = p1; ss.c2 = p2; return ss; diff --git a/cpp/test/Ice/slicing/objects/TestI.h b/cpp/test/Ice/slicing/objects/TestI.h index 7e5223b9a58..46119f7005e 100644 --- a/cpp/test/Ice/slicing/objects/TestI.h +++ b/cpp/test/Ice/slicing/objects/TestI.h @@ -44,7 +44,7 @@ public: virtual ::Test::BPtr returnTest2(::Test::BPtr&, ::Test::BPtr&, const ::Ice::Current&); virtual ::Test::BPtr returnTest3(const ::Test::BPtr&, const ::Test::BPtr&, const ::Ice::Current&); - virtual ::Test::SS sequenceTest(const ::Test::SS1Ptr&, const ::Test::SS2Ptr&, const ::Ice::Current&); + virtual ::Test::SS3 sequenceTest(const ::Test::SS1Ptr&, const ::Test::SS2Ptr&, const ::Ice::Current&); virtual ::Test::BDict dictionaryTest(const ::Test::BDict&, ::Test::BDict&, const ::Ice::Current&); diff --git a/distribution/src/thirdparty/README b/distribution/src/thirdparty/README index e6589b7bc74..5e373ac2a87 100644 --- a/distribution/src/thirdparty/README +++ b/distribution/src/thirdparty/README @@ -174,7 +174,7 @@ mcpp Ice requires the library version of mcpp, so configure mcpp as shown below: - $ ./configure CC=cc CXX=CC CFLAGS=-KPIC --enable-mcpplib --disable-shared + $ ./configure CFLAGS=-kPIC --enable-mcpplib --disable-shared (and --prefix=<dir> if you like) On 64-bit platforms, after installation it is necessary to rename the diff --git a/distribution/src/unix/README.SunOS-sparc b/distribution/src/unix/README.SunOS-sparc index bf12d98ebb4..fbad8dff3cc 100644 --- a/distribution/src/unix/README.SunOS-sparc +++ b/distribution/src/unix/README.SunOS-sparc @@ -43,8 +43,7 @@ in lib/sparcv9. Requirements ====================================================================== -This binary distribution was compiled on Solaris 10 using Sun CC -version 5.9 with Patch 124863-01. +This binary distribution was compiled on Solaris 10 using GCC 4.3.2. The following Solaris 10 binary packages are required to use this distribution: diff --git a/distribution/src/unix/README.SunOS-x86 b/distribution/src/unix/README.SunOS-x86 index 904e162dd03..137804e7858 100644 --- a/distribution/src/unix/README.SunOS-x86 +++ b/distribution/src/unix/README.SunOS-x86 @@ -43,8 +43,7 @@ lib/amd64. Requirements ====================================================================== -This binary distribution was compiled on Solaris 10 using Sun CC -version 5.9 with Patch 124864-07. +This binary distribution was compiled on Solaris 10 using GCC 3.4.3. The following Solaris 10 binary packages are required to use this distribution: @@ -58,10 +57,6 @@ packages SUNWcry and SUNWcryr) available at http://www.sun.com/download/index.jsp?cat=Security&tab=3&subcat=Cryptography%20%26%20Encryption -Note: The bzip2 package in the Solaris 10 Update 3 distribution does -not contain 64-bit libraries. You need to apply Solaris patch -126869-01 to install these libraries. - Java ---- |