summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2004-01-23 22:37:27 +0000
committerBernard Normier <bernard@zeroc.com>2004-01-23 22:37:27 +0000
commite472963b0f661ca49b2c1f67fc17eb601923788b (patch)
treefb45d999b05a51060e29d806f214ed0186d9fb64
parentfixes (diff)
downloadice-e472963b0f661ca49b2c1f67fc17eb601923788b.tar.bz2
ice-e472963b0f661ca49b2c1f67fc17eb601923788b.tar.xz
ice-e472963b0f661ca49b2c1f67fc17eb601923788b.zip
HP-UX port
-rw-r--r--cpp/CHANGES2
-rw-r--r--cpp/INSTALL.HP-UX158
-rw-r--r--cpp/config/Make.rules2
-rw-r--r--cpp/config/Make.rules.HP-UX65
-rw-r--r--cpp/config/TestUtil.py18
-rw-r--r--cpp/include/Ice/Handle.h54
-rw-r--r--cpp/include/Ice/ProxyHandle.h60
-rw-r--r--cpp/include/IceUtil/AbstractMutex.h4
-rw-r--r--cpp/include/IceUtil/Config.h10
-rw-r--r--cpp/include/IceUtil/Handle.h40
-rw-r--r--cpp/include/IceUtil/Mutex.h4
-rw-r--r--cpp/include/IceUtil/StaticMutex.h4
-rw-r--r--cpp/include/Slice/Parser.h38
-rw-r--r--cpp/src/Freeze/SharedDb.h9
-rw-r--r--cpp/src/Glacier/Blobject.cpp38
-rw-r--r--cpp/src/Ice/Application.cpp7
-rw-r--r--cpp/src/Ice/DynamicLibrary.cpp10
-rw-r--r--cpp/src/Ice/Incoming.cpp4
-rw-r--r--cpp/src/Ice/IncomingAsync.cpp4
-rw-r--r--cpp/src/Ice/Instance.cpp2
-rw-r--r--cpp/src/Ice/Network.h12
-rw-r--r--cpp/src/IceSSL/OpenSSLPluginI.cpp4
-rw-r--r--cpp/src/IceUtil/GCRecMutex.cpp7
-rw-r--r--cpp/src/IceUtil/GCShared.cpp7
-rw-r--r--cpp/src/IceUtil/InputUtil.cpp4
-rw-r--r--cpp/src/icecpp/cccp.c9
-rw-r--r--cpp/src/icecpp/config.h12
-rw-r--r--cpp/src/slice2cpp/Gen.cpp114
-rw-r--r--cpp/test/IceStorm/federation/Subscriber.cpp2
29 files changed, 509 insertions, 195 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES
index 6a8c896661b..2c0e3366f9d 100644
--- a/cpp/CHANGES
+++ b/cpp/CHANGES
@@ -1,6 +1,8 @@
Changes since version 1.2.0
---------------------------
+- HP-UX port. See INSTALL.HP-UX.
+
- Added extra file integrity checks to IcePatch::Client.
- Fixed a problem with servers not shutting down properly under
diff --git a/cpp/INSTALL.HP-UX b/cpp/INSTALL.HP-UX
new file mode 100644
index 00000000000..c462638ce7f
--- /dev/null
+++ b/cpp/INSTALL.HP-UX
@@ -0,0 +1,158 @@
+======================================================================
+Requirements
+======================================================================
+
+
+Operating System
+----------------
+
+HP-UX 11i (11.11) on PA-RISC.
+
+You also need the "HP-UX Strong Random Number Generator", available for
+free from http://software.hp.com.
+
+
+C++ compiler
+------------
+
+- HP aC++ A.03.37
+
+More recent versions of aC++ are likely to work as well.
+
+
+C compiler
+----------
+
+- HP C/ANSI C compiler (cc).
+
+
+Third-party libraries
+---------------------
+
+- Berkeley DB 4.1.25 with C++ support enabled, and built with a C++
+ compiler compatible with the one you are using.
+ The Berkeley DB source distribution can be downloaded from
+ http://www.sleepycat.com
+
+ We recommend to configure Berkeley DB with:
+ CXXFLAGS=-AA ../../dist/configure --enable-cxx --enable-java
+ (and --prefix=<dir> if you like).
+
+- OpenSSL 0.9.7c
+ The OpenSSL source distribution can be downloaded from
+ http://www.openssl.org
+ We do _not_ recommend to use the binary distribution available from the
+ "Sofware Porting And Archive Centre for HP-UX" as it depends on the
+ GCC runtime.
+ A recommended configuration is:
+ ./Configure hpux-parisc2-cc shared
+ (and --prefix=<dir> if you like).
+
+- expat 1.9x
+ The expat source distribution can be downloaded from:
+ http://sourceforge.net/projects/expat
+ You can also use the binary distribution from the "Sofware Porting And
+ Archive Centre for HP-UX", http://hpux.cs.utah.edu.
+
+- bzip2 1.0
+ Source and binary distributions can be downloaded from the "Sofware
+ Porting And Archive Centre for HP-UX", http://hpux.cs.utah.edu.
+
+GNU Make 3.80
+-------------
+
+GNU Make 3.80 is required to build Ice on HP-UX.
+You can download GNU Make from the "Sofware Porting And Archive Centre
+for HP-UX", http://hpux.cs.utah.edu.
+
+
+Python 2.2 or 2.3
+-----------------
+
+To run the automated test suite, you will need Python 2.2. If you have
+no interest in running the test scripts, Python is not required.
+
+You can download Python from http://hpux.cs.utah.edu.
+
+
+======================================================================
+Compilation and Testing
+======================================================================
+
+Extract the Ice archive in any directory you like (for example, in
+your home directory):
+
+$ tar xvfz Ice-<version>.tar.gz
+
+Change the working directory to Ice-<version>:
+
+$ cd Ice-<version>
+
+Edit the file config/Make.rules according to the comments in this
+file. Make sure that the paths for the third-party libraries are set
+correctly if they are not installed in the default location /usr/lib
+and /usr/include.
+
+Now you're ready to build Ice:
+
+$ gmake
+
+This will build the Ice core library, all add-ons, all tests, and all
+examples.
+
+
+After a successful build, you can run the test suite, provided that
+you installed Python:
+
+$ gmake test
+
+This is equivalent to:
+
+$ python allTests.py
+
+If everything worked out, you should see lots of "ok". In case of a
+failure, the tests abort with "failed".
+
+If you want to try out any of the demos, make sure to add "bin" to
+PATH and "lib" to SHLIB_PATH or LD_LIBRARY_PATH (for 64 bit
+builds):
+
+$ export PATH=`pwd`/bin:$PATH
+$ export SHLIB_PATH=`pwd`/lib:$SHLIB_PATH
+$ export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
+
+
+======================================================================
+64 bit builds
+======================================================================
+
+To build Ice in 64 bit mode, you need to:
+
+- Obtain or build all the third party dependencies, and put the 64 bit
+ libraries in the "lib/pa20_64" directories. For example put Berkeley
+ DB 64 bit libraries in $DB_HOME/lib/pa20_64.
+
+- Set the environment variable LP64 to yes, e.g.:
+ $ export LP64=yes
+
+- Build and test as described above.
+
+
+======================================================================
+Installation
+======================================================================
+
+Simply run "gmake install". This will install Ice in the "prefix"
+directory specified in the file Make.rules.
+
+After installation, make sure that the <prefix>/bin directory is in
+your PATH, and the <prefix>/lib directory is in your
+SHLIB_PATH. When compiling Ice programs, you must also make sure
+to pass the location of the <prefix>/include directory to the compiler
+with the -I option, and the location of the <prefix>/lib directory
+with the -L option.
+
+If you built in 64 bit mode, the libraries are installed in
+<prefix>/lib/pa20_64 and the programs are installed in
+<prefix>/bin/pa20_64. Other files are identical for 32 and 64 bit.
+
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index 3f78499cb90..1ff19eeb77a 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -214,7 +214,7 @@ CPPFLAGS = -I$(includedir) $(STLPORT_FLAGS)
ICECPPFLAGS = -I$(slicedir)
SLICE2CPPFLAGS = $(ICECPPFLAGS)
-LDFLAGS = $(CXXFLAGS) -L$(libdir)
+LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
ifeq ($(FLEX_NOLINE),yes)
FLEXFLAGS := -L
diff --git a/cpp/config/Make.rules.HP-UX b/cpp/config/Make.rules.HP-UX
new file mode 100644
index 00000000000..e0a274c533c
--- /dev/null
+++ b/cpp/config/Make.rules.HP-UX
@@ -0,0 +1,65 @@
+# **********************************************************************
+#
+# Copyright (c) 2003
+# ZeroC, Inc.
+# Billerica, MA, USA
+#
+# All Rights Reserved.
+#
+# Ice is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License version 2 as published by
+# the Free Software Foundation.
+#
+# **********************************************************************
+
+#
+# This file is included by Make.rules when uname is HP-UX..
+#
+
+CXX := aCC
+
+ifeq ($(LP64),yes)
+ CXXARCHFLAGS := +DD64
+else
+ CXXARCHFLAGS := +DA2.0N
+endif
+
+#
+# TODO: add -Bhidden_def (for declspec), when it works
+#
+
+#
+# Disable the following warnings:
+# 307: Function defines return type, but contains no return at end of function.
+# 361: Value-returning function might end without executing a return statement.
+# 849: External symbol too long, truncated from xxx to 4000
+DISABLEDWARNINGS = +W307 +W361 +W849
+
+CXXFLAGS = -AA +Z -mt $(DISABLEDWARNINGS) $(CXXARCHFLAGS)
+
+ifeq ($(OPTIMIZE),yes)
+ CXXFLAGS := -O -DNDEBUG $(CXXFLAGS)
+else
+ CXXFLAGS := -g0 $(CXXFLAGS)
+endif
+
+LDPLATFORMFLAGS = -Wl,+s -Wl,+b$(prefix)/$(libsubdir)
+
+mklibfilename = lib$(1).$(2)
+mksoname = lib$(1).$(2)
+mklibname = lib$(1).sl
+mkshlib = $(CXX) -b -Wl,-Bsymbolic $(LDFLAGS) -o $(1) -Wl,+h$(2) $(3) $(4)
+
+BASELIBS = -lIceUtil -lpthread
+LIBS = -lIce $(BASELIBS)
+
+ICEUTIL_OS_LIBS := -lpthread -lrt
+ICE_OS_LIBS :=
+
+lp64suffix := /pa20_64
+
+ifeq ($(LP64),yes)
+ export LD_LIBRARY_PATH := $(libdir):$(LD_LIBRARY_PATH)
+else
+ export SHLIB_PATH := $(libdir):$(SHLIB_PATH)
+endif
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index cdb2528db79..3594a4cddbc 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -79,7 +79,15 @@ def isSolaris():
return 1
else:
return 0
-
+
+def isHpUx():
+
+ if sys.platform == "hp-ux11":
+ return 1
+ else:
+ return 0
+
+
serverPids = []
def killServers():
@@ -157,8 +165,12 @@ if isWin32():
else:
os.environ["PATH"] = os.path.join(toplevel, "bin") + ";" + os.getenv("PATH", "")
else:
- os.environ["LD_LIBRARY_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH", "")
- os.environ["LD_LIBRARY_PATH_64"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH_64", "")
+ if isHpUx():
+ os.environ["SHLIB_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("SHLIB_PATH", "")
+# os.environ["LD_LIBRARY_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH, "")
+ else:
+ os.environ["LD_LIBRARY_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH", "")
+ os.environ["LD_LIBRARY_PATH_64"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH_64", "")
if protocol == "ssl":
plugin = " --Ice.Plugin.IceSSL=IceSSL:create"
diff --git a/cpp/include/Ice/Handle.h b/cpp/include/Ice/Handle.h
index f7932088bed..6f251c7029f 100644
--- a/cpp/include/Ice/Handle.h
+++ b/cpp/include/Ice/Handle.h
@@ -40,33 +40,33 @@ public:
Handle(T* p = 0)
{
- _ptr = p;
+ this->_ptr = p;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
template<typename Y>
Handle(const Handle<Y>& r)
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
template<typename Y>
Handle(const ::IceUtil::Handle<Y>& r)
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
@@ -77,33 +77,33 @@ public:
Handle(const Handle& r)
#endif
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
~Handle()
{
- if(_ptr)
+ if(this->_ptr)
{
- decRef(_ptr);
+ decRef(this->_ptr);
}
}
Handle& operator=(T* p)
{
- if(_ptr != p)
+ if(this->_ptr != p)
{
if(p)
{
incRef(p);
}
- T* ptr = _ptr;
- _ptr = p;
+ T* ptr = this->_ptr;
+ this->_ptr = p;
if(ptr)
{
@@ -116,15 +116,15 @@ public:
template<typename Y>
Handle& operator=(const Handle<Y>& r)
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
incRef(r._ptr);
}
- T* ptr = _ptr;
- _ptr = r._ptr;
+ T* ptr = this->_ptr;
+ this->_ptr = r._ptr;
if(ptr)
{
@@ -137,15 +137,15 @@ public:
template<typename Y>
Handle& operator=(const ::IceUtil::Handle<Y>& r)
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
incRef(r._ptr);
}
- T* ptr = _ptr;
- _ptr = r._ptr;
+ T* ptr = this->_ptr;
+ this->_ptr = r._ptr;
if(ptr)
{
@@ -162,15 +162,15 @@ public:
Handle& operator=(const Handle& r)
#endif
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
incRef(r._ptr);
}
- T* ptr = _ptr;
- _ptr = r._ptr;
+ T* ptr = this->_ptr;
+ this->_ptr = r._ptr;
if(ptr)
{
@@ -194,7 +194,7 @@ public:
void __clearHandleUnsafe()
{
- _ptr = 0;
+ this->_ptr = 0;
}
};
diff --git a/cpp/include/Ice/ProxyHandle.h b/cpp/include/Ice/ProxyHandle.h
index 62c16b3d934..cd0c8781f07 100644
--- a/cpp/include/Ice/ProxyHandle.h
+++ b/cpp/include/Ice/ProxyHandle.h
@@ -33,33 +33,33 @@ public:
ProxyHandle(T* p = 0)
{
- _ptr = p;
+ this->_ptr = p;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
template<typename Y>
ProxyHandle(const ProxyHandle<Y>& r)
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
template<typename Y>
ProxyHandle(const ::IceUtil::Handle<Y>& r)
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
@@ -70,37 +70,37 @@ public:
ProxyHandle(const ProxyHandle& r)
#endif
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- incRef(_ptr);
+ incRef(this->_ptr);
}
}
~ProxyHandle()
{
- if(_ptr)
+ if(this->_ptr)
{
- decRef(_ptr);
+ decRef(this->_ptr);
}
}
ProxyHandle& operator=(T* p)
{
- if(_ptr != p)
+ if(this->_ptr != p)
{
if(p)
{
incRef(p);
}
- if(_ptr)
+ if(this->_ptr)
{
- decRef(_ptr);
+ decRef(this->_ptr);
}
- _ptr = p;
+ this->_ptr = p;
}
return *this;
}
@@ -108,19 +108,19 @@ public:
template<typename Y>
ProxyHandle& operator=(const ProxyHandle<Y>& r)
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
incRef(r._ptr);
}
- if(_ptr)
+ if(this->_ptr)
{
- decRef(_ptr);
+ decRef(this->_ptr);
}
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
}
return *this;
}
@@ -128,19 +128,19 @@ public:
template<typename Y>
ProxyHandle& operator=(const ::IceUtil::Handle<Y>& r)
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
incRef(r._ptr);
}
- if(_ptr)
+ if(this->_ptr)
{
- decRef(_ptr);
+ decRef(this->_ptr);
}
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
}
return *this;
}
@@ -152,19 +152,19 @@ public:
ProxyHandle& operator=(const ProxyHandle& r)
#endif
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
incRef(r._ptr);
}
- if(_ptr)
+ if(this->_ptr)
{
- decRef(_ptr);
+ decRef(this->_ptr);
}
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
}
return *this;
}
diff --git a/cpp/include/IceUtil/AbstractMutex.h b/cpp/include/IceUtil/AbstractMutex.h
index 9d54a33c713..89c13de5234 100644
--- a/cpp/include/IceUtil/AbstractMutex.h
+++ b/cpp/include/IceUtil/AbstractMutex.h
@@ -70,7 +70,7 @@ public:
virtual void lock() const
{
- readLock();
+ T::readLock();
}
virtual void unlock() const
@@ -97,7 +97,7 @@ public:
virtual void lock() const
{
- writeLock();
+ T::writeLock();
}
virtual void unlock() const
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index 5c347918c9a..8a96f7f2fed 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -23,7 +23,7 @@
//
#if defined(__i386) || defined(_M_IX86) || defined (__x86_64)
# define ICE_LITTLE_ENDIAN
-#elif defined(__sparc) || defined(__sparc__)
+#elif defined(__sparc) || defined(__sparc__) || defined(__hppa)
# define ICE_BIG_ENDIAN
#else
# error "Unknown architecture"
@@ -37,7 +37,7 @@
// We are a linux sparc, which forces 32 bit usr land, no matter the architecture
//
# define ICE_32
-#elif (defined(__sun) && defined(__sparcv9)) || (defined(__linux) && defined(__x86_64))
+#elif (defined(__sun) && defined(__sparcv9)) || (defined(__linux) && defined(__x86_64)) || (defined(__hppa) &&defined(__LP64__))
# define ICE_64
#else
# define ICE_32
@@ -49,7 +49,7 @@
//
// TODO: more macros to support IBM Visual Age _Export syntax as well.
//
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) || (defined(__HP_aCC) && defined(__HP_WINDLL))
# define ICE_DECLSPEC_EXPORT __declspec(dllexport)
# define ICE_DECLSPEC_IMPORT __declspec(dllimport)
#elif defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x550)
@@ -131,7 +131,7 @@
// ...: decorated name length exceeded, name was truncated
# pragma warning( disable : 4503 )
-#elif defined(__sun) && defined(__sparc)
+#elif (defined(__sun) && defined(__sparc)) || (defined(__hpux))
# include <inttypes.h>
#else
//
@@ -212,6 +212,8 @@ const Int64 Int64Max = INT64_MAX;
#if defined(_MSC_VER)
# define ICE_INT64(n) n##i64
+#elif defined(__HP_aCC)
+# define ICE_INT64(n) n
#elif defined(ICE_64)
# define ICE_INT64(n) n##L
#else
diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h
index a16e3a9e640..0c4d93a8908 100644
--- a/cpp/include/IceUtil/Handle.h
+++ b/cpp/include/IceUtil/Handle.h
@@ -122,22 +122,22 @@ public:
Handle(T* p = 0)
{
- _ptr = p;
+ this->_ptr = p;
- if(_ptr)
+ if(this->_ptr)
{
- _ptr->__incRef();
+ this->_ptr->__incRef();
}
}
template<typename Y>
Handle(const Handle<Y>& r)
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- _ptr->__incRef();
+ this->_ptr->__incRef();
}
}
@@ -148,33 +148,33 @@ public:
Handle(const Handle& r)
#endif
{
- _ptr = r._ptr;
+ this->_ptr = r._ptr;
- if(_ptr)
+ if(this->_ptr)
{
- _ptr->__incRef();
+ this->_ptr->__incRef();
}
}
~Handle()
{
- if(_ptr)
+ if(this->_ptr)
{
- _ptr->__decRef();
+ this->_ptr->__decRef();
}
}
Handle& operator=(T* p)
{
- if(_ptr != p)
+ if(this->_ptr != p)
{
if(p)
{
p->__incRef();
}
- T* ptr = _ptr;
- _ptr = p;
+ T* ptr = this->_ptr;
+ this->_ptr = p;
if(ptr)
{
@@ -187,15 +187,15 @@ public:
template<typename Y>
Handle& operator=(const Handle<Y>& r)
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
r._ptr->__incRef();
}
- T* ptr = _ptr;
- _ptr = r._ptr;
+ T* ptr = this->_ptr;
+ this->_ptr = r._ptr;
if(ptr)
{
@@ -212,15 +212,15 @@ public:
Handle& operator=(const Handle& r)
#endif
{
- if(_ptr != r._ptr)
+ if(this->_ptr != r._ptr)
{
if(r._ptr)
{
r._ptr->__incRef();
}
- T* ptr = _ptr;
- _ptr = r._ptr;
+ T* ptr = this->_ptr;
+ this->_ptr = r._ptr;
if(ptr)
{
diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h
index 98a16e20a59..c48191337e8 100644
--- a/cpp/include/IceUtil/Mutex.h
+++ b/cpp/include/IceUtil/Mutex.h
@@ -37,7 +37,7 @@ class Cond;
// `IceUtil::noncopyable' inaccessible in `IceInternal::Outgoing' due
// to ambiguity
//
-class ICE_UTIL_API Mutex
+class Mutex
{
public:
@@ -47,7 +47,7 @@ public:
typedef LockT<Mutex> Lock;
typedef TryLockT<Mutex> TryLock;
- Mutex();
+ inline Mutex();
~Mutex();
//
diff --git a/cpp/include/IceUtil/StaticMutex.h b/cpp/include/IceUtil/StaticMutex.h
index a84136ceac3..7650fe6224d 100644
--- a/cpp/include/IceUtil/StaticMutex.h
+++ b/cpp/include/IceUtil/StaticMutex.h
@@ -34,7 +34,7 @@ class Cond;
//
//
-class ICE_UTIL_API StaticMutex
+class StaticMutex
{
public:
@@ -99,7 +99,7 @@ private:
void lock(LockState&) const;
#ifdef _WIN32
- void initialize() const;
+ ICE_UTIL_API void initialize() const;
#endif
#ifndef _MSC_VER
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h
index 7bfd07272cf..09b56b2e949 100644
--- a/cpp/include/Slice/Parser.h
+++ b/cpp/include/Slice/Parser.h
@@ -282,7 +282,7 @@ public:
protected:
Builtin(const UnitPtr&, Kind);
- friend class SLICE_API Unit;
+ friend class Unit;
Kind _kind;
};
@@ -336,7 +336,7 @@ public:
protected:
Contained(const ContainerPtr&, const std::string&);
- friend class SLICE_API Container;
+ friend class Container;
ContainerPtr _container;
std::string _name;
@@ -420,7 +420,7 @@ public:
protected:
Module(const ContainerPtr&, const std::string&);
- friend class SLICE_API Container;
+ friend class Container;
};
// ----------------------------------------------------------------------
@@ -466,8 +466,8 @@ public:
protected:
ClassDecl(const ContainerPtr&, const std::string&, bool, bool);
- friend class SLICE_API Container;
- friend class SLICE_API ClassDef;
+ friend class Container;
+ friend class ClassDef;
ClassDefPtr _definition;
bool _interface;
@@ -519,7 +519,7 @@ public:
protected:
Operation(const ContainerPtr&, const std::string&, const TypePtr&, Mode);
- friend class SLICE_API ClassDef;
+ friend class ClassDef;
TypePtr _returnType;
ExceptionList _throws;
@@ -566,7 +566,7 @@ public:
protected:
ClassDef(const ContainerPtr&, const std::string&, bool, const ClassList&, bool);
- friend class SLICE_API Container;
+ friend class Container;
ClassDeclPtr _declaration;
bool _interface;
@@ -622,7 +622,7 @@ public:
protected:
Exception(const ContainerPtr&, const std::string&, const ExceptionPtr&, bool);
- friend class SLICE_API Container;
+ friend class Container;
ExceptionPtr _base;
bool _local;
@@ -649,7 +649,7 @@ public:
protected:
Struct(const ContainerPtr&, const std::string&, bool);
- friend class SLICE_API Container;
+ friend class Container;
};
// ----------------------------------------------------------------------
@@ -671,7 +671,7 @@ public:
protected:
Sequence(const ContainerPtr&, const std::string&, const TypePtr&, bool);
- friend class SLICE_API Container;
+ friend class Container;
TypePtr _type;
};
@@ -698,7 +698,7 @@ public:
protected:
Dictionary(const ContainerPtr&, const std::string&, const TypePtr&, const TypePtr&, bool);
- friend class SLICE_API Container;
+ friend class Container;
TypePtr _keyType;
TypePtr _valueType;
@@ -725,7 +725,7 @@ public:
protected:
Enum(const ContainerPtr&, const std::string&, bool);
- friend class SLICE_API Container;
+ friend class Container;
EnumeratorList _enumerators;
};
@@ -746,8 +746,8 @@ public:
protected:
Enumerator(const ContainerPtr&, const std::string&);
- friend class SLICE_API Container;
- friend class SLICE_API Enum;
+ friend class Container;
+ friend class Enum;
EnumPtr _type;
};
@@ -775,7 +775,7 @@ public:
protected:
Const(const ContainerPtr&, const std::string&, const TypePtr&, const std::string&);
- friend class SLICE_API Container;
+ friend class Container;
TypePtr _type;
std::string _value;
@@ -799,7 +799,7 @@ public:
protected:
ParamDecl(const ContainerPtr&, const std::string&, const TypePtr&, bool isOutParam);
- friend class SLICE_API Operation;
+ friend class Operation;
TypePtr _type;
bool _isOutParam;
@@ -822,9 +822,9 @@ public:
protected:
DataMember(const ContainerPtr&, const std::string&, const TypePtr&);
- friend class SLICE_API ClassDef;
- friend class SLICE_API Struct;
- friend class SLICE_API Exception;
+ friend class ClassDef;
+ friend class Struct;
+ friend class Exception;
TypePtr _type;
};
diff --git a/cpp/src/Freeze/SharedDb.h b/cpp/src/Freeze/SharedDb.h
index c6260ca8acb..c2fad563dd7 100644
--- a/cpp/src/Freeze/SharedDb.h
+++ b/cpp/src/Freeze/SharedDb.h
@@ -42,6 +42,15 @@ public:
const std::string&
dbName() const;
+#ifdef __HP_aCC
+
+ virtual int
+ get(DbTxn *txnid, Dbt *key, Dbt *data, u_int32_t flags)
+ {
+ ::Db::get(txnid, key, data, flags);
+ }
+#endif
+
private:
struct MapKey
diff --git a/cpp/src/Glacier/Blobject.cpp b/cpp/src/Glacier/Blobject.cpp
index e787c64f64a..15da41f95ee 100644
--- a/cpp/src/Glacier/Blobject.cpp
+++ b/cpp/src/Glacier/Blobject.cpp
@@ -95,11 +95,47 @@ Glacier::TwowayThrottle::twowayFinished()
}
}
+
+#ifdef __HP_aCC
+//
+// Compiler bug!
+// The conditional in Glacier::Blobject::Blobject below result in a
+// std::exception "thread synchronization error" at runtime
+// when using string litterals (looks like a RogueWave bug)
+// The work around is to use static strings:
+//
+
+static const string traceServer = "Glacier.Router.Trace.Server";
+static const string traceClient = "Glacier.Router.Trace.Client";
+
+static const string serverForwardContext = "Glacier.Router.Server.ForwardContext";
+static const string clientForwardContext = "Glacier.Router.Client.ForwardContext";
+
+static const string serverSleepTime = "Glacier.Router.Server.SleepTime";
+static const string clientSleepTime = "Glacier.Router.Client.SleepTime";
+#endif
+
Glacier::Blobject::Blobject(const CommunicatorPtr& communicator, bool reverse) :
_communicator(communicator),
_reverse(reverse),
_properties(_communicator->getProperties()),
_logger(_communicator->getLogger()),
+
+#ifdef __HP_aCC
+ //
+ // Compiler bug, see above
+ //
+ _traceLevel(_reverse ?
+ _properties->getPropertyAsInt(traceServer) :
+ _properties->getPropertyAsInt(traceClient)),
+ _forwardContext(_reverse ?
+ _properties->getPropertyAsInt(serverForwardContext) > 0 :
+ _properties->getPropertyAsInt(clientForwardContext) > 0),
+ _sleepTime(_reverse ?
+ IceUtil::Time::milliSeconds(_properties->getPropertyAsInt(serverSleepTime)) :
+ IceUtil::Time::milliSeconds(_properties->getPropertyAsInt(clientSleepTime))),
+
+#else
_traceLevel(_reverse ?
_properties->getPropertyAsInt("Glacier.Router.Trace.Server") :
_properties->getPropertyAsInt("Glacier.Router.Trace.Client")),
@@ -109,6 +145,8 @@ Glacier::Blobject::Blobject(const CommunicatorPtr& communicator, bool reverse) :
_sleepTime(_reverse ?
IceUtil::Time::milliSeconds(_properties->getPropertyAsInt("Glacier.Router.Server.SleepTime")) :
IceUtil::Time::milliSeconds(_properties->getPropertyAsInt("Glacier.Router.Client.SleepTime"))),
+#endif
+
_twowayThrottle(_communicator, _reverse)
{
_requestQueue = new RequestQueue(_communicator, _traceLevel, _reverse, _sleepTime);
diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp
index ec318a5e20c..cb2bb9716a3 100644
--- a/cpp/src/Ice/Application.cpp
+++ b/cpp/src/Ice/Application.cpp
@@ -213,10 +213,12 @@ Ice::Application::main(int argc, char* argv[], const char* configFile)
cerr << _appName << ": " << ex << endl;
status = EXIT_FAILURE;
}
+ /*
catch(const std::exception& ex)
{
- cerr << _appName << ": std::exception: " << ex.what() << endl;
+ cerr << _appName << ": std::exception5: " << ex.what() << endl;
status = EXIT_FAILURE;
+ assert(0);
}
catch(const std::string& msg)
{
@@ -233,7 +235,8 @@ Ice::Application::main(int argc, char* argv[], const char* configFile)
cerr << _appName << ": unknown exception" << endl;
status = EXIT_FAILURE;
}
-
+ */
+
if(_communicator)
{
//
diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp
index 058ee6d5251..31705c32f49 100644
--- a/cpp/src/Ice/DynamicLibrary.cpp
+++ b/cpp/src/Ice/DynamicLibrary.cpp
@@ -92,6 +92,16 @@ IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIc
lib += 'd';
# endif
lib += ".dll";
+#elif defined(__hpux)
+ lib = "lib" + libName;
+ if(!version.empty())
+ {
+ lib += "." + version;
+ }
+ else
+ {
+ lib += ".sl";
+ }
#else
lib = "lib" + libName + ".so";
if(!version.empty())
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index 6610a8e5e59..f282cedb669 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -319,7 +319,7 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager)
{
if(_os.instance()->properties()->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
- __warning(string("std::exception: ") + ex.what());
+ __warning(string("std::exception3: ") + ex.what());
}
if(_response)
@@ -328,7 +328,7 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager)
_os.b.resize(headerSize + 4); // Dispatch status position.
_os.write(static_cast<Byte>(DispatchUnknownException));
ostringstream str;
- str << "std::exception: " << ex.what();
+ str << "std::exception4: " << ex.what();
_os.write(str.str());
}
diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp
index 80cdc47997c..55999e70949 100644
--- a/cpp/src/Ice/IncomingAsync.cpp
+++ b/cpp/src/Ice/IncomingAsync.cpp
@@ -182,7 +182,7 @@ IceInternal::IncomingAsync::__exception(const std::exception& ex)
if(_os.instance()->properties()->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
- __warning(string("std::exception: ") + ex.what());
+ __warning(string("std::exception1: ") + ex.what());
}
if(_response)
@@ -191,7 +191,7 @@ IceInternal::IncomingAsync::__exception(const std::exception& ex)
_os.b.resize(headerSize + 4); // Dispatch status position.
_os.write(static_cast<Byte>(DispatchUnknownException));
ostringstream str;
- str << "std::exception: " << ex.what();
+ str << "std::exception2: " << ex.what();
_os.write(str.str());
}
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index b0de2288ce6..e9e29f8d68b 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -627,7 +627,7 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[])
LocatorPrx::uncheckedCast(_proxyFactory->stringToProxy(_defaultsAndOverrides->defaultLocator)));
}
-#if !defined(_WIN32) && !defined(__sun)
+#if !defined(_WIN32) && !defined(__sun) && !defined(__hpux)
//
// daemon() must be called after any plug-ins have been
// installed. For example, an SSL plug-in might want to
diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h
index d0db8d92527..83568571088 100644
--- a/cpp/src/Ice/Network.h
+++ b/cpp/src/Ice/Network.h
@@ -15,6 +15,10 @@
#ifndef ICE_NETWORK_H
#define ICE_NETWORK_H
+#ifdef __hpux
+# define _XOPEN_SOURCE_EXTENDED
+#endif
+
#include <Ice/Config.h>
#ifdef _WIN32
@@ -24,7 +28,13 @@ typedef int ssize_t;
# include <unistd.h>
# include <fcntl.h>
# include <sys/socket.h>
-# include <sys/select.h>
+
+# if defined(__hpux)
+# include <sys/time.h>
+# else
+# include <sys/select.h>
+# endif
+
# include <netinet/in.h>
# include <netinet/tcp.h>
# include <arpa/inet.h>
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp
index 6adc65674e2..d9dfcf39c2c 100644
--- a/cpp/src/IceSSL/OpenSSLPluginI.cpp
+++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp
@@ -156,9 +156,9 @@ idFunction()
// On FreeBSD, pthread_t is a pointer to a per-thread structure
//
return reinterpret_cast<unsigned long>(pthread_self());
-#elif (defined(__linux) || defined(__sun))
+#elif (defined(__linux) || defined(__sun) || defined(__hpux))
//
- // On Linux and Solaris, pthread_t is an integer
+ // On Linux, Solaris and HP-UX, pthread_t is an integer
//
return static_cast<unsigned long>(pthread_self());
#else
diff --git a/cpp/src/IceUtil/GCRecMutex.cpp b/cpp/src/IceUtil/GCRecMutex.cpp
index 1cb20dc190a..d474573b3d8 100644
--- a/cpp/src/IceUtil/GCRecMutex.cpp
+++ b/cpp/src/IceUtil/GCRecMutex.cpp
@@ -14,9 +14,12 @@
#include <IceUtil/GCRecMutex.h>
-using namespace IceUtil;
+namespace IceUtil
+{
+GCRecMutex gcRecMutex;
+}
-GCRecMutex ICE_UTIL_API IceUtil::gcRecMutex;
+using namespace IceUtil;
static int gcInitCount = 0;
diff --git a/cpp/src/IceUtil/GCShared.cpp b/cpp/src/IceUtil/GCShared.cpp
index 51705f7a655..5a92cdaeb76 100644
--- a/cpp/src/IceUtil/GCShared.cpp
+++ b/cpp/src/IceUtil/GCShared.cpp
@@ -15,9 +15,12 @@
#include <IceUtil/GCRecMutex.h>
#include <IceUtil/GCShared.h>
-using namespace IceUtil;
+namespace IceUtil
+{
+GCObjectSet gcObjects;
+}
-IceUtil::GCObjectSet IceUtil::gcObjects;
+using namespace IceUtil;
IceUtil::GCShared::GCShared()
: _ref(0), _noDelete(false)
diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp
index cee85b3a152..128b5d93507 100644
--- a/cpp/src/IceUtil/InputUtil.cpp
+++ b/cpp/src/IceUtil/InputUtil.cpp
@@ -150,6 +150,10 @@ strToInt64(const char* s, char** endptr, int base)
return result;
+#elif defined(ICE_64)
+ return strtol(s, endptr, base);
+#elif defined(__hpux)
+ return __strtoll(s, endptr, base);
#else
return strtoll(s, endptr, base);
#endif
diff --git a/cpp/src/icecpp/cccp.c b/cpp/src/icecpp/cccp.c
index 2585eeb3e87..cfdc6480cb3 100644
--- a/cpp/src/icecpp/cccp.c
+++ b/cpp/src/icecpp/cccp.c
@@ -200,7 +200,8 @@ static void hack_vms_include_specification ();
/* External declarations. */
-extern char *version_string;
+/* extern char *version_string; */
+
extern char *update_path PROTO((char *, char *));
//#ifndef VMS
//#ifndef HAVE_STRERROR
@@ -2265,7 +2266,7 @@ index0 (s, c, n)
{
char *p = (char *) s;
for (;;) {
- char *q = index (p, c);
+ char *q = (char*) index (p, c);
if (q)
return (U_CHAR *) q;
else {
@@ -4642,7 +4643,7 @@ base_name (fname)
if (s != fname)
return s;
#endif
- if ((p = rindex (s, '/'))) s = p + 1;
+ if ((p = (char*) rindex (s, '/'))) s = p + 1;
#ifdef DIR_SEPARATOR
if ((p = rindex (s, DIR_SEPARATOR))) s = p + 1;
#endif
@@ -5227,7 +5228,7 @@ check_preconditions (prec)
char *lineend;
while (*prec) {
- lineend = index (prec, '\n');
+ lineend = (char*) index (prec, '\n');
if (*prec++ != '#') {
error ("Bad format encountered while reading precompiled file");
diff --git a/cpp/src/icecpp/config.h b/cpp/src/icecpp/config.h
index 324f2149d34..a78e3151a22 100644
--- a/cpp/src/icecpp/config.h
+++ b/cpp/src/icecpp/config.h
@@ -17,7 +17,7 @@
// configure script from the gcc-2.8.1 distribution.
//
-#if defined(__linux) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__linux) || defined(__FreeBSD__) || defined(__sun) || defined(__hpux)
# define HAVE_INTTYPES_H 1
# define TIME_WITH_SYS_TIME 1
# define HAVE_BCMP 1
@@ -35,6 +35,10 @@
# define alloca _alloca
#endif
+#if defined(__hpux)
+#include <alloca.h>
+#endif
+
#if defined(__sun)
#include <alloca.h>
#include <malloc.h>
@@ -57,10 +61,8 @@
#define LONG_TYPE_SIZE 4
#if defined(_WIN32)
# define WCHAR_TYPE_SIZE 2
-#elif (defined(__linux) || defined(__FreeBSD__)) && (defined(__i386) || defined(__x86_64)) \
- || defined (__sun)
-# define WCHAR_TYPE_SIZE 4
-#elif defined(__linux) && defined(__sparc__)
+#elif (defined(__linux) || defined(__FreeBSD__)) && (defined(__i386) || defined(__x86_64) || defined(__sparc)) \
+ || defined (__sun) || defined(__hpux)
# define WCHAR_TYPE_SIZE 4
#else
# error "unsupported operating system or platform"
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 55728f17ef1..76f69cfce5e 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -2322,7 +2322,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp << nl << "void " << _dllExport << "__patch__" << name << "Ptr(void*, ::Ice::ObjectPtr&);";
C << sp << nl << "void " << _dllExport;
- C << nl << scope << "__patch__" << name << "Ptr(void* __addr, ::Ice::ObjectPtr& v)";
+ C << nl << scope.substr(2) << "__patch__" << name << "Ptr(void* __addr, ::Ice::ObjectPtr& v)";
C << sb;
C << nl << scope << name << "Ptr* p = static_cast< " << scope << name << "Ptr*>(__addr);";
C << nl << "assert(p);";
@@ -2677,10 +2677,8 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref
|| ClassDeclPtr::dynamicCast(p))
{
C << nl << "__addObject(_c, " << prefix << name << ".get());";
- return;
}
-
- if(StructPtr s = StructPtr::dynamicCast(p))
+ else if(StructPtr s = StructPtr::dynamicCast(p))
{
DataMemberList dml = s->dataMembers();
for(DataMemberList::const_iterator i = dml.begin(); i != dml.end(); ++i)
@@ -2690,10 +2688,8 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref
emitGCInsertCode((*i)->type(), prefix + name + ".", fixKwd((*i)->name()), ++level);
}
}
- return;
}
-
- if(DictionaryPtr d = DictionaryPtr::dynamicCast(p))
+ else if(DictionaryPtr d = DictionaryPtr::dynamicCast(p))
{
string scoped = fixKwd(d->scoped());
stringstream tmp;
@@ -2706,10 +2702,8 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref
emitGCInsertCode(d->valueType(), "", string("(*") + iterName + ").second", ++level);
C << eb;
C << eb;
- return;
}
-
- if(SequencePtr s = SequencePtr::dynamicCast(p))
+ else if(SequencePtr s = SequencePtr::dynamicCast(p))
{
string scoped = fixKwd(s->scoped());
stringstream tmp;
@@ -2722,7 +2716,6 @@ Slice::Gen::ObjectVisitor::emitGCInsertCode(const TypePtr& p, const string& pref
emitGCInsertCode(s->type(), string("(*") + iterName + ")", "", ++level);
C << eb;
C << eb;
- return;
}
}
@@ -2737,10 +2730,8 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi
C << nl << prefix << name << "->__decRefUnsafe();";
C << nl << prefix << name << ".__clearHandleUnsafe();";
C << eb;
- return;
}
-
- if(StructPtr s = StructPtr::dynamicCast(p))
+ else if(StructPtr s = StructPtr::dynamicCast(p))
{
DataMemberList dml = s->dataMembers();
for(DataMemberList::const_iterator i = dml.begin(); i != dml.end(); ++i)
@@ -2750,10 +2741,8 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi
emitGCClearCode((*i)->type(), prefix + name + ".", fixKwd((*i)->name()), ++level);
}
}
- return;
}
-
- if(DictionaryPtr d = DictionaryPtr::dynamicCast(p))
+ else if(DictionaryPtr d = DictionaryPtr::dynamicCast(p))
{
string scoped = fixKwd(d->scoped());
stringstream tmp;
@@ -2766,10 +2755,8 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi
emitGCClearCode(d->valueType(), "", string("(*") + iterName + ").second", ++level);
C << eb;
C << eb;
- return;
}
-
- if(SequencePtr s = SequencePtr::dynamicCast(p))
+ else if(SequencePtr s = SequencePtr::dynamicCast(p))
{
string scoped = fixKwd(s->scoped());
stringstream tmp;
@@ -2781,8 +2768,7 @@ Slice::Gen::ObjectVisitor::emitGCClearCode(const TypePtr& p, const string& prefi
C << sb;
emitGCClearCode(s->type(), "", string("(*") + iterName + ")", ++level);
C << eb;
- C << eb;
- return;
+ C << eb;;
}
}
@@ -3140,48 +3126,54 @@ Slice::Gen::ImplVisitor::writeReturn(Output& out, const TypePtr& type)
break;
}
}
- return;
- }
-
- ProxyPtr prx = ProxyPtr::dynamicCast(type);
- if(prx)
- {
- out << nl << "return 0;";
- return;
- }
-
- ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
- if(cl)
- {
- out << nl << "return 0;";
- return;
- }
-
- StructPtr st = StructPtr::dynamicCast(type);
- if(st)
- {
- out << nl << "return " << fixKwd(st->scoped()) << "();";
- return;
}
-
- EnumPtr en = EnumPtr::dynamicCast(type);
- if(en)
- {
- EnumeratorList enumerators = en->getEnumerators();
- out << nl << "return " << fixKwd(en->scope()) << fixKwd(enumerators.front()->name()) << ';';
- return;
- }
-
- SequencePtr seq = SequencePtr::dynamicCast(type);
- if(seq)
+ else
{
- out << nl << "return " << fixKwd(seq->scoped()) << "();";
- return;
+ ProxyPtr prx = ProxyPtr::dynamicCast(type);
+ if(prx)
+ {
+ out << nl << "return 0;";
+ }
+ else
+ {
+ ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
+ if(cl)
+ {
+ out << nl << "return 0;";
+ }
+ else
+ {
+ StructPtr st = StructPtr::dynamicCast(type);
+ if(st)
+ {
+ out << nl << "return " << fixKwd(st->scoped()) << "();";
+ }
+ else
+ {
+ EnumPtr en = EnumPtr::dynamicCast(type);
+ if(en)
+ {
+ EnumeratorList enumerators = en->getEnumerators();
+ out << nl << "return " << fixKwd(en->scope()) << fixKwd(enumerators.front()->name()) << ';';
+ }
+ else
+ {
+ SequencePtr seq = SequencePtr::dynamicCast(type);
+ if(seq)
+ {
+ out << nl << "return " << fixKwd(seq->scoped()) << "();";
+ }
+ else
+ {
+ DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
+ assert(dict);
+ out << nl << "return " << fixKwd(dict->scoped()) << "();";
+ }
+ }
+ }
+ }
+ }
}
-
- DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
- assert(dict);
- out << nl << "return " << fixKwd(dict->scoped()) << "();";
}
bool
diff --git a/cpp/test/IceStorm/federation/Subscriber.cpp b/cpp/test/IceStorm/federation/Subscriber.cpp
index c7ace5f3952..5b82c669858 100644
--- a/cpp/test/IceStorm/federation/Subscriber.cpp
+++ b/cpp/test/IceStorm/federation/Subscriber.cpp
@@ -61,7 +61,7 @@ private:
typedef IceUtil::Handle<EventI> EventIPtr;
int EventI::_count = 0;
-IceUtil::StaticMutex EventI::_countMutex;
+IceUtil::StaticMutex EventI::_countMutex = ICE_STATIC_MUTEX_INITIALIZER;
void
createLock(const string& name)