[37182] trunk/dports/devel/ice-cpp

blair at macports.org blair at macports.org
Wed May 28 23:04:10 PDT 2008


Revision: 37182
          http://trac.macosforge.org/projects/macports/changeset/37182
Author:   blair at macports.org
Date:     2008-05-28 23:04:10 -0700 (Wed, 28 May 2008)

Log Message:
-----------
New upstream 3.3.0 release of Ice for C++.

* ice-cpp/files/patch-ice.cpp.config.Make.rules.Darwin.diff:
  Renamed from ice-cpp/files/patch-config.Make.rules.Darwin.diff.

* ice-cpp/files/patch-mcpp-2.7-1.diff,
* ice-cpp/files/patch-mcpp-2.7-2.diff:
  New patches for mcpp.

* ice-cpp/files/patch-ServantLocator.locate-can-throw-user-exceptions.diff:
  Delete as this is in the released version.

* ice-cpp/files/patch-ice.cpp.config.Make.rules.diff:
  Renamed from ice-cpp/files/patch-config.Make.rules.diff.

* ice-cpp/Portfile:
  Updated Portfile.

Modified Paths:
--------------
    trunk/dports/devel/ice-cpp/Portfile

Added Paths:
-----------
    trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.Darwin.diff
    trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.diff
    trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-1.diff
    trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-2.diff

Removed Paths:
-------------
    trunk/dports/devel/ice-cpp/files/patch-ServantLocator.locate-can-throw-user-exceptions.diff
    trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.Darwin.diff
    trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.diff

Modified: trunk/dports/devel/ice-cpp/Portfile
===================================================================
--- trunk/dports/devel/ice-cpp/Portfile	2008-05-29 06:02:49 UTC (rev 37181)
+++ trunk/dports/devel/ice-cpp/Portfile	2008-05-29 06:04:10 UTC (rev 37182)
@@ -3,8 +3,7 @@
 PortSystem 1.0
 
 name		ice-cpp
-version		3.2.1
-revision	1
+version		3.3.0
 categories	devel
 maintainers	blair
 description	Fast, object-oriented RPC for C++, Java, Python, Ruby, PHP
@@ -30,38 +29,77 @@
 	other languages: slice2cs, slice2java, slice2py, slice2rb and slice2vb.
 
 homepage	http://www.zeroc.com/
-master_sites	http://www.zeroc.com/download/Ice/3.2/
+master_sites	http://www.zeroc.com/download/Ice/3.3/:ice \
+		sourceforge:mcpp
+
+set mcpp_version 2.7
+set ice_dist	Ice-${version}${extract.suffix}
+set mcpp_dist	mcpp-${mcpp_version}${extract.suffix}
+
+distfiles	${ice_dist}:ice \
+		${mcpp_dist}:mcpp
 distname	Ice-${version}
-checksums	md5 77bb04788747d0f4f7ef35f7a4c2800f \
-		sha1  69fc7dbdff81d7d9300b57f6e495914f3c9e5c19 \
-		rmd160  c3394486ba13e94c2491b0dc48dc19c3e7565ecd
+checksums	${ice_dist} \
+			md5 0500306d9cdbc0fbb553fbb529de557a \
+			sha1 b599c3a4d1d3006b868bf2cbcd8e2a2d4575fb22 \
+			rmd160 e85b37c93f12d9ae97c6b7b2f64f506fa051e4f8 \
+		${mcpp_dist} \
+			md5 14f9e4155aeb5812fc3ced6345caee02 \
+			sha1 3bb1c2a2f0fae9c73c2c4edaf98354b2140f4f53 \
+			rmd160 0ff924d66c383dcdd092df0f7e165a7f59a8754a
 platforms	darwin
 
-depends_lib	port:db45 \
+depends_lib	port:db46 \
 		port:expat \
 		port:openssl \
 		port:readline
 
-patchfiles	patch-config.Make.rules.diff \
-		patch-config.Make.rules.Darwin.diff \
-		patch-ServantLocator.locate-can-throw-user-exceptions.diff
+patchfiles	patch-ice.cpp.config.Make.rules.diff \
+		patch-ice.cpp.config.Make.rules.Darwin.diff \
+		patch-mcpp-${mcpp_version}-1.diff \
+		patch-mcpp-${mcpp_version}-2.diff
+patch {
+	set cmd "cd ${workpath}/mcpp-${mcpp_version} && patch -p0 < ${filespath}/patch-mcpp-${mcpp_version}-1.diff"
+	ui_debug ${cmd}
+	system ${cmd}
 
-use_configure	no
+	set cmd "cd ${workpath}/mcpp-${mcpp_version} && patch -p0 < ${filespath}/patch-mcpp-${mcpp_version}-2.diff"
+	ui_debug ${cmd}
+	system ${cmd}
 
-build.target	prefix="${prefix}" \
-		embedded_runpath_prefix="${prefix}" \
-		OPTIMIZE="yes" \
-		BZIP2_HOME="${prefix}" \
-		DB_HOME="${prefix}" \
-		EXPAT_HOME="${prefix}" \
-		OPENSSL_HOME="${prefix}" \
-		READLINE_HOME="${prefix}" \
-		USE_READLINE=yes \
-		all
-		
+	set cmd "cd ${workpath}/Ice-${version} && patch -p0 < ${filespath}/patch-ice.cpp.config.Make.rules.diff"
+	ui_debug ${cmd}
+	system ${cmd}
+
+	set cmd "cd ${workpath}/Ice-${version} && patch -p0 < ${filespath}/patch-ice.cpp.config.Make.rules.Darwin.diff"
+	ui_debug ${cmd}
+	system ${cmd}
+
+	reinplace "s/-O2/-g -O2/" ${workpath}/Ice-${version}/cpp/config/Make.rules.Darwin
+	reinplace "s/_LIBICONV_VERSION < 0x010B/_LIBICONV_VERSION <= 0x010B/" ${workpath}/Ice-${version}/cpp/include/Ice/IconvStringConverter.h
+}
+
+configure {
+	set cmd "cd ${workpath}/mcpp-${mcpp_version} && CFLAGS='-O2 -g -fno-common' ./configure --enable-mcpplib"
+	ui_debug ${cmd}
+	system ${cmd}
+}
+
+build {
+	set cmd "cd ${workpath}/mcpp-${mcpp_version} && make"
+	ui_debug ${cmd}
+	system ${cmd}
+
+	set cmd "cd ${workpath}/Ice-${version}/cpp && make prefix='${prefix}' embedded_runpath_prefix='${prefix}' OPTIMIZE='yes' BZIP2_HOME='${prefix}' DB_HOME='${prefix}' EXPAT_HOME='${prefix}' OPENSSL_HOME='${prefix}' READLINE_HOME='${prefix}' USE_READLINE=yes MCPP_LIBS='${workpath}/mcpp-${mcpp_version}/src/.libs/*.o' LDPLATFORMFLAGS= all && cd doc && make"
+	ui_debug ${cmd}
+	system ${cmd}
+}
+
+test.dir	${worksrcpath}/cpp
 test.run	yes
 test.target	test
 
+destroot.dir	${worksrcpath}/cpp
 destroot.target	prefix="${destroot}${prefix}" \
 		embedded_runpath_prefix="${prefix}" \
 		OPTIMIZE="yes" \
@@ -74,28 +112,26 @@
 		install
 
 post-destroot {
-	cd ${destroot}${prefix}
+	set cppdir ${workpath}/Ice-${version}/cpp
+	set sharedir ${destroot}${prefix}/share
+	set docdir ${sharedir}/doc/${name}
 
-	file rename include ice
-	xinstall -d -m 755 include
-	file rename ice include/
+	xinstall -m 755 -d ${sharedir}/ice
+	file rename ${destroot}${prefix}/config ${sharedir}/ice
+	file rename ${destroot}${prefix}/slice ${sharedir}/ice
 
-	xinstall -d -m 755 share/ice
-	file rename slice share/ice/
-	file rename config share/ice/
+	xinstall -m 755 -d ${docdir}
+	file rename ${destroot}${prefix}/ICE_LICENSE ${docdir}
+	file rename ${destroot}${prefix}/LICENSE ${docdir}
+	file copy ${cppdir}/doc/reference ${docdir}
 
-	xinstall -m 755 -d share/doc/${name}
-	file rename doc/reference share/doc/${name}/reference
-	file rename ICE_LICENSE share/doc/${name}/
-	file rename LICENSE share/doc/${name}/
-
-	cd ${destroot}${prefix}/share/doc/${name}
-	foreach f {CHANGES INSTALL.MACOSX README} {
-		file copy ${worksrcpath}/${f} .
+	foreach f {CHANGES RELEASE_NOTES} {
+		file copy ${workpath}/Ice-${version}/${f} ${docdir}
 	}
 
 	if {[variant_isset demo_source_code]} {
-		file copy ${worksrcpath}/demo .
+		system "cd ${cppdir}/demo && make clean"
+		file copy ${cppdir}/demo $docdir
 	}
 }
 

Deleted: trunk/dports/devel/ice-cpp/files/patch-ServantLocator.locate-can-throw-user-exceptions.diff
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-ServantLocator.locate-can-throw-user-exceptions.diff	2008-05-29 06:02:49 UTC (rev 37181)
+++ trunk/dports/devel/ice-cpp/files/patch-ServantLocator.locate-can-throw-user-exceptions.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -1,1984 +0,0 @@
-diff -ru ../Ice-3.2.1.orig/include/Ice/Outgoing.h ./include/Ice/Outgoing.h
---- ../Ice-3.2.1.orig/include/Ice/Outgoing.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./include/Ice/Outgoing.h	2007-12-20 12:16:29.000000000 -0800
-@@ -49,6 +49,8 @@
-     //
-     bool retry() const;
- 
-+    static void throwUnknownWrapper(const ::std::exception&);
-+
- private:
- 
-     const LocalExceptionWrapper& operator=(const LocalExceptionWrapper&);
-diff -ru ../Ice-3.2.1.orig/include/Slice/CsUtil.h ./include/Slice/CsUtil.h
---- ../Ice-3.2.1.orig/include/Slice/CsUtil.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./include/Slice/CsUtil.h	2007-12-20 12:16:29.000000000 -0800
-@@ -34,6 +34,7 @@
- 
- protected:
-     static std::string fixId(const std::string&, int = 0, bool = false);
-+    static std::string fixId(const ContainedPtr&, int = 0, bool = false);
-     static std::string typeToString(const TypePtr&);
-     static bool isValueType(const TypePtr&);
- 
-diff -ru ../Ice-3.2.1.orig/slice/Ice/ServantLocator.ice ./slice/Ice/ServantLocator.ice
---- ../Ice-3.2.1.orig/slice/Ice/ServantLocator.ice	2007-08-08 12:00:54.000000000 -0700
-+++ ./slice/Ice/ServantLocator.ice	2007-12-20 12:16:29.000000000 -0800
-@@ -36,6 +36,15 @@
-      * the returned servant into its active servant map. This must be
-      * done by the servant locator implementation, if this is desired.
-      *
-+     * [locate] can throw any user exception. If it does, that exception
-+     * is marshaled back to the client. If the Slice definition for the
-+     * corresponding operation includes that user exception, the client
-+     * receives that user exception; otherwise, the client receives
-+     * [UnknownUserException].
-+     *
-+     * If [locate] throws any exception, the Ice run time does <EM>not</EM>
-+     * call [finished].
-+     *
-      * <p class="Note">If you call [locate] from your own code, you
-      * must also call [finished] when you have finished using the
-      * servant, provided that [locate] returned a non-null servant;
-@@ -55,7 +64,7 @@
-      * @see finished
-      *
-      **/
--    Object locate(Current curr, out LocalObject cookie);
-+    ["UserException"] Object locate(Current curr, out LocalObject cookie);
- 
-     /**
-      *
-@@ -64,6 +73,15 @@
-      * prior to the request and returned a non-null servant. This
-      * operation can be used for cleanup purposes after a request.
-      *
-+     * [finished] can throw any user exception. If it does, that exception
-+     * is marshaled back to the client. If the Slice definition for the
-+     * corresponding operation includes that user exception, the client
-+     * receives that user exception; otherwise, the client receives
-+     * [UnknownUserException].
-+     *
-+     * If both the operation and [finished] throw an exception, the
-+     * exception thrown by [finished] is marshaled back to the client.
-+     *
-      * @param curr Information about the current operation call for
-      * which a servant was located by [locate].
-      *
-@@ -76,7 +94,7 @@
-      * @see locate
-      *
-      **/
--    void finished(Current curr, Object servant, LocalObject cookie);
-+    ["UserException"] void finished(Current curr, Object servant, LocalObject cookie);
- 
-     /**
-      *
-diff -ru ../Ice-3.2.1.orig/src/Freeze/MapI.cpp ./src/Freeze/MapI.cpp
---- ../Ice-3.2.1.orig/src/Freeze/MapI.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Freeze/MapI.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1317,13 +1317,10 @@
-     }
-     _db = 0;
-     
--    for(IndexMap::iterator p = _indices.begin(); p != _indices.end(); ++p)
--    {
--        MapIndexBasePtr& indexBase = p->second;
--
--        indexBase->_impl = 0;
--        indexBase->_map = 0;
--    }
-+    //
-+    // We can't clear the indexBase as MapIndexI is using
-+    // the first map's indexBase objects
-+    //
-     _indices.clear();
- }
- 
-diff -ru ../Ice-3.2.1.orig/src/Ice/Incoming.cpp ./src/Ice/Incoming.cpp
---- ../Ice-3.2.1.orig/src/Ice/Incoming.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Ice/Incoming.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -387,6 +387,7 @@
- 
-     try
-     {
-+        bool finishedException = false;
-         try
-         {
-             if(servantManager)
-@@ -401,39 +402,83 @@
-                     }
-                     if(_locator)
-                     {
--                        _servant = _locator->locate(_current, _cookie);
-+                        try
-+                        {
-+                            _servant = _locator->locate(_current, _cookie);
-+                        }
-+                        catch(const UserException& ex)
-+                        {
-+                            _os.write(ex);
-+                            status = DispatchUserException;
-+                        }
-                     }
-                 }
-             }
--            if(!_servant)
-+            if(status == DispatchOK)
-             {
--                if(servantManager && servantManager->hasServant(_current.id))
-+                if(!_servant)
-                 {
--                    status = DispatchFacetNotExist;
-+                    if(servantManager && servantManager->hasServant(_current.id))
-+                    {
-+                        status = DispatchFacetNotExist;
-+                    }
-+                    else
-+                    {
-+                        status = DispatchObjectNotExist;
-+                    }
-                 }
-                 else
-                 {
--                    status = DispatchObjectNotExist;
-+                    status = _servant->__dispatch(*this, _current);
-                 }
-             }
--            else
--            {
--                status = _servant->__dispatch(*this, _current);
--            }
-         }
-         catch(...)
-         {
-             if(_locator && _servant && status != DispatchAsync)
-             {
--                _locator->finished(_current, _servant, _cookie);
-+                try
-+                {
-+                    _locator->finished(_current, _servant, _cookie);
-+                }
-+                catch(const UserException& ex)
-+                {
-+                    //
-+                    // The operation may ahve already marshaled a reply; we must overwrite that reply.
-+                    //
-+                    _os.endWriteEncaps();
-+                    _os.b.resize(headerSize + 5); // Byte following reply status.
-+                    _os.startWriteEncaps();
-+                    _os.write(ex);
-+                    status = DispatchUserException; // Code below inserts the reply status.
-+                    finishedException = true;
-+                }
-+                catch(...)
-+                {
-+                    throw;
-+                }
-             }
- 
-             throw;
-         }
-         
--        if(_locator && _servant && status != DispatchAsync)
-+        if(!finishedException && _locator && _servant && status != DispatchAsync)
-         {
--            _locator->finished(_current, _servant, _cookie);
-+            try
-+            {
-+                _locator->finished(_current, _servant, _cookie);
-+            }
-+            catch(const UserException& ex)
-+            {
-+                //
-+                // The operation may ahve already marshaled a reply; we must overwrite that reply.
-+                //
-+                _os.endWriteEncaps();
-+                _os.b.resize(headerSize + 5); // Byte following reply status.
-+                _os.startWriteEncaps();
-+                _os.write(ex);
-+                status = DispatchUserException; // Code below inserts the reply status.
-+            }
-         }
-     }
-     catch(const Exception& ex)
-diff -ru ../Ice-3.2.1.orig/src/Ice/IncomingAsync.cpp ./src/Ice/IncomingAsync.cpp
---- ../Ice-3.2.1.orig/src/Ice/IncomingAsync.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Ice/IncomingAsync.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -133,7 +133,31 @@
-     {
-         if(_locator && _servant)
-         {
--            _locator->finished(_current, _servant, _cookie);
-+            try
-+            {
-+                _locator->finished(_current, _servant, _cookie);
-+            }
-+            catch(const UserException& ex)
-+            {
-+                //
-+                // The operation may have already marshaled a reply; we must overwrite that reply.
-+                //
-+                if(_response)
-+                {
-+                    _os.endWriteEncaps();
-+                    _os.b.resize(headerSize + 4); // Reply status position.
-+                    _os.write(static_cast<Byte>(DispatchUserException));
-+                    _os.startWriteEncaps();
-+                    _os.write(ex);
-+                    _os.endWriteEncaps();
-+                    _connection->sendResponse(&_os, _compress);
-+                }
-+                else
-+                {
-+                    _connection->sendNoResponse();
-+                }
-+                return false;
-+            }
-         }
-         return true;
-     }
-diff -ru ../Ice-3.2.1.orig/src/Ice/Outgoing.cpp ./src/Ice/Outgoing.cpp
---- ../Ice-3.2.1.orig/src/Ice/Outgoing.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Ice/Outgoing.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -32,6 +32,44 @@
-     _ex.reset(dynamic_cast<LocalException*>(ex.get()->ice_clone()));
- }
- 
-+void
-+IceInternal::LocalExceptionWrapper::throwUnknownWrapper(const std::exception& ex)
-+{
-+
-+    const UserException* ue = dynamic_cast<const UserException*>(&ex);
-+    if(ue)
-+    {
-+        stringstream s;
-+        s << *ue;
-+        throw LocalExceptionWrapper(UnknownUserException(__FILE__, __LINE__, s.str()), false);
-+    }
-+
-+    const LocalException* le = dynamic_cast<const LocalException*>(&ex);
-+    if(le)
-+    {
-+#if 0
-+        //
-+        // Commented-out code makes local exceptions fully location transparent,
-+        // but the Freeze evictor relies on them not being transparent.
-+        //
-+        if(dynamic_cast<const UnknownException*>(le) ||
-+           dynamic_cast<const ObjectNotExistException*>(le) ||
-+           dynamic_cast<const OperationNotExistException*>(le) ||
-+           dynamic_cast<const FacetNotExistException*>(le))
-+        {
-+            throw LocalExceptionWrapper(*le, false);
-+        }
-+        stringstream s;
-+        s << *le;
-+        throw LocalExceptionWrapper(UnknownLocalException(__FILE__, __LINE__, s.str()), false);
-+#else
-+        throw LocalExceptionWrapper(*le, false);
-+#endif
-+    }
-+    string msg = "std::exception: ";
-+    throw LocalExceptionWrapper(UnknownException(__FILE__, __LINE__, msg + ex.what()), false);
-+}
-+
- const LocalException*
- IceInternal::LocalExceptionWrapper::get() const
- {
-diff -ru ../Ice-3.2.1.orig/src/Ice/Proxy.cpp ./src/Ice/Proxy.cpp
---- ../Ice-3.2.1.orig/src/Ice/Proxy.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Ice/Proxy.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1329,21 +1329,40 @@
-     __initCurrent(__current, "ice_isA", ::Ice::Nonmutating, context);
-     while(true)
-     {
--        Direct __direct(__current);
-         bool __ret;
-         try
-         {
--            __ret = __direct.servant()->ice_isA(__id, __current);
-+            Direct __direct(__current);
-+            try
-+            {
-+                __ret = __direct.servant()->ice_isA(__id, __current);
-+            }
-+            catch(const ::std::exception& __ex)
-+            {
-+                __direct.destroy();
-+                LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+            }
-+            catch(...)
-+            {
-+                __direct.destroy();
-+                throw;
-+            }
-+            __direct.destroy();
-         }
--        catch(...)
-+        catch(const LocalExceptionWrapper&)
-         {
--            __direct.destroy();
-             throw;
-         }
--        __direct.destroy();
-+        catch(const ::std::exception& __ex)
-+        {
-+            LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+        }
-+        catch(...)
-+        {
-+            LocalExceptionWrapper(UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
-+        }
-         return __ret;    
-     }
--    return false; // To keep the Visual C++ compiler happy.
- }
- 
- void
-@@ -1353,18 +1372,38 @@
-     __initCurrent(__current, "ice_ping", ::Ice::Nonmutating, context);
-     while(true)
-     {
--        Direct __direct(__current);
-         try
-         {
--            __direct.servant()->ice_ping(__current);
-+            Direct __direct(__current);
-+            try
-+            {
-+                __direct.servant()->ice_ping(__current);
-+            }
-+            catch(const ::std::exception& __ex)
-+            {
-+                __direct.destroy();
-+                LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+            }
-+            catch(...)
-+            {
-+                __direct.destroy();
-+                throw;
-+            }
-+            __direct.destroy();
-         }
--        catch(...)
-+        catch(const LocalExceptionWrapper&)
-         {
--            __direct.destroy();
-             throw;
-         }
--        __direct.destroy();
--        return; 
-+        catch(const ::std::exception& __ex)
-+        {
-+            LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+        }
-+        catch(...)
-+        {
-+            LocalExceptionWrapper(UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
-+        }
-+        return;
-     }
- }
- 
-@@ -1373,23 +1412,42 @@
- {
-     Current __current;
-     __initCurrent(__current, "ice_ids", ::Ice::Nonmutating, context);
-+    vector<string> __ret;
-     while(true)
-     {
--        Direct __direct(__current);
--        vector<string> __ret;
-         try
-         {
--            __ret = __direct.servant()->ice_ids(__current);
-+            Direct __direct(__current);
-+            try
-+            {
-+                __ret = __direct.servant()->ice_ids(__current);
-+            }
-+            catch(const ::std::exception& __ex)
-+            {
-+                __direct.destroy();
-+                LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+            }
-+            catch(...)
-+            {
-+                __direct.destroy();
-+                throw;
-+            }
-+            __direct.destroy();
-         }
--        catch(...)
-+        catch(const LocalExceptionWrapper&)
-         {
--            __direct.destroy();
-             throw;
-         }
--        __direct.destroy();
-+        catch(const ::std::exception& __ex)
-+        {
-+            LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+        }
-+        catch(...)
-+        {
-+            LocalExceptionWrapper(UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
-+        }
-         return __ret;
-     }
--    return vector<string>(); // To keep the Visual C++ compiler happy.
- }
- 
- string
-@@ -1399,21 +1457,40 @@
-     __initCurrent(__current, "ice_id", ::Ice::Nonmutating, context);
-     while(true)
-     {
--        Direct __direct(__current);
-         string __ret;
-         try
-         {
--            __ret = __direct.servant()->ice_id(__current);
-+            Direct __direct(__current);
-+            try
-+            {
-+                __ret = __direct.servant()->ice_id(__current);
-+            }
-+            catch(const ::std::exception& __ex)
-+            {
-+                __direct.destroy();
-+                LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+            }
-+            catch(...)
-+            {
-+                __direct.destroy();
-+                throw;
-+            }
-+            __direct.destroy();
-         }
--        catch(...)
-+        catch(const LocalExceptionWrapper&)
-         {
--            __direct.destroy();
-             throw;
-         }
--        __direct.destroy();
-+        catch(const ::std::exception& __ex)
-+        {
-+            LocalExceptionWrapper::throwUnknownWrapper(__ex);
-+        }
-+        catch(...)
-+        {
-+            LocalExceptionWrapper(UnknownException(__FILE__, __LINE__, "unknown c++ exception"), false);
-+        }
-         return __ret;    
-     }
--    return string(); // To keep the Visual C++ compiler happy.
- }
- 
- bool
-diff -ru ../Ice-3.2.1.orig/src/Slice/CsUtil.cpp ./src/Slice/CsUtil.cpp
---- ../Ice-3.2.1.orig/src/Slice/CsUtil.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Slice/CsUtil.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -130,6 +130,21 @@
- }
- 
- string
-+Slice::CsGenerator::fixId(const ContainedPtr& cont, int baseTypes, bool mangleCasts)
-+{
-+    ContainerPtr container = cont->container();
-+    ContainedPtr contained = ContainedPtr::dynamicCast(container);
-+    if(contained && contained->hasMetaData("clr:property"))
-+    {
-+        return cont->name() + "_prop";
-+    }
-+    else
-+    {
-+        return fixId(cont->name(), baseTypes, mangleCasts);
-+    }
-+}
-+
-+string
- Slice::CsGenerator::typeToString(const TypePtr& type)
- {
-     if(!type)
-@@ -464,19 +479,41 @@
-     {
-         if(marshal)
-         {
--            if(streamingAPI)
-+            if(!isValueType(st))
-             {
--                out << nl << param << ".ice_write(" << stream << ");";
-+                out << nl << "if(" << param << " == null)";
-+                out << sb;
-+                string typeS = typeToString(st);
-+                out << nl << typeS << " " << "tmp__ = new " << typeS << "();";
-+                out << nl << "tmp__.";
-+                out << (streamingAPI ? "ice_write" : "write__") << "(" << stream << ");";
-+                out << eb;
-+                out << nl << "else";
-+                out << sb;
-+                out << nl << param << "." << (streamingAPI ? "ice_write" : "write__") << "(" << stream << ");";
-+                out << eb;
-             }
-             else
-             {
--                out << nl << param << ".write__(" << stream << ");";
-+                if(streamingAPI)
-+                {
-+                    out << nl << param << ".ice_write(" << stream << ");";
-+                }
-+                else
-+                {
-+                    out << nl << param << ".write__(" << stream << ");";
-+                }
-             }
-         }
-         else
-         {
--            string typeS = typeToString(type);
--            out << nl << param << " = new " << typeS << "();";
-+            if(!isValueType(st))
-+            {
-+                out << nl << "if(" << param << " == null)";
-+                out << sb;
-+                out << nl << param << " = new " << typeToString(type) << "();";
-+                out << eb;
-+            }
-             if(streamingAPI)
-             {
-                 out << nl << param << ".ice_read(" << stream << ");";
-diff -ru ../Ice-3.2.1.orig/src/Slice/JavaUtil.cpp ./src/Slice/JavaUtil.cpp
---- ../Ice-3.2.1.orig/src/Slice/JavaUtil.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/Slice/JavaUtil.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -3442,6 +3442,17 @@
- void
- Slice::JavaGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p)
- {
-+    if(p->hasMetaData("UserException"))
-+    {
-+        ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
-+        if(!cl->isLocal())
-+        {
-+            cout << p->definitionContext()->filename() << ":" << p->line()
-+                 << ": warning: metadata directive `UserException' applies only to local operations "
-+                 << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name()
-+                 << "' is not local" << endl;
-+        }
-+    }
-     StringList metaData = getMetaData(p);
-     TypePtr returnType = p->returnType();
-     if(!metaData.empty())
-diff -ru ../Ice-3.2.1.orig/src/slice2cpp/Gen.cpp ./src/slice2cpp/Gen.cpp
---- ../Ice-3.2.1.orig/src/slice2cpp/Gen.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/slice2cpp/Gen.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -2527,6 +2527,15 @@
-     vector<string> paramsDecl;
-     vector<string> args;
- 
-+    ExceptionList throws = p->throws();
-+    throws.sort();
-+    throws.unique();
-+#if defined(__SUNPRO_CC)
-+    throws.sort(derivedToBaseCompare);
-+#else
-+    throws.sort(Slice::DerivedToBaseCompare());
-+#endif
-+
-     ParamDeclList paramList = p->parameters();
-     for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q)
-     {
-@@ -2586,23 +2595,18 @@
-         C << nl << "::Ice::Current __current;";
-         C << nl << "__initCurrent(__current, " << p->flattenedScope() + p->name() + "_name, "
-           << operationModeToString(p->sendMode()) << ", __context);";
--        C << nl << "while(true)";
--        C << sb;
--        C << nl << "::IceInternal::Direct __direct(__current);";
-         if(ret)
-         {
-             C << nl << retS << " __ret;";
-         }
-         C << nl << "try";
-         C << sb;
-+        C << nl << "::IceInternal::Direct __direct(__current);";
-         C << nl << thisPointer << " __servant = dynamic_cast< " << thisPointer << ">(__direct.servant().get());";
-         C << nl << "if(!__servant)";
-         C << sb;
--        C << nl << "::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);";
--        C << nl << "__opEx.id = __current.id;";
--        C << nl << "__opEx.facet = __current.facet;";
--        C << nl << "__opEx.operation = __current.operation;";
--        C << nl << "throw __opEx;";
-+        C << nl << "__direct.destroy();";
-+        C << nl << "throw ::Ice::OperationNotExistException(__FILE__, __LINE__, __current.id, __current.facet, __current.operation);";
-         C << eb;
-         C << nl << "try";
-         C << sb;
-@@ -2611,28 +2615,51 @@
-         {
-             C << "__ret = ";
-         }
--        C << "__servant->" << name << spar << args << epar << ';';
-+        C << "__servant->" << name << spar << args << epar << ";";
-         C << eb;
--        C << nl << "catch(const ::Ice::LocalException& __ex)";
-+        C << nl << "catch(const ::Ice::UserException&)";
-         C << sb;
--        C << nl << "throw ::IceInternal::LocalExceptionWrapper(__ex, false);";
-+        C << nl << "__direct.destroy();";
-+        C << nl << "throw;";
-         C << eb;
-+        C << nl << "catch(const ::std::exception& __ex)";
-+        C << sb;
-+        C << nl << "__direct.destroy();";
-+        C << nl << "::IceInternal::LocalExceptionWrapper::throwUnknownWrapper(__ex);";
-         C << eb;
-         C << nl << "catch(...)";
-         C << sb;
-         C << nl << "__direct.destroy();";
--        C << nl << "throw;";
-+        C << nl << "throw ::Ice::UnknownException(__FILE__, __LINE__, \"unknown c++ exception\");";
-         C << eb;
-         C << nl << "__direct.destroy();";
--        if(ret)
-+        C << eb;
-+        for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
-         {
--            C << nl << "return __ret;";
-+            C << nl << "catch(const " << fixKwd((*i)->scoped()) << "&)";
-+            C << sb;
-+            C << nl << "throw;";
-+            C << eb;
-         }
--        else
-+        C << nl << "catch(const ::IceInternal::LocalExceptionWrapper&)";
-+        C << sb;
-+        C << nl << "throw;";
-+        C << eb;
-+        C << nl << "catch(const ::std::exception& __ex)";
-+        C << sb;
-+        C << nl << "::IceInternal::LocalExceptionWrapper::throwUnknownWrapper(__ex);";
-+        C << eb;
-+        C << nl << "catch(...)";
-+        C << sb;
-+        C << nl << "throw ::IceInternal::LocalExceptionWrapper("
-+          << "::Ice::UnknownException(__FILE__, __LINE__, \"unknown c++ exception\"), false);";
-+        C << eb;
-+        C << nl << "return";
-+        if(ret)
-         {
--            C << nl << "return;";
-+            C << " __ret";
-         }
--        C << eb;
-+        C << ";";
-         C << eb;
-     }
- }
-@@ -5286,6 +5313,18 @@
-     {
-         ami = true;
-     }
-+
-+    if(p->hasMetaData("UserException"))
-+    {
-+        if(!cl->isLocal())
-+        {
-+            cout << p->definitionContext()->filename() << ":" << p->line()
-+                 << ": warning: metadata directive `UserException' applies only to local operations "
-+                 << "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name()
-+                 << "' is not local" << endl;
-+        }
-+    }
-+
-     StringList metaData = p->getMetaData();
-     metaData.remove("cpp:const");
- 
-diff -ru ../Ice-3.2.1.orig/src/slice2cs/Gen.cpp ./src/slice2cs/Gen.cpp
---- ../Ice-3.2.1.orig/src/slice2cs/Gen.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/slice2cs/Gen.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -386,6 +386,18 @@
-                 if(!isClass)
-                 {
-                     _out << nl << typeS << ' ' << param << ';';
-+                    StructPtr st = StructPtr::dynamicCast(q->first);
-+                    if(st)
-+                    {
-+                        if(isValueType(q->first))
-+                        {
-+                            _out << nl << param << " = new " << typeS << "();";
-+                        }
-+                        else
-+                        {
-+                            _out << nl << param << " = null;";
-+                        }
-+                    }
-                 }
-                 writeMarshalUnmarshalCode(_out, q->first, param, false, false, true);
-             }
-@@ -501,12 +513,26 @@
-             //
-             for(q = inParams.begin(); q != inParams.end(); ++q)
-             {
-+                string param = fixId(q->second);
-+                string typeS = typeToString(q->first);
-                 BuiltinPtr builtin = BuiltinPtr::dynamicCast(q->first);
-                 bool isClass = (builtin && builtin->kind() == Builtin::KindObject)
-                                || ClassDeclPtr::dynamicCast(q->first);
-                 if(!isClass)
-                 {
--                    _out << nl << typeToString(q->first) << ' ' << fixId(q->second) << ';';
-+                    _out << nl << typeS << ' ' << param << ';';
-+                    StructPtr st = StructPtr::dynamicCast(q->first);
-+                    if(st)
-+                    {
-+                        if(isValueType(q->first))
-+                        {
-+                            _out << nl << param << " = new " << typeS << "();";
-+                        }
-+                        else
-+                        {
-+                            _out << nl << param << " = null;";
-+                        }
-+                    }
-                 }
-                 writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), false, false, true);
-             }
-@@ -728,8 +754,7 @@
-     _out << nl << "os__.startWriteSlice();";
-     for(d = members.begin(); d != members.end(); ++d)
-     {
--        writeMarshalUnmarshalCode(_out, (*d)->type(),
--                                  fixId((*d)->name(), DotNet::ICloneable, true),
-+        writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
-                                   true, false, false);
-     }
-     _out << nl << "os__.endWriteSlice();";
-@@ -831,8 +856,7 @@
-                 patchParams << ", " << classMemberCount++;
-             }
-         }
--        writeMarshalUnmarshalCode(_out, (*d)->type(),
--                                  fixId((*d)->name(), DotNet::ICloneable, true),
-+        writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
-                                   false, false, false, patchParams.str());
-     }
-     _out << nl << "is__.endReadSlice();";
-@@ -850,8 +874,7 @@
-         _out << nl << "outS__.startSlice();";
-         for(d = members.begin(); d != members.end(); ++d)
-         {
--            writeMarshalUnmarshalCode(_out, (*d)->type(),
--                                      fixId((*d)->name(), DotNet::ICloneable, true),
-+            writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
-                                       true, true, false);
-         }
-         _out << nl << "outS__.endSlice();";
-@@ -877,8 +900,7 @@
-                     patchParams << ", " << classMemberCount++;
-                 }
-             }
--            writeMarshalUnmarshalCode(_out, (*d)->type(),
--                                      fixId((*d)->name(), DotNet::ICloneable, true),
-+            writeMarshalUnmarshalCode(_out, (*d)->type(), fixId(*d, DotNet::ICloneable, true),
-                                       false, true, false, patchParams.str());
-         }
-         _out << nl << "inS__.endSlice();";
-@@ -2054,7 +2076,8 @@
-             _out << sb;
-             for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-             {
--                _out << nl << "this." << fixId((*q)->name()) << " = " << fixId((*q)->name()) << ';';
-+                string name = fixId((*q)->name(), DotNet::ApplicationException, false);
-+                _out << nl << "this." << name << " = " << fixId((*q)->name()) << ';';
-             }
-             _out << eb;
-         }
-@@ -2186,8 +2209,7 @@
-         _out << nl << "os__.startWriteSlice();";
-         for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-         {
--            writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                      fixId((*q)->name(), DotNet::ApplicationException),
-+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, DotNet::ApplicationException),
-                                       true, false, false);
-         }
-         _out << nl << "os__.endWriteSlice();";
-@@ -2294,8 +2316,7 @@
-                     patchParams << ", " << classMemberCount++;
-                 }
-             }
--            writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                      fixId((*q)->name(), DotNet::ApplicationException),
-+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException),
-                                       false, false, false, patchParams.str());
-         }
-         _out << nl << "is__.endReadSlice();";
-@@ -2313,8 +2334,7 @@
-             _out << nl << "outS__.startSlice();";
-             for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-             {
--                writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                          fixId((*q)->name(), DotNet::ApplicationException),
-+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException),
-                                           true, true, false);
-             }
-             _out << nl << "outS__.endSlice();";
-@@ -2344,8 +2364,7 @@
-                         patchParams << ", " << classMemberCount++;
-                     }
-                 }
--                writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                          fixId((*q)->name(), DotNet::ApplicationException),
-+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId((*q)->name(), DotNet::ApplicationException),
-                                           false, true, false, patchParams.str());
-             }
-             _out << nl << "inS__.endSlice();";
-@@ -2443,6 +2462,8 @@
-     DataMemberList dataMembers = p->dataMembers();
-     DataMemberList::const_iterator q;
- 
-+    bool propertyMapping = p->hasMetaData("clr:property");
-+
-     _out << sp << nl << "#endregion"; // Slice data members
- 
-     bool isClass = !isValueType(p);
-@@ -2453,6 +2474,25 @@
-         _out << "s";
-         _out << sp << nl << "public " << name << "()";
-         _out << sb;
-+        /*
-+        if(!p->isLocal())
-+        {
-+            for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-+            {
-+                if(!isValueType((*q)->type()))
-+                {
-+                    string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
-+                    string memberType = typeToString((*q)->type());
-+                    _out << nl << "this." << memberName;
-+                    if(propertyMapping)
-+                    {
-+                        _out << "_prop";
-+                    }
-+                    _out << " = new " << memberType << "();";
-+                }
-+            }
-+        }
-+        */
-         _out << eb;
-     }
- 
-@@ -2461,7 +2501,7 @@
-     vector<string> paramNames;
-     for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-     {
--        string memberName = fixId((*q)->name());
-+        string memberName = fixId((*q)->name(), isClass ? DotNet::ICloneable : 0);
-         string memberType = typeToString((*q)->type());
-         paramDecl.push_back(memberType + " " + memberName);
-         paramNames.push_back(memberName);
-@@ -2470,7 +2510,12 @@
-     _out << sb;
-     for(vector<string>::const_iterator i = paramNames.begin(); i != paramNames.end(); ++i)
-     {
--        _out << nl << "this." << *i << " = " << *i << ';';
-+        _out << nl << "this." << *i;
-+        if(propertyMapping)
-+        {
-+            _out << "_prop";
-+        }
-+        _out << " = " << *i << ';';
-     }
-     _out << eb;
- 
-@@ -2594,8 +2639,7 @@
-         _out << sb;
-         for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-         {
--            writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                      fixId((*q)->name(), isClass ? DotNet::ICloneable : 0),
-+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0),
-                                       true, false, false);
-         }
-         _out << eb;
-@@ -2687,8 +2731,7 @@
-                     patchParams << ", " << classMemberCount++;
-                 }
-             }
--            writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                      fixId((*q)->name(), isClass ? DotNet::ICloneable : 0 ),
-+            writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0 ),
-                                       false, false, false, patchParams.str());
-         }
-         _out << eb;
-@@ -2699,8 +2742,7 @@
-             _out << sb;
-             for(q = dataMembers.begin(); q != dataMembers.end(); ++q)
-             {
--                writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                          fixId((*q)->name(), isClass ? DotNet::ICloneable : 0),
-+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0),
-                                           true, true, false);
-             }
-             _out << eb;
-@@ -2720,8 +2762,7 @@
-                         patchParams << ", " << classMemberCount++;
-                     }
-                 }
--                writeMarshalUnmarshalCode(_out, (*q)->type(),
--                                          fixId((*q)->name(), isClass ? DotNet::ICloneable : 0 ),
-+                writeMarshalUnmarshalCode(_out, (*q)->type(), fixId(*q, isClass ? DotNet::ICloneable : 0 ),
-                                           false, true, false, patchParams.str());
-             }
-             _out << eb;
-@@ -3920,10 +3961,35 @@
-     _out << nl << "for(int i__ = 0; i__ < sz__; ++i__)";
-     _out << sb;
-     _out << nl << keyS << " k__;";
-+    StructPtr st = StructPtr::dynamicCast(key);
-+    if(st)
-+    {
-+        if(isValueType(key))
-+        {
-+            _out << nl << "v__ = new " << typeToString(key) << "();";
-+        }
-+        else
-+        {
-+            _out << nl << "k__ = null;";
-+        }
-+    }
-     writeMarshalUnmarshalCode(_out, key, "k__", false, false, false);
-     if(!hasClassValue)
-     {
-         _out << nl << valueS << " v__;";
-+
-+        StructPtr st = StructPtr::dynamicCast(value);
-+        if(st)
-+        {
-+            if(isValueType(value))
-+            {
-+                _out << nl << "v__ = new " << typeToString(value) << "();";
-+            }
-+            else
-+            {
-+                _out << nl << "v__ = null;";
-+            }
-+        }
-     }
-     writeMarshalUnmarshalCode(_out, value, "v__", false, false, false, "r__, k__");
-     if(!hasClassValue)
-@@ -3960,10 +4026,34 @@
-         _out << nl << "for(int i__ = 0; i__ < sz__; ++i__)";
-         _out << sb;
-         _out << nl << keyS << " k__;";
-+        StructPtr st = StructPtr::dynamicCast(key);
-+        if(st)
-+        {
-+            if(isValueType(key))
-+            {
-+                _out << nl << "v__ = new " << typeToString(key) << "();";
-+            }
-+            else
-+            {
-+                _out << nl << "k__ = null;";
-+            }
-+        }
-         writeMarshalUnmarshalCode(_out, key, "k__", false, true, false);
-         if(!hasClassValue)
-         {
-             _out << nl << valueS << " v__;";
-+            StructPtr st = StructPtr::dynamicCast(value);
-+            if(st)
-+            {
-+                if(isValueType(value))
-+                {
-+                    _out << nl << "v__ = new " << typeToString(value) << "();";
-+                }
-+                else
-+                {
-+                    _out << nl << "v__ = null;";
-+                }
-+            }
-         }
-         writeMarshalUnmarshalCode(_out, value, "v__", false, true, false, "r__, k__");
-         if(!hasClassValue)
-@@ -4196,7 +4286,20 @@
-         _out << eb;
-         for(q = outParams.begin(); q != outParams.end(); ++q)
-         {
--            writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), false, false, true, "");
-+            string param = fixId(q->second);
-+            StructPtr st = StructPtr::dynamicCast(q->first);
-+            if(st)
-+            {
-+                if(isValueType(q->first))
-+                {
-+                    _out << nl << param << " = new " << typeToString(q->first) << "();";
-+                }
-+                else
-+                {
-+                    _out << nl << param << " = null;";
-+                }
-+            }
-+            writeMarshalUnmarshalCode(_out, q->first, param, false, false, true, "");
-         }
-         if(ret)
-         {
-@@ -4212,6 +4315,18 @@
-             else
-             {
-                 _out << nl << retS << " ret__;";
-+                StructPtr st = StructPtr::dynamicCast(ret);
-+                if(st)
-+                {
-+                    if(isValueType(st))
-+                    {
-+                        _out << nl << "ret__ = new " << retS << "();";
-+                    }
-+                    else
-+                    {
-+                        _out << nl << "ret__ = null;";
-+                    }
-+                }
-                 writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true, "");
-             }
-         }
-@@ -4622,7 +4737,9 @@
-         _out << sb;
-         for(q = outParams.begin(); q != outParams.end(); ++q)
-         {
--            _out << nl << typeToString(q->first) << ' ' << fixId(q->second) << ';';
-+            string param = fixId(q->second);
-+            string typeS = typeToString(q->first);
-+            _out << nl << typeS << ' ' << param << ';';
-         }
-         if(ret)
-         {
-@@ -4650,10 +4767,33 @@
-         _out << eb;
-         for(q = outParams.begin(); q != outParams.end(); ++q)
-         {
-+            string param = fixId(q->second);
-+            StructPtr st = StructPtr::dynamicCast(q->first);
-+            if(st)
-+            if(isValueType(st))
-+            {
-+                _out << nl << param << " = new " << typeToString(q->first) << "();";
-+            }
-+            else
-+            {
-+                _out << nl << param << " = null;";
-+            }
-             writeMarshalUnmarshalCode(_out, q->first, fixId(q->second), false, false, true);
-         }
-         if(ret)
-         {
-+            StructPtr st = StructPtr::dynamicCast(ret);
-+            if(st)
-+            {
-+                if(isValueType(ret))
-+                {
-+                    _out << nl << "ret__ = new " << retS << "();";
-+                }
-+                else
-+                {
-+                    _out << nl << "ret__ = null;";
-+                }
-+            }
-             writeMarshalUnmarshalCode(_out, ret, "ret__", false, false, true);
-         }
-         if(p->returnsClasses())
-diff -ru ../Ice-3.2.1.orig/src/slice2java/Gen.cpp ./src/slice2java/Gen.cpp
---- ../Ice-3.2.1.orig/src/slice2java/Gen.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./src/slice2java/Gen.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -368,7 +368,10 @@
- 
-     ConstructedPtr constructed = ConstructedPtr::dynamicCast(type);
-     assert(constructed);
-+    out << nl << "if(" << name << " != null)";
-+    out << sb;
-     out << nl << "__h = 5 * __h + " << name << ".hashCode();";
-+    out << eb;
- }
- 
- void
-@@ -533,7 +536,16 @@
-         {
-             out << sp << nl << "public final " << typeToString(ret, TypeModeReturn, package, op->getMetaData())
-                 << nl << opName << spar << params << epar;
--            writeThrowsClause(package, throws);
-+            if(op->hasMetaData("UserException"))
-+            {
-+                out.inc();
-+                out << nl << "throws Ice.UserException";
-+                out.dec();
-+            }
-+            else
-+            {
-+                writeThrowsClause(package, throws);
-+            }
-             out << sb << nl;
-             if(ret)
-             {
-@@ -1418,7 +1430,16 @@
-             out << "Ice.Current __current";
-         }
-         out << epar;
--        writeThrowsClause(package, throws);
-+        if(op->hasMetaData("UserException"))
-+        {
-+            out.inc();
-+            out << nl << "throws Ice.UserException";
-+            out.dec();
-+        }
-+        else
-+        {
-+            writeThrowsClause(package, throws);
-+        }
-         out << ';';
-     }
- 
-@@ -1583,10 +1604,19 @@
-         }
-         out << epar;
- 
--        ExceptionList throws = (*r)->throws();
--        throws.sort();
--        throws.unique();
--        writeThrowsClause(package, throws);
-+        if((*r)->hasMetaData("UserException"))
-+        {
-+            out.inc();
-+            out << nl << "throws Ice.UserException";
-+            out.dec();
-+        }
-+        else
-+        {
-+            ExceptionList throws = (*r)->throws();
-+            throws.sort();
-+            throws.unique();
-+            writeThrowsClause(package, throws);
-+        }
-         out << sb;
-         out << nl;
-         if(ret && !hasAMD)
-@@ -4284,6 +4314,11 @@
-         ExceptionList throws = op->throws();
-         throws.sort();
-         throws.unique();
-+#if defined(__SUNPRO_CC)
-+        throws.sort(derivedToBaseCompare);
-+#else
-+        throws.sort(Slice::DerivedToBaseCompare());
-+#endif
- 
-         vector<string> params = getParams(op, package);
-         vector<string> args = getArgs(op);
-@@ -4303,15 +4338,26 @@
-             out << nl << "__initCurrent(__current, \"" << op->name() << "\", " 
-                 << sliceModeToIceMode(op->sendMode())
-                 << ", __ctx);";
-+            if(ret)
-+            {
-+                string resultTypeHolder = typeToString(ret, TypeModeOut, package, op->getMetaData());
-+                out << nl << "final " << resultTypeHolder << " __ret = new " << resultTypeHolder << "();";
-+            }
-             out << nl << "while(true)";
-             out << sb;
--            out << nl << "IceInternal.Direct __direct = new IceInternal.Direct(__current);";
-             out << nl << "try";
-             out << sb;
--            out << nl << fixKwd(name) << " __servant = null;";
-+            out << nl << "IceInternal.Direct __direct = new IceInternal.Direct(__current);";
-             out << nl << "try";
-             out << sb;
-+            out << nl << fixKwd(name) << " __servant = null;";
-             out << nl << "__servant = (" << fixKwd(name) << ")__direct.servant();";
-+            out << nl;
-+            if(ret)
-+            {
-+                out << "__ret.value = ";
-+            }
-+            out << "__servant." << opName << spar << args << "__current" << epar << ';';
-             out << eb;
-             out << nl << "catch(ClassCastException __ex)";
-             out << sb;
-@@ -4321,28 +4367,57 @@
-             out << nl << "__opEx.operation = __current.operation;";
-             out << nl << "throw __opEx;";
-             out << eb;
-+            for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
-+            {
-+                out << nl << "catch(" << getAbsolute(*i, package) << " __ex)";
-+                out << sb;
-+                out << nl << "throw __ex;";
-+                out << eb;
-+            }
-+            out << nl << "catch(Throwable __ex)";
-+            out << sb;
-+            out << nl << "throw __ex;";
-+            out << eb;
-+            out << nl << "finally";
-+            out << sb;
-             out << nl << "try";
-             out << sb;
--            out << nl;
--            if(ret)
-+            out << nl << "__direct.destroy();";
-+            out << eb;
-+            for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
-             {
--                out << "return ";
-+                out << nl << "catch(" << getAbsolute(*i, package) << " __ex)";
-+                out << sb;
-+                out << nl << "throw __ex;";
-+                out << eb;
-             }
--            out << "__servant." << opName << spar << args << "__current" << epar << ';';
--            if(!ret)
-+            out << nl << "catch(Throwable __ex)";
-+            out << sb;
-+            out << nl << "throw __ex;";
-+            out << eb;
-+            out << eb;
-+            out << eb;
-+            for(ExceptionList::const_iterator i = throws.begin(); i != throws.end(); ++i)
-             {
--                out << nl << "return;";
-+                out << nl << "catch(" << getAbsolute(*i, package) << " __ex)";
-+                out << sb;
-+                out << nl << "throw __ex;";
-+                out << eb;
-             }
--            out << eb;
--            out << nl << "catch(Ice.LocalException __ex)";
-+            out << nl << "catch(IceInternal.LocalExceptionWrapper __ex)";
-             out << sb;
--            out << nl << "throw new IceInternal.LocalExceptionWrapper(__ex, false);";
--            out << eb;
-+            out << nl << "throw __ex;";
-             out << eb;
--            out << nl << "finally";
-+            out << nl << "catch(Throwable __ex)";
-             out << sb;
--            out << nl << "__direct.destroy();";
-+            out << nl << "IceInternal.LocalExceptionWrapper.throwUnknownWrapper(__ex);";
-             out << eb;
-+            out << nl << "return";
-+            if(ret)
-+            {
-+                out << " __ret.value";
-+            }
-+            out << ";";
-             out << eb;
-         }
-         out << eb;
-@@ -4620,11 +4695,19 @@
-         }
-         out << epar;
- 
--        ExceptionList throws = op->throws();
--        throws.sort();
--        throws.unique();
--
--        writeThrowsClause(package, throws);
-+        if(op->hasMetaData("UserException"))
-+        {
-+            out.inc();
-+            out << nl << "throws Ice.UserException";
-+            out.dec();
-+        }
-+        else
-+        {
-+            ExceptionList throws = op->throws();
-+            throws.sort();
-+            throws.unique();
-+            writeThrowsClause(package, throws);
-+        }
- 
-         out << sb;
- 
-diff -ru ../Ice-3.2.1.orig/test/Ice/exceptions/AllTests.cpp ./test/Ice/exceptions/AllTests.cpp
---- ../Ice-3.2.1.orig/test/Ice/exceptions/AllTests.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/exceptions/AllTests.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -914,22 +914,8 @@
-             thrower->throwUndeclaredA(1);
-             test(false);
-         }
--        catch(const A& ex)
--        {
--            //
--            // We get the original exception with collocation
--            // optimization.
--            //
--            test(collocated);
--            test(ex.aMem == 1);
--        }
-         catch(const Ice::UnknownUserException&)
-         {
--            //
--            // We get an unknown user exception without collocation
--            // optimization.
--            //
--            test(!collocated);
-         }
-         catch(...)
-         {
-@@ -941,23 +927,8 @@
-             thrower->throwUndeclaredB(1, 2);
-             test(false);
-         }
--        catch(const B& ex)
--        {
--            //
--            // We get the original exception with collocation
--            // optimization.
--            //
--            test(collocated);
--            test(ex.aMem == 1);
--            test(ex.bMem == 2);
--        }
-         catch(const Ice::UnknownUserException&)
-         {
--            //
--            // We get an unknown user exception without collocation
--            // optimization.
--            //
--            test(!collocated);
-         }
-         catch(...)
-         {
-@@ -969,24 +940,8 @@
-             thrower->throwUndeclaredC(1, 2, 3);
-             test(false);
-         }
--        catch(const C& ex)
--        {
--            //
--            // We get the original exception with collocation
--            // optimization.
--            //
--            test(collocated);
--            test(ex.aMem == 1);
--            test(ex.bMem == 2);
--            test(ex.cMem == 3);
--        }
-         catch(const Ice::UnknownUserException&)
-         {
--            //
--            // We get an unknown user exception without
--            // collocation optimization.
--            //
--            test(!collocated);
-         }
-         catch(...)
-         {
-@@ -1065,22 +1020,14 @@
-         thrower->throwLocalException();
-         test(false);
-     }
--    catch(const Ice::TimeoutException&)
--    {
--        //
--        // We get the original exception with collocation
--        // optimization.
--        //
--        test(collocated);
--    }
-     catch(const Ice::UnknownLocalException&)
-     {
--        //
--        // We get an unknown local exception without collocation
--        // optimization.
--        //
-         test(!collocated);
-     }
-+    catch(const Ice::TimeoutException&)
-+    {
-+        test(collocated);
-+    }
-     catch(...)
-     {
-         test(false);
-@@ -1097,19 +1044,10 @@
-     }
-     catch(const Ice::UnknownException&)
-     {
--        //
--        // We get an unknown exception without collocation
--        // optimization.
--        //
--        assert(!collocated);
-     }
-     catch(...)
-     {
--        //
--        // We get the original exception with collocation
--        // optimization.
--        //
--        assert(collocated);
-+        test(false);
-     }
-     
-     cout << "ok" << endl;
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/AllTests.cpp ./test/Ice/servantLocator/AllTests.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/AllTests.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/AllTests.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -33,6 +33,10 @@
-             test(ex.operation == "requestFailedException");
-         }
-     }
-+    catch(...)
-+    {
-+        test(false);
-+    }
- 
-     try
-     {
-@@ -43,6 +47,10 @@
-     {
-         test(ex.unknown == "reason");
-     }
-+    catch(...)
-+    {
-+        test(false);
-+    }
- 
-     try
-     {
-@@ -71,13 +79,11 @@
-     }
-     catch(const UnknownUserException& ex)
-     {
--        //cerr << ex.unknown << endl;
--        test(!collocated);
-         test(ex.unknown == "Test::TestIntfUserException");
-     }
--    catch(const TestIntfUserException&)
-+    catch(...)
-     {
--        test(collocated);
-+        test(false);
-     }
- 
-     try
-@@ -87,7 +93,6 @@
-     }
-     catch(const UnknownLocalException& ex)
-     {
--        //cerr << ex.unknown << endl;
-         test(!collocated);
-         test(ex.unknown.find("Ice::SocketException:\nsocket exception: unknown error") != string::npos);
-     }
-@@ -95,6 +100,10 @@
-     {
-         test(collocated);
-     }
-+    catch(...)
-+    {
-+        test(false);
-+    }
- 
-     try
-     {
-@@ -103,13 +112,11 @@
-     }
-     catch(const UnknownException& ex)
-     {
--        //cerr << ex.unknown << endl;
--        test(!collocated);
-         test(ex.unknown == "std::exception: Hello");
-     }
--    catch(const std::runtime_error&)
-+    catch(...)
-     {
--        test(collocated);
-+        test(false);
-     }
- 
-     try
-@@ -119,13 +126,11 @@
-     }
-     catch(const UnknownException& ex)
-     {
--        //cerr << ex.unknown << endl;
--        test(!collocated);
-         test(ex.unknown == "unknown c++ exception");
-     }
--    catch(const int&)
-+    catch(...)
-     {
--        test(collocated);
-+        test(false);
-     }
-     
-     try
-@@ -137,6 +142,66 @@
-     {
-         test(ex.unknown == "reason");
-     }
-+    catch(...)
-+    {
-+        test(false);
-+    }
-+
-+    try
-+    {
-+        obj->impossibleException(false);
-+        test(false);
-+    }
-+    catch(const UnknownUserException&)
-+    {
-+        // Operation doesn't throw, but locate() and finshed() throw TestIntfUserException.
-+    }
-+    catch(...)
-+    {
-+        test(false);
-+    }
-+
-+    try
-+    {
-+        obj->impossibleException(true);
-+        test(false);
-+    }
-+    catch(const UnknownUserException&)
-+    {
-+        // Operation doesn't throw, but locate() and finshed() throw TestIntfUserException.
-+    }
-+    catch(...)
-+    {
-+        test(false);
-+    }
-+
-+    try
-+    {
-+        obj->intfUserException(false);
-+        test(false);
-+    }
-+    catch(const TestImpossibleException&)
-+    {
-+        // Operation doesn't throw, but locate() and finished() throw TestImpossibleException.
-+    }
-+    catch(...)
-+    {
-+        test(false);
-+    }
-+
-+    try
-+    {
-+        obj->intfUserException(true);
-+        test(false);
-+    }
-+    catch(const TestImpossibleException&)
-+    {
-+        // Operation throws TestIntfUserException, but locate() and finished() throw TestImpossibleException.
-+    }
-+    catch(...)
-+    {
-+        test(false);
-+    }
- }
- 
- TestIntfPrx
-@@ -151,6 +216,39 @@
-     TestIntfPrx obj = TestIntfPrx::checkedCast(base);
-     test(obj);
-     test(obj == base);
-+
-+    cout << "ok" << endl;
-+
-+    cout << "testing ice_ids... " << flush;
-+    try
-+    {
-+        ObjectPrx obj = communicator->stringToProxy("category/locate:default -p 12010 -t 10000");
-+        obj->ice_ids();
-+        test(false);
-+    }
-+    catch(const UnknownUserException& ex)
-+    {
-+        test(ex.unknown == "Test::TestIntfUserException");
-+    }
-+    catch(...)
-+    {
-+        test(false);
-+    }
-+
-+    try
-+    {
-+        ObjectPrx obj = communicator->stringToProxy("category/finished:default -p 12010 -t 10000");
-+        obj->ice_ids();
-+        test(false);
-+    }
-+    catch(const UnknownUserException& ex)
-+    {
-+        test(ex.unknown == "Test::TestIntfUserException");
-+    }
-+    catch(...)
-+    {
-+        test(false);
-+    }
-     cout << "ok" << endl;
- 
-     cout << "testing servant locator..." << flush;
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/Client.cpp ./test/Ice/servantLocator/Client.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/Client.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/Client.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/Collocated.cpp ./test/Ice/servantLocator/Collocated.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/Collocated.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/Collocated.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/Makefile ./test/Ice/servantLocator/Makefile
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/Makefile	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/Makefile	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- # **********************************************************************
- #
--# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- #
- # This copy of Ice is licensed to you under the terms described in the
- # ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/ServantLocatorI.cpp ./test/Ice/servantLocator/ServantLocatorI.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/ServantLocatorI.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/ServantLocatorI.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -8,6 +8,7 @@
- // **********************************************************************
- 
- #include <ServantLocatorI.h>
-+#include <Test.h>
- #include <TestCommon.h>
- 
- #include <stdexcept>
-@@ -74,7 +75,11 @@
- void
- ServantLocatorI::exception(const Ice::Current& current)
- {
--    if(current.operation == "requestFailedException")
-+    if(current.operation == "ice_ids")
-+    {
-+        throw TestIntfUserException();
-+    }
-+    else if(current.operation == "requestFailedException")
-     {
-         throw Ice::ObjectNotExistException(__FILE__, __LINE__);
-     }
-@@ -110,4 +115,12 @@
-     {
-         throw UnknownException(__FILE__, __LINE__, "reason");
-     }
-+    else if(current.operation == "impossibleException")
-+    {
-+        throw TestIntfUserException(); // Yes, it really is meant to be TestIntfUserException.
-+    }
-+    else if(current.operation == "intfUserException")
-+    {
-+        throw TestImpossibleException(); // Yes, it really is meant to be TestImpossibleException.
-+    }
- }
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/ServantLocatorI.h ./test/Ice/servantLocator/ServantLocatorI.h
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/ServantLocatorI.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/ServantLocatorI.h	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/Server.cpp ./test/Ice/servantLocator/Server.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/Server.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/Server.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/ServerAMD.cpp ./test/Ice/servantLocator/ServerAMD.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/ServerAMD.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/ServerAMD.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/Test.ice ./test/Ice/servantLocator/Test.ice
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/Test.ice	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/Test.ice	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -17,6 +17,10 @@
- {
- };
- 
-+exception TestImpossibleException
-+{
-+};
-+
- interface TestIntf
- {
-     void requestFailedException();
-@@ -29,6 +33,9 @@
-     void cppException();
- 
-     void unknownExceptionWithServantException();
-+
-+    string impossibleException(bool throw) throws TestImpossibleException;
-+    string intfUserException(bool throw) throws TestIntfUserException, TestImpossibleException;
-     
-     void shutdown();
- };
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/TestAMD.ice ./test/Ice/servantLocator/TestAMD.ice
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/TestAMD.ice	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestAMD.ice	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -17,6 +17,10 @@
- {
- };
- 
-+exception TestImpossibleException
-+{
-+};
-+
- ["amd"] interface TestIntf
- {
-     void requestFailedException();
-@@ -27,9 +31,12 @@
-     void userException();
-     void stdException();
-     void cppException();
--    
-+
-     void unknownExceptionWithServantException();
- 
-+    string impossibleException(bool throw) throws TestImpossibleException;
-+    string intfUserException(bool throw) throws TestIntfUserException, TestImpossibleException;
-+
-     void shutdown();
- };
- 
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/TestAMDI.cpp ./test/Ice/servantLocator/TestAMDI.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/TestAMDI.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestAMDI.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -69,6 +69,41 @@
- }
- 
- void
-+TestAMDI::impossibleException_async(const Test::AMD_TestIntf_impossibleExceptionPtr& cb, bool _cpp_throw,
-+                                    const Current&)
-+{
-+    if(_cpp_throw)
-+    {
-+        cb->ice_exception(Test::TestImpossibleException());
-+    }
-+    else
-+    {
-+        //
-+        // Return a value so we can be sure that the stream position
-+        // is reset correctly if finished() throws.
-+        //
-+        cb->ice_response("Hello");
-+    }
-+}
-+
-+void
-+TestAMDI::intfUserException_async(const Test::AMD_TestIntf_intfUserExceptionPtr& cb, bool _cpp_throw, const Current&)
-+{
-+    if(_cpp_throw)
-+    {
-+        cb->ice_exception(Test::TestIntfUserException());
-+    }
-+    else
-+    {
-+        //
-+        // Return a value so we can be sure that the stream position
-+        // is reset correctly if finished() throws.
-+        //
-+        cb->ice_response("Hello");
-+    }
-+}
-+
-+void
- TestAMDI::shutdown_async(const Test::AMD_TestIntf_shutdownPtr& cb, const Current& current)
- {
-     current.adapter->deactivate();
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/TestAMDI.h ./test/Ice/servantLocator/TestAMDI.h
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/TestAMDI.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestAMDI.h	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -25,7 +25,11 @@
-     virtual void stdException_async(const Test::AMD_TestIntf_stdExceptionPtr&, const Ice::Current&);
-     virtual void cppException_async(const Test::AMD_TestIntf_cppExceptionPtr&, const Ice::Current&);
- 
--    virtual void unknownExceptionWithServantException_async(const Test::AMD_TestIntf_unknownExceptionWithServantExceptionPtr&, const Ice::Current&);
-+    virtual void unknownExceptionWithServantException_async(
-+                            const Test::AMD_TestIntf_unknownExceptionWithServantExceptionPtr&, const Ice::Current&);
-+
-+    virtual void impossibleException_async(const Test::AMD_TestIntf_impossibleExceptionPtr&, bool, const Ice::Current&);
-+    virtual void intfUserException_async(const Test::AMD_TestIntf_intfUserExceptionPtr&, bool, const Ice::Current&);
- 
-     virtual void shutdown_async(const Test::AMD_TestIntf_shutdownPtr&, const Ice::Current&);
- };
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/TestI.cpp ./test/Ice/servantLocator/TestI.cpp
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/TestI.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestI.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -60,6 +60,34 @@
-     throw Ice::ObjectNotExistException(__FILE__, __LINE__);
- }
- 
-+string
-+TestI::impossibleException(bool _cpp_throw, const Current&)
-+{
-+    if(_cpp_throw)
-+    {
-+        throw Test::TestImpossibleException();
-+    }
-+    //
-+    // Return a value so we can be sure that the stream position
-+    // is reset correctly if finished() throws.
-+    //
-+    return "Hello";
-+}
-+
-+string
-+TestI::intfUserException(bool _cpp_throw, const Current&)
-+{
-+    if(_cpp_throw)
-+    {
-+        throw Test::TestIntfUserException();
-+    }
-+    //
-+    // Return a value so we can be sure that the stream position
-+    // is reset correctly if finished() throws.
-+    //
-+    return "Hello";
-+}
-+
- void
- TestI::shutdown(const Current& current)
- {
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/TestI.h ./test/Ice/servantLocator/TestI.h
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/TestI.h	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/TestI.h	2007-12-20 12:16:29.000000000 -0800
-@@ -1,6 +1,6 @@
- // **********************************************************************
- //
--// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- //
- // This copy of Ice is licensed to you under the terms described in the
- // ICE_LICENSE file included in this distribution.
-@@ -27,6 +27,9 @@
- 
-     virtual void unknownExceptionWithServantException(const Ice::Current&);
- 
-+    virtual ::std::string impossibleException(bool, const Ice::Current&);
-+    virtual ::std::string intfUserException(bool, const Ice::Current&);
-+
-     virtual void shutdown(const Ice::Current&);
- };
- 
-diff -ru ../Ice-3.2.1.orig/test/Ice/servantLocator/run.py ./test/Ice/servantLocator/run.py
---- ../Ice-3.2.1.orig/test/Ice/servantLocator/run.py	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/servantLocator/run.py	2007-12-20 12:16:29.000000000 -0800
-@@ -1,7 +1,7 @@
- #!/usr/bin/env python
- # **********************************************************************
- #
--# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
-+# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
- #
- # This copy of Ice is licensed to you under the terms described in the
- # ICE_LICENSE file included in this distribution.
-diff -ru ../Ice-3.2.1.orig/test/Ice/threads/TestI.cpp ./test/Ice/threads/TestI.cpp
---- ../Ice-3.2.1.orig/test/Ice/threads/TestI.cpp	2007-08-08 12:00:54.000000000 -0700
-+++ ./test/Ice/threads/TestI.cpp	2007-12-20 12:16:29.000000000 -0800
-@@ -167,6 +167,11 @@
-     {
-         // Expected.
-     }
-+    catch(const Ice::Exception& ex)
-+    {
-+        cerr << ex << endl;
-+        test(false);
-+    }
- 
-     Test::AdapterPrx proxy2 =
-         Test::AdapterPrx::uncheckedCast(proxy->ice_threadPerConnection(!proxy->ice_isThreadPerConnection()));

Deleted: trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.Darwin.diff
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.Darwin.diff	2008-05-29 06:02:49 UTC (rev 37181)
+++ trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.Darwin.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -1,19 +0,0 @@
---- config/Make.rules.Darwin.FCS	2007-01-30 05:42:20.000000000 -0800
-+++ config/Make.rules.Darwin	2007-04-08 12:18:15.000000000 -0700
-@@ -11,7 +11,7 @@
- # This file is included by Make.rules when uname is Darwin.
- #
- 
--CXX	                = c++
-+CXX	               ?= c++
- 
- CXXFLAGS		= -ftemplate-depth-128 -Wall -D_REENTRANT
- 
-@@ -55,6 +55,6 @@
- ICEUTIL_OS_LIBS         = -lpthread
- ICE_OS_LIBS             = -ldl
- 
--PLATFORM_HAS_READLINE   := no
-+PLATFORM_HAS_READLINE   := yes
- 
- export DYLD_LIBRARY_PATH := $(libdir):$(DYLD_LIBRARY_PATH)

Deleted: trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.diff
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.diff	2008-05-29 06:02:49 UTC (rev 37181)
+++ trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -1,15 +0,0 @@
---- config/Make.rules.FCS	2007-03-08 15:16:54.000000000 -0800
-+++ config/Make.rules	2007-04-08 09:32:33.000000000 -0700
-@@ -180,9 +180,9 @@
- BZIP2_RPATH_LINK        = $(if $(BZIP2_HOME),$(call rpathlink,$(BZIP2_HOME)/$(libsubdir)))
- 
- ifneq ($(DB_HOME),)
--   DB_FLAGS             = -I$(DB_HOME)/include
--   DB_LIBS              = -L$(DB_HOME)/$(libsubdir) -ldb_cxx
--   DB_RPATH_LINK        = $(call rpathlink,$(DB_HOME)/$(libsubdir))
-+   DB_FLAGS             = -I$(DB_HOME)/include/db45
-+   DB_LIBS              = -L$(DB_HOME)/$(libsubdir)/db45 -ldb_cxx
-+   DB_RPATH_LINK        = $(call rpathlink,$(DB_HOME)/$(libsubdir)/db45)
- else
-    ifeq ($(shell if [ -d /usr/include/db45 -a -d /usr/$(libsubdir)/db45 ] ; then echo yes; fi), yes)
-       DB_FLAGS          = -I/usr/include/db45

Copied: trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.Darwin.diff (from rev 37178, trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.Darwin.diff)
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.Darwin.diff	                        (rev 0)
+++ trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.Darwin.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -0,0 +1,19 @@
+diff -ru ../Ice-3.3.0.orig/cpp/config/Make.rules.Darwin ./cpp/config/Make.rules.Darwin
+--- ../Ice-3.3.0.orig/cpp/config/Make.rules.Darwin	2008-05-16 10:24:00.000000000 -0700
++++ ./cpp/config/Make.rules.Darwin	2008-05-23 12:39:47.000000000 -0700
+@@ -11,7 +11,7 @@
+ # This file is included by Make.rules when uname is Darwin.
+ #
+ 
+-CXX	                = c++
++CXX	               ?= c++
+ 
+ CXXFLAGS		= -ftemplate-depth-128 -Wall -D_REENTRANT
+ 
+@@ -84,5 +84,5 @@
+ ICE_OS_LIBS             = -ldl $(ICONV_LIB)
+ 
+ 
+-PLATFORM_HAS_READLINE   := no
++PLATFORM_HAS_READLINE   := yes
+ 

Copied: trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.diff (from rev 37178, trunk/dports/devel/ice-cpp/files/patch-config.Make.rules.diff)
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.diff	                        (rev 0)
+++ trunk/dports/devel/ice-cpp/files/patch-ice.cpp.config.Make.rules.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -0,0 +1,16 @@
+diff -ru ../Ice-3.3.0.orig/cpp/config/Make.rules ./cpp/config/Make.rules
+--- ../Ice-3.3.0.orig/cpp/config/Make.rules	2008-05-16 10:24:06.000000000 -0700
++++ ./cpp/config/Make.rules	2008-05-23 12:40:52.000000000 -0700
+@@ -163,9 +163,9 @@
+ BZIP2_RPATH_LINK        = $(if $(BZIP2_HOME),$(call rpathlink,$(BZIP2_HOME)/$(libsubdir)))
+ 
+ ifneq ($(DB_HOME),)
+-   DB_FLAGS             = -I$(DB_HOME)/include
+-   DB_LIBS              = -L$(DB_HOME)/$(libsubdir) -ldb_cxx
+-   DB_RPATH_LINK        = $(call rpathlink,$(DB_HOME)/$(libsubdir))
++   DB_FLAGS             = -I$(DB_HOME)/include/db46
++   DB_LIBS              = -L$(DB_HOME)/$(libsubdir)/db46 -ldb_cxx
++   DB_RPATH_LINK        = $(call rpathlink,$(DB_HOME)/$(libsubdir)/db46)
+ else
+    ifeq ($(shell if [ -d /usr/include/db46 -a -d /usr/$(libsubdir)/db46 ] ; then echo yes; fi), yes)
+       DB_FLAGS          = -I/usr/include/db46

Added: trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-1.diff
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-1.diff	                        (rev 0)
+++ trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-1.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -0,0 +1,300 @@
+diff -N -r -c ../mcpp-2.7-old/noconfig/bc59.dif ./noconfig/bc59.dif
+*** ../mcpp-2.7-old/noconfig/bc59.dif	1969-12-31 20:30:00.000000000 -0330
+--- ./noconfig/bc59.dif	2008-04-28 09:36:41.000000000 -0230
+***************
+*** 0 ****
+--- 1,44 ----
++ *** noconfig.H	2007-01-30 00:29:12.000000000 +0900
++ --- noconfig.H.bc59	2007-01-30 01:41:40.000000000 +0900
++ ***************
++ *** 15,21 ****
++    */
++   
++   /* Define target operating-system.  */
++ ! #define SYSTEM              SYS_FREEBSD
++   
++   /* Define target compiler.          */
++   #ifndef COMPILER
++ --- 15,21 ----
++    */
++   
++   /* Define target operating-system.  */
++ ! #define SYSTEM              SYS_WIN32
++   
++   /* Define target compiler.          */
++   #ifndef COMPILER
++ ***************
++ *** 26,36 ****
++   #define HOST_SYSTEM         SYSTEM
++   
++   /* Define host compiler.            */
++ ! #define HOST_COMPILER       GNUC
++   
++   /* Version message.                 */
++   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
++ ! #define VERSION_MSG         "GCC 3.4"
++   #if     0
++       "LCC-Win32 2006-03"
++       "Visual C 2005"
++ --- 26,36 ----
++   #define HOST_SYSTEM         SYSTEM
++   
++   /* Define host compiler.            */
++ ! #define HOST_COMPILER       BORLANDC
++   
++   /* Version message.                 */
++   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
++ ! #define VERSION_MSG         "BCC V.5.9"
++   #if     0
++       "LCC-Win32 2006-03"
++       "Visual C 2005"
+diff -N -r -c ../mcpp-2.7-old/noconfig/vc6.dif ./noconfig/vc6.dif
+*** ../mcpp-2.7-old/noconfig/vc6.dif	1969-12-31 20:30:00.000000000 -0330
+--- ./noconfig/vc6.dif	2008-04-28 09:35:32.000000000 -0230
+***************
+*** 0 ****
+--- 1,67 ----
++ *** noconfig.H	2008-02-21 17:24:21.000000000 +0900
++ --- noconfig.H.vc2002	2008-02-21 17:30:24.000000000 +0900
++ ***************
++ *** 15,21 ****
++    */
++   
++   /* Define target operating-system.  */
++ ! #define SYSTEM              SYS_FREEBSD
++   
++   /* Define target compiler.          */
++   #ifndef COMPILER
++ --- 15,21 ----
++    */
++   
++   /* Define target operating-system.  */
++ ! #define SYSTEM              SYS_WIN32
++   
++   /* Define target compiler.          */
++   #ifndef COMPILER
++ ***************
++ *** 26,36 ****
++   #define HOST_SYSTEM         SYSTEM
++   
++   /* Define host compiler.            */
++ ! #define HOST_COMPILER       GNUC
++   
++   /* Version message.                 */
++   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
++ ! #define VERSION_MSG         "GCC 3.4"
++   #if     0
++       "LCC-Win32 2006-03"
++       "Visual C 2005"
++ --- 26,36 ----
++   #define HOST_SYSTEM         SYSTEM
++   
++   /* Define host compiler.            */
++ ! #define HOST_COMPILER       MSC
++   
++   /* Version message.                 */
++   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
++ ! #define VERSION_MSG         "Visual C 6"
++   #if     0
++       "LCC-Win32 2006-03"
++       "Visual C 2005"
++ ***************
++ *** 266,275 ****
++   #define ONE_PASS            TRUE
++   #endif
++   #define COMPILER_EXT        "_MSC_VER"
++ ! #define COMPILER_EXT_VAL    "1200"
++       /* VC 2002: "1300", VC 2003: "1310", VC 2005: "1400", VC 2008: "1500"   */
++   #define COMPILER_EXT2       "_MSC_FULL_VER"
++ ! #define COMPILER_EXT2_VAL   "12008804"
++       /* VC 2002:13009466, VC 2003:13103077, VC 2005: "140050320" */
++       /* VC 2008 "150021022"  */
++   #define COMPILER_SP1        "_MSC_EXTENSIONS"
++ --- 266,275 ----
++   #define ONE_PASS            TRUE
++   #endif
++   #define COMPILER_EXT        "_MSC_VER"
++ ! #define COMPILER_EXT_VAL    "1200"
++       /* VC 2002: "1300", VC 2003: "1310", VC 2005: "1400", VC 2008: "1500"   */
++   #define COMPILER_EXT2       "_MSC_FULL_VER"
++ ! #define COMPILER_EXT2_VAL   "12008804"
++       /* VC 2002:13009466, VC 2003:13103077, VC 2005: "140050320" */
++       /* VC 2008 "150021022"  */
++   #define COMPILER_SP1        "_MSC_EXTENSIONS"
+diff -N -r -c ../mcpp-2.7-old/noconfig/visualc.mak ./noconfig/visualc.mak
+*** ../mcpp-2.7-old/noconfig/visualc.mak	2008-03-07 06:24:53.000000000 -0330
+--- ./noconfig/visualc.mak	2008-04-28 09:44:15.000000000 -0230
+***************
+*** 85,94 ****
+  LIBDIR = "$(VCINSTALLDIR)"\lib
+  CFLAGS = $(CFLAGS) -DMCPP_LIB
+  
+  mcpplib: mcpplib_lib mcpplib_dll
+  
+  mcpplib_lib:	$(OBJS)
+! 	lib -out:mcpp.lib $(OBJS)
+  
+  # DLL
+  DLL_VER = 0
+--- 85,101 ----
+  LIBDIR = "$(VCINSTALLDIR)"\lib
+  CFLAGS = $(CFLAGS) -DMCPP_LIB
+  
++ !ifdef DEBUG
++ CFLAGS = $(CFLAGS) -MDd -D_DEBUG
++ LIBSUFFIX = d
++ !else
++ CFLAGS = $(CFLAGS) -O2 -MD -DNDEBUG
++ !endif
++ 
+  mcpplib: mcpplib_lib mcpplib_dll
+  
+  mcpplib_lib:	$(OBJS)
+! 	lib -out:mcpp$(LIBSUFFIX).lib $(OBJS)
+  
+  # DLL
+  DLL_VER = 0
+***************
+*** 97,111 ****
+  .c.so	:
+  	$(CC) $(CFLAGS) $(CPPFLAGS) $(MEM_MACRO) -DDLL_EXPORT -TC -Fo$*.so $<
+  mcpplib_dll:	$(SOBJS)
+! 	$(CC) -LD -Femcpp$(DLL_VER) $(SOBJS) $(MEMLIB)
+  mcpplib_install:
+! 	copy mcpp.lib $(LIBDIR)
+! 	copy mcpp$(DLL_VER).lib $(LIBDIR)
+! 	copy mcpp$(DLL_VER).dll $(BINDIR)
+  
+  mcpplib_uninstall:
+! 	del $(LIBDIR)\mcpp.lib $(LIBDIR)\mcpp$(DLL_VER).lib \
+! 			$(BINDIR)\mcpp$(DLL_VER).dll
+  
+  # use mcpp as a subroutine from testmain.c
+  NAME = testmain
+--- 104,118 ----
+  .c.so	:
+  	$(CC) $(CFLAGS) $(CPPFLAGS) $(MEM_MACRO) -DDLL_EXPORT -TC -Fo$*.so $<
+  mcpplib_dll:	$(SOBJS)
+! 	$(CC) -LD -Femcpp$(DLL_VER)$(LIBSUFFIX) $(SOBJS) $(MEMLIB)
+  mcpplib_install:
+! 	copy mcpp$(LIBSUFFIX).lib $(LIBDIR)
+! 	copy mcpp$(DLL_VER)$(LIBSUFFIX).lib $(LIBDIR)
+! 	copy mcpp$(DLL_VER)$(LIBSUFFIX).dll $(BINDIR)
+  
+  mcpplib_uninstall:
+! 	del $(LIBDIR)\mcpp$(LIBSUFFIX).lib $(LIBDIR)\mcpp$(DLL_VER)$(LIBSUFFIX).lib \
+! 			$(BINDIR)\mcpp$(DLL_VER)$(LIBSUFFIX).dll
+  
+  # use mcpp as a subroutine from testmain.c
+  NAME = testmain
+diff -N -r -c ../mcpp-2.7-old/src/eval.c ./src/eval.c
+*** ../mcpp-2.7-old/src/eval.c	2008-03-17 01:16:53.000000000 -0230
+--- ./src/eval.c	2008-04-28 09:37:40.000000000 -0230
+***************
+*** 196,202 ****
+  #define S_PDOUBLE   (sizeof (double *))
+  #define S_PFPTR     (sizeof (int (*)()))
+  #if HAVE_LONG_LONG
+! #if HOST_COMPILER == BORLANDC
+  #define S_LLINT     (sizeof (__int64))
+  #define S_PLLINT    (sizeof (__int64 *))
+  #else
+--- 196,202 ----
+  #define S_PDOUBLE   (sizeof (double *))
+  #define S_PFPTR     (sizeof (int (*)()))
+  #if HAVE_LONG_LONG
+! #if (HOST_COMPILER == BORLANDC) || (defined(_MSC_VER) && (_MSC_VER < 1300))
+  #define S_LLINT     (sizeof (__int64))
+  #define S_PLLINT    (sizeof (__int64 *))
+  #else
+diff -N -r -c ../mcpp-2.7-old/src/main.c ./src/main.c
+*** ../mcpp-2.7-old/src/main.c	2008-03-11 13:35:19.000000000 -0230
+--- ./src/main.c	2008-04-28 09:25:05.000000000 -0230
+***************
+*** 371,377 ****
+  
+      /* Open input file, "-" means stdin.    */
+      if (in_file != NULL && ! str_eq( in_file, "-")) {
+!         if (freopen( in_file, "r", fp_in) == NULL) {
+              mcpp_fprintf( ERR, "Can't open input file \"%s\".\n", in_file);
+  #if MCPP_LIB
+              goto  fatal_error_exit;
+--- 371,377 ----
+  
+      /* Open input file, "-" means stdin.    */
+      if (in_file != NULL && ! str_eq( in_file, "-")) {
+!         if ((fp_in = fopen( in_file, "r")) == NULL) {
+              mcpp_fprintf( ERR, "Can't open input file \"%s\".\n", in_file);
+  #if MCPP_LIB
+              goto  fatal_error_exit;
+***************
+*** 384,390 ****
+      }
+      /* Open output file, "-" means stdout.  */
+      if (out_file != NULL && ! str_eq( out_file, "-")) {
+!         if (freopen( out_file, "w", fp_out) == NULL) {
+              mcpp_fprintf( ERR, "Can't open output file \"%s\".\n", out_file);
+  #if MCPP_LIB
+              goto  fatal_error_exit;
+--- 384,390 ----
+      }
+      /* Open output file, "-" means stdout.  */
+      if (out_file != NULL && ! str_eq( out_file, "-")) {
+!         if ((fp_out = fopen( out_file, "w")) == NULL) {
+              mcpp_fprintf( ERR, "Can't open output file \"%s\".\n", out_file);
+  #if MCPP_LIB
+              goto  fatal_error_exit;
+***************
+*** 394,400 ****
+          }
+      }
+      if (option_flags.q) {                   /* Redirect diagnostics */
+!         if (freopen( "mcpp.err", "a", fp_err) == NULL) {
+              mcpp_fprintf( OUT, "Can't open \"mcpp.err\"\n");
+  #if MCPP_LIB
+              goto  fatal_error_exit;
+--- 394,400 ----
+          }
+      }
+      if (option_flags.q) {                   /* Redirect diagnostics */
+!         if ((fp_err = fopen( "mcpp.err", "a")) == NULL) {
+              mcpp_fprintf( OUT, "Can't open \"mcpp.err\"\n");
+  #if MCPP_LIB
+              goto  fatal_error_exit;
+***************
+*** 430,435 ****
+--- 430,442 ----
+      clear_symtable();
+  #endif
+  
++     if(fp_in != stdin)
++         fclose( fp_in);
++     if(fp_out != stdout)
++         fclose( fp_out);
++     if(fp_err != stderr)
++         fclose( fp_err);
++ 
+      if (mcpp_debug & MEMORY)
+          print_heap();
+      if (errors > 0 && option_flags.no_source_line == FALSE) {
+diff -N -r -c ../mcpp-2.7-old/src/system.c ./src/system.c
+*** ../mcpp-2.7-old/src/system.c	2008-03-18 06:35:57.000000000 -0230
+--- ./src/system.c	2008-04-28 09:25:25.000000000 -0230
+***************
+*** 3349,3355 ****
+           * The state will be restored by get_line() on end of the included.
+           */
+          file->pos = ftell( file->fp);
+!         fclose( file->fp);
+          /* In case of failure, re-open the includer */
+          if ((fp = fopen( fullname, "r")) == NULL) {
+              file->fp = fopen( cur_fullname, "r");
+--- 3349,3356 ----
+           * The state will be restored by get_line() on end of the included.
+           */
+          file->pos = ftell( file->fp);
+!         if(file->fp != stdin)
+!             fclose( file->fp);
+          /* In case of failure, re-open the includer */
+          if ((fp = fopen( fullname, "r")) == NULL) {
+              file->fp = fopen( cur_fullname, "r");

Added: trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-2.diff
===================================================================
--- trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-2.diff	                        (rev 0)
+++ trunk/dports/devel/ice-cpp/files/patch-mcpp-2.7-2.diff	2008-05-29 06:04:10 UTC (rev 37182)
@@ -0,0 +1,30 @@
+diff -N -r -c ../mcpp-2.7-old/src/internal.H ./src/internal.H
+*** ../mcpp-2.7-old/src/internal.H	2008-03-11 13:34:07.000000000 -0230
+--- ./src/internal.H	2008-04-30 18:28:52.000000000 -0230
+***************
+*** 526,532 ****
+                  /* Do the final commands        */
+  extern void     print_heap( void);
+                  /* Print blocks of heap memory  */
+! #if ! HOST_HAVE_STPCPY || HOST_COMPILER == GNUC
+  extern char *   stpcpy( char * dest, const char * src);
+                  /* Non-Standard library function*/
+  #endif
+--- 526,532 ----
+                  /* Do the final commands        */
+  extern void     print_heap( void);
+                  /* Print blocks of heap memory  */
+! #if ! HOST_HAVE_STPCPY
+  extern char *   stpcpy( char * dest, const char * src);
+                  /* Non-Standard library function*/
+  #endif
+***************
+*** 552,554 ****
+--- 552,558 ----
+  #pragma GCC visibility pop
+  #endif
+  #endif
++ 
++ #if HOST_HAVE_STPCPY 
++ extern char *   stpcpy( char * dest, const char * src); 
++ #endif

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080528/ec7cc1a9/attachment-0001.htm 


More information about the macports-changes mailing list