ooo-build r11769 - in trunk: . patches/src680



Author: rengelhard
Date: Sun Mar  2 21:48:52 2008
New Revision: 11769
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11769&view=rev

Log:
2008-03-02  Rene Engelhard  <rene debian org>

        * patches/src680/cws-s390port01.diff: cws-extract


Added:
   trunk/patches/src680/cws-s390port01.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Sun Mar  2 21:48:52 2008
@@ -315,6 +315,7 @@
 
 [ CWSBackports ]
 cws-ia64port01.diff, i#84999
+cws-s390port01.diff, i#86425
 
 # fix build with neon 0.28
 cws-cmcfixes42-ucb.diff, i#86123

Added: trunk/patches/src680/cws-s390port01.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/cws-s390port01.diff	Sun Mar  2 21:48:52 2008
@@ -0,0 +1,1368 @@
+cvs diff: Diffing automation
+cvs diff: Diffing automation/inc
+cvs diff: Diffing automation/inc/automation
+cvs diff: Diffing automation/inc/pch
+cvs diff: Diffing automation/packimages
+cvs diff: Diffing automation/prj
+cvs diff: Diffing automation/source
+cvs diff: Diffing automation/source/app
+cvs diff: Diffing automation/source/communi
+cvs diff: Diffing automation/source/inc
+cvs diff: Diffing automation/source/miniapp
+cvs diff: Diffing automation/source/mozillaserver
+cvs diff: Diffing automation/source/server
+cvs diff: Diffing automation/source/simplecm
+cvs diff: Diffing automation/source/testtool
+Index: automation/source/testtool/objtest.cxx
+===================================================================
+RCS file: /cvs/util/automation/source/testtool/objtest.cxx,v
+retrieving revision 1.37
+retrieving revision 1.37.2.1
+diff -u -u -p -b -w -B -r1.37 -r1.37.2.1
+--- automation/source/testtool/objtest.cxx	27 Feb 2008 09:44:28 -0000	1.37
++++ automation/source/testtool/objtest.cxx	1 Mar 2008 15:16:43 -0000	1.37.2.1
+@@ -544,6 +544,8 @@ void TestToolObj::LoadIniFile()				// La
+     abGP.Append( "19" );  // Linux ARM
+ #elif defined LINUX && defined IA64
+     abGP.Append( "20" );  // Linux ia64
++#elif defined LINUX && defined S390
++    abGP.Append( "21" );  // Linux S390
+ #else
+ #error ("unknown platform. please request an ID for your platform on qa/dev")
+ #endif
+cvs diff: Diffing automation/util
+cvs diff: Diffing automation/util/defs
+cvs diff: Diffing solenv
+cvs diff: Diffing solenv/bin
+cvs diff: Diffing solenv/bin/modules
+cvs diff: Diffing solenv/bin/modules/PCVSLib
+cvs diff: Diffing solenv/bin/modules/PCVSLib/lib
+cvs diff: Diffing solenv/bin/modules/PCVSLib/lib/PCVSLib
+cvs diff: Diffing solenv/bin/modules/PCVSLib/samples
+cvs diff: Diffing solenv/bin/modules/PCVSLib/t
+cvs diff: Diffing solenv/bin/modules/installer
+cvs diff: Diffing solenv/bin/modules/installer/windows
+cvs diff: Diffing solenv/bin/modules/packager
+cvs diff: Diffing solenv/bin/modules/par2script
+cvs diff: Diffing solenv/bin/modules/pre2par
+cvs diff: Diffing solenv/config
+cvs diff: Diffing solenv/inc
+Index: solenv/inc/unxlngs3904.mk
+===================================================================
+RCS file: /cvs/tools/solenv/inc/unxlngs3904.mk,v
+retrieving revision 1.18
+retrieving revision 1.18.124.1
+diff -u -u -p -b -w -B -r1.18 -r1.18.124.1
+--- solenv/inc/unxlngs3904.mk	12 Dec 2007 13:21:06 -0000	1.18
++++ solenv/inc/unxlngs3904.mk	29 Feb 2008 14:49:56 -0000	1.18.124.1
+@@ -33,11 +33,11 @@
+ #
+ #*************************************************************************
+ 
+-# mk file for linux s390 using gcc 3.X
++# mk file for linux s390
+ ASM=
+ AFLAGS=
+ 
+-SOLAR_JAVA*=TRUE
++SOLAR_JAVA*=
+ JAVAFLAGSDEBUG=-g
+ 
+ # filter for supressing verbose messages from linker
+@@ -45,7 +45,12 @@ JAVAFLAGSDEBUG=-g
+ #LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
+ 
+ # _PTHREADS is needed for the stl
+-CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
++CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DS390 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
++
++# enable visibility define in "sal/types.h"
++.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
++.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+ 
+ # this is a platform with JAVA support
+ .IF "$(SOLAR_JAVA)"!=""
+@@ -65,15 +70,25 @@ ARCH_FLAGS*=
+ CXX*=g++
+ # name of C Compiler
+ CC*=gcc
++.IF "$(SYSBASE)"!=""
++CFLAGS_SYSBASE:=-isystem $(SYSBASE)$/usr$/include
++CXX+:=$(CFLAGS_SYSBASE)
++CC+:=$(CFLAGS_SYSBASE)
++.ENDIF          # "$(SYSBASE)"!=""
++CFLAGS+=-Wreturn-type -fmessage-length=0 -c
++# flags to enable build with symbols; required for crashdump feature
++.IF "$(ENABLE_SYMBOLS)"=="SMALL"
++CFLAGSENABLESYMBOLS=-g1
++.ELSE
++CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
+ 
+-CFLAGS+=-fsigned-char -fmessage-length=0 -c
++.ENDIF
+ 
++CFLAGS+=-fsigned-char -fno-omit-frame-pointer
+ # flags for the C++ Compiler
+ CFLAGSCC= -fsigned-char -pipe $(ARCH_FLAGS)
+-
+ # Flags for enabling exception handling
+ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+-
+ # Flags for disabling exception handling
+ CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+ 
+@@ -77,14 +92,18 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enfor
+ # Flags for disabling exception handling
+ CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+ 
+-CFLAGSCXX= -fsigned-char -pipe -fno-rtti $(ARCH_FLAGS)
+-#CFLAGSCXX= -fsigned-char -pipe
++CFLAGSCXX= -fsigned-char -pipe $(ARCH_FLAGS)
++CFLAGSCXX+= -Wno-ctor-dtor-privacy
++CFLAGSCXX+= -fno-use-cxa-atexit
+ PICSWITCH:=-fPIC
++.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
++CFLAGSCXX += -fvisibility-inlines-hidden
++.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
+ 
+ # Compiler flags for compiling static object in multi threaded environment with graphical user interface
+-CFLAGSOBJGUIMT=$(PICSWITCH)
++CFLAGSOBJGUIMT=
+ # Compiler flags for compiling static object in multi threaded environment with character user interface
+-CFLAGSOBJCUIMT=$(PICSWITCH)
++CFLAGSOBJCUIMT=
+ # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
+ CFLAGSSLOGUIMT=$(PICSWITCH)
+ # Compiler flags for compiling shared object in multi threaded environment with character user interface
+@@ -96,24 +113,21 @@ CFLAGSPROF=
+ # Compiler flags for debugging
+ CFLAGSDEBUG=-g
+ CFLAGSDBGUTIL=
+-
+ # Compiler flags for enabling optimizations
+-#CFLAGSOPT=-O2 -fno-schedule-insns -fno-strict-aliasing -fno-schedule-insns2
+-CFLAGSOPT=-O2 -fno-strict-aliasing
+-
++.IF "$(PRODUCT)"!=""
++CFLAGSOPT=-O2 -fno-strict-aliasing             # optimizing for products
++CFLAGSOPT+=-Wuninitialized                             # not supported without optimization
++.ELSE  # "$(PRODUCT)"!=""
++CFLAGSOPT=                                                     # no optimizing for non products
++.ENDIF # "$(PRODUCT)"!=""
+ # Compiler flags for disabling optimizations
+-# don't change - required to work around optimization bugs
+ CFLAGSNOOPT=-O0
+-
+ # Compiler flags for describing the output path
+ CFLAGSOUTOBJ=-o
+-
+-CFLAGSWARNCC=
+-CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
+-# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
+-CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
+-CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
+-CFLAGSWERRCC=-Werror
++# Enable all warnings
++CFLAGSWALL=-Wall
++# Set default warn level
++CFLAGSDFLTWARN=
+ 
+ # switches for dynamic and static linking
+ STATIC		= -Wl,-Bstatic
+@@ -121,8 +135,12 @@ DYNAMIC		= -Wl,-Bdynamic
+ 
+ # name of linker
+ LINK*=$(CXX)
++LINKC*=$(CC)
++
+ # default linker flags
+-LINKFLAGS=
++LINKFLAGSDEFS*=-Wl,-z,defs
++LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\'
++LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH)
+ 
+ # linker flags for linking applications
+ LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
+@@ -137,14 +154,10 @@ LINKFLAGSPROF=
+ LINKFLAGSDEBUG=-g
+ LINKFLAGSOPT=
+ 
+-.IF "$(NO_BSYMBOLIC)"==""
+-.IF "$(PRJNAME)" != "envtest"
+-LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
+-LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
+-.ENDIF
+-.ENDIF				# "$(NO_BSYMBOLIC)"==""
+-
+-LINKVERSIONMAPFLAG=-Wl,--version-script
++# linker flags for optimization (symbol hashtable)
++# for now, applied to symbol scoped libraries, only
++LINKFLAGSOPTIMIZE*=-Wl,-O1
++LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
+ 
+ SONAME_SWITCH=-Wl,-h
+ 
+@@ -153,6 +166,7 @@ SONAME_SWITCH=-Wl,-h
+ STDLIBCPP=-lstdc++
+ 
+ # default objectfilenames to link
++STDOBJVCL=$(L)$/salmain.o
+ STDOBJGUI=
+ STDSLOGUI=
+ STDOBJCUI=
+@@ -165,13 +179,20 @@ STDLIBCUIMT=-ldl -lpthread -lm
+ STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
+ STDSHLCUIMT=-ldl -lpthread -lm
+ 
++LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
++
++.IF "$(USE_STLP_DEBUG)" != ""
++LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
++LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
++.ELSE # "$(USE_STLP_DEBUG)" != ""
+ .IF "$(STLPORT_VER)" >= "500"
+-LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
++LIBSTLPORT=$(DYNAMIC) -lstlport
+ LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
+ .ELSE
+-LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
++LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
+ LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
+ .ENDIF
++.ENDIF # "$(USE_STLP_DEBUG)" != ""
+ 
+ #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
+ 
+cvs diff: Diffing solenv/inc/startup
+cvs diff: Diffing solenv/inc/startup/AIX
+cvs diff: Diffing solenv/inc/startup/FREEBSD
+cvs diff: Diffing solenv/inc/startup/HPUX
+cvs diff: Diffing solenv/inc/startup/IRIX
+cvs diff: Diffing solenv/inc/startup/LINUX
+cvs diff: Diffing solenv/inc/startup/MACOSX
+cvs diff: Diffing solenv/inc/startup/NETBSD
+cvs diff: Diffing solenv/inc/startup/SOLARIS
+cvs diff: Diffing solenv/inc/startup/UNIX
+cvs diff: Diffing solenv/inc/startup/wnt
+cvs diff: Diffing solenv/prj
+cvs diff: Diffing solenv/src
+cvs diff: Diffing solenv/unxmacxp
+cvs diff: Diffing solenv/unxmacxp/inc
+cvs diff: Diffing bridges
+cvs diff: Diffing bridges/inc
+cvs diff: Diffing bridges/inc/bridges
+cvs diff: Diffing bridges/inc/bridges/cpp_uno
+cvs diff: Diffing bridges/inc/bridges/cpp_uno/shared
+cvs diff: Diffing bridges/inc/bridges/remote
+cvs diff: Diffing bridges/inc/pch
+cvs diff: Diffing bridges/prj
+cvs diff: Diffing bridges/source
+cvs diff: Diffing bridges/source/cpp_uno
+cvs diff: Diffing bridges/source/cpp_uno/cc50_solaris_intel
+cvs diff: Diffing bridges/source/cpp_uno/cc50_solaris_sparc
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_freebsd_intel
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_freebsd_x86-64
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_arm
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_ia64
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_intel
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_mips
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_powerpc
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_powerpc64
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_s390
+Index: bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx
+===================================================================
+RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx,v
+retrieving revision 1.4
+retrieving revision 1.4.92.1
+diff -u -u -p -b -w -B -r1.4 -r1.4.92.1
+--- bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx	16 Sep 2006 15:48:49 -0000	1.4
++++ bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx	29 Feb 2008 14:56:00 -0000	1.4.92.1
+@@ -36,34 +36,26 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_bridges.hxx"
+ 
+-#include <malloc.h>
+-#include <hash_map>
+-
+-#include <rtl/alloc.h>
+-#include <osl/mutex.hxx>
+-
++#include <com/sun/star/uno/genfunc.hxx>
+ #include <uno/data.h>
+ #include <typelib/typedescription.hxx>
+ 
+-#include <bridges/cpp_uno/bridge.hxx>
+-#include <bridges/cpp_uno/type_misc.hxx>
++#include "bridges/cpp_uno/shared/bridge.hxx"
++#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
++#include "bridges/cpp_uno/shared/types.hxx"
++#include "bridges/cpp_uno/shared/vtablefactory.hxx"
+ 
+ #include "share.hxx"
++#include <stdio.h>
+ 
+ 
+-using namespace ::osl;
+-using namespace ::rtl;
+ using namespace ::com::sun::star::uno;
+ 
+-namespace CPPU_CURRENT_NAMESPACE
++namespace 
+ {
+ 
+-//==================================================================================================
+-rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
+-
+-//==================================================================================================
+ static typelib_TypeClass cpp2uno_call(
+-	cppu_cppInterfaceProxy * pThis,
++	bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
+ 	const typelib_TypeDescription * pMemberTypeDescr,
+ 	typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
+ 	sal_Int32 nParams, typelib_MethodParameter * pParams,
+@@ -88,7 +80,7 @@ static typelib_TypeClass cpp2uno_call(
+ 	
+ 	if (pReturnTypeDescr)
+ 	{
+-		if (cppu_isSimpleType( pReturnTypeDescr ))
++		if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+ 		{
+ 			pUnoReturn = pRegisterReturn; // direct way for simple types
+ 		}
+@@ -98,7 +90,7 @@ static typelib_TypeClass cpp2uno_call(
+                         gpreg++;
+                         ng++;
+ 			
+-			pUnoReturn = (cppu_relatesToInterface( pReturnTypeDescr )
++			pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
+ 						  ? alloca( pReturnTypeDescr->nSize )
+ 						  : pCppReturn); // direct way
+ 		}
+@@ -125,7 +117,7 @@ static typelib_TypeClass cpp2uno_call(
+ 		typelib_TypeDescription * pParamTypeDescr = 0;
+ 		TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
+ 
+-		if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr )) // value
++		if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr )) // value
+ 		{
+ 
+ 			switch (pParamTypeDescr->eTypeClass)
+@@ -246,11 +238,11 @@ static typelib_TypeClass cpp2uno_call(
+ 				ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ 			}
+ 			// is in/inout
+-			else if (cppu_relatesToInterface( pParamTypeDescr ))
++			else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
+ 			{
+ 				uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+ 										*(void **)pCppStack, pParamTypeDescr,
+-										&pThis->pBridge->aCpp2Uno );
++										pThis->getBridge()->getCpp2Uno() );
+ 				pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
+ 				// will be released at reconversion
+ 				ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+@@ -269,7 +261,7 @@ static typelib_TypeClass cpp2uno_call(
+ 	uno_Any * pUnoExc = &aUnoExc;
+ 
+ 	// invoke uno dispatch call
+-	(*pThis->pUnoI->pDispatcher)( pThis->pUnoI, pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
++	(*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
+ 	
+ 	// in case an exception occured...
+ 	if (pUnoExc)
+@@ -286,7 +278,7 @@ static typelib_TypeClass cpp2uno_call(
+ 		if (pReturnTypeDescr)
+ 			TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ 		
+-		raiseException( &aUnoExc, &pThis->pBridge->aUno2Cpp ); // has to destruct the any
++		CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
+ 		// is here for dummy
+ 		return typelib_TypeClass_VOID;
+ 	}
+@@ -303,7 +295,7 @@ static typelib_TypeClass cpp2uno_call(
+ 				// convert and assign
+ 				uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
+ 				uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
+-										&pThis->pBridge->aUno2Cpp );
++										pThis->getBridge()->getUno2Cpp() );
+ 			}
+ 			// destroy temp uno param
+ 			uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
+@@ -316,7 +308,7 @@ static typelib_TypeClass cpp2uno_call(
+ 			if (pUnoReturn != pCppReturn) // needs reconversion
+ 			{
+ 				uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
+-										&pThis->pBridge->aUno2Cpp );
++										pThis->getBridge()->getUno2Cpp() );
+ 				// destroy temp uno return
+ 				uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
+ 			}
+@@ -335,43 +327,53 @@ static typelib_TypeClass cpp2uno_call(
+ }
+ 
+ 
+-//==================================================================================================
++//============================================================================
+ static typelib_TypeClass cpp_mediate(
+-	sal_Int32 nVtableCall,
++	sal_uInt32 nOffsetAndIndex,
+         void ** gpreg, void ** fpreg, void ** ovrflw,
+ 	sal_Int64 * pRegisterReturn /* space for register return */ )
+ {
+ 	OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
+ 	
++    sal_Int16 nVtableOffset = (nOffsetAndIndex >> 16);
++    sal_Int16 nFunctionIndex = (nOffsetAndIndex & 0xFFFF);
++	
+ 	// gpreg:  [ret *], this, [other gpr params]
+ 	// fpreg:  [fpr params]
+ 	// ovrflw: [gpr or fpr params (properly aligned)]
+ 
+ 	// _this_ ptr is patched cppu_XInterfaceProxy object
+-	cppu_cppInterfaceProxy * pCppI = NULL;
+-	if( nVtableCall & 0x80000000 )
++	void * pThis;
++	if( nFunctionIndex & 0x8000 )
+ 	{
+-		nVtableCall &= 0x7fffffff;
+-		pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(gpreg +1);
++		nFunctionIndex &= 0x7fff;
++		pThis = gpreg[1];
+ 	}
+ 	else
+     {
+-		pCppI = (cppu_cppInterfaceProxy *)(XInterface *)*(gpreg);
++		pThis = gpreg[0];
+     }
+     
+-	typelib_InterfaceTypeDescription * pTypeDescr = pCppI->pTypeDescr;
++    pThis = static_cast< char * >(pThis) - nVtableOffset;
+ 	
+-	OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
+-	if (nVtableCall >= pTypeDescr->nMapFunctionIndexToMemberIndex)
++    bridges::cpp_uno::shared::CppInterfaceProxy * pCppI
++        = bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
++            pThis);
++
++    typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
++
++	
++	OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
++	if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
+ 	{
+ 		throw RuntimeException(
+-            OUString::createFromAscii("illegal vtable index!"),
++            rtl::OUString::createFromAscii("illegal vtable index!"),
+             (XInterface *)pCppI );
+ 	}
+ 	
+ 	// determine called method
+ 	OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
+-	sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nVtableCall];
++	sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
+ 	OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### illegal member index!" );
+ 
+ 	TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
+@@ -381,7 +383,7 @@ static typelib_TypeClass cpp_mediate(
+ 	{
+ 	case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ 	{
+-		if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nVtableCall)
++		if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
+ 		{
+ 			// is GET method
+ 			eRet = cpp2uno_call(
+@@ -410,7 +412,7 @@ static typelib_TypeClass cpp_mediate(
+ 	case typelib_TypeClass_INTERFACE_METHOD:
+ 	{
+ 		// is METHOD
+-		switch (nVtableCall)
++		switch (nFunctionIndex)
+ 		{
+ 		case 1: // acquire()
+ 			pCppI->acquireProxy(); // non virtual call!
+@@ -427,9 +429,10 @@ static typelib_TypeClass cpp_mediate(
+ 			if (pTD)
+ 			{
+                 XInterface * pInterface = 0;
+-                (*pCppI->pBridge->pCppEnv->getRegisteredInterface)(
+-                    pCppI->pBridge->pCppEnv,
+-                    (void **)&pInterface, pCppI->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
++                (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
++                    pCppI->getBridge()->getCppEnv(),
++                    (void **)&pInterface, pCppI->getOid().pData, 
++					(typelib_InterfaceTypeDescription *)pTD );
+ 			
+                 if (pInterface)
+                 {
+@@ -458,7 +461,7 @@ static typelib_TypeClass cpp_mediate(
+ 	default:
+ 	{
+ 		throw RuntimeException(
+-            OUString::createFromAscii("no member description found!"),
++            rtl::OUString::createFromAscii("no member description found!"),
+             (XInterface *)pCppI );
+ 		// is here for dummy
+ 		eRet = typelib_TypeClass_VOID;
+@@ -473,8 +476,13 @@ static typelib_TypeClass cpp_mediate(
+  * is called on incoming vtable calls
+  * (called by asm snippets)
+  */
+-static void cpp_vtable_call( int nTableEntry, void** gpregptr, void** fpregptr, void** ovrflw)
++static void privateSnippetExecutor( sal_uInt32 nOffsetAndIndex, void** gpregptr, void** fpregptr, void** ovrflw)
+ {
++#ifdef CMC_DEBUG
++	fprintf(stderr, "privateSnippetExecutor\n");
++#endif
++
++
+         sal_Int32     gpreg[8];
+         double        fpreg[8];
+ 
+@@ -483,10 +491,9 @@ static void cpp_vtable_call( int nTableE
+ 
+ 	volatile long nRegReturn[2];
+ 
+-        sal_Bool bComplex = nTableEntry & 0x80000000 ? sal_True : sal_False;
+-
+ 	typelib_TypeClass aType = 
+-             cpp_mediate( nTableEntry, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn );
++		cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, ovrflw, 
++		(sal_Int64*)nRegReturn );
+     
+ 	switch( aType )
+ 	{
+@@ -546,43 +553,22 @@ static void cpp_vtable_call( int nTableE
+ 	}
+ }
+ 
++const int codeSnippetSize = 50;
+ 
+-//==================================================================================================
+-class MediateClassData
+-{
+-    typedef ::std::hash_map< OUString, void *, OUStringHash > t_classdata_map;
+-	t_classdata_map m_map;
+-	Mutex m_mutex;
+-    
+-public:
+-	void const * get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () );
+-    
+-	inline MediateClassData() SAL_THROW( () )
+-        {}
+-	~MediateClassData() SAL_THROW( () );
+-};
+-//__________________________________________________________________________________________________
+-MediateClassData::~MediateClassData() SAL_THROW( () )
++unsigned char* codeSnippet( unsigned char * code, sal_Int16 nFunctionIndex, sal_Int16 nVtableOffset, bool simple_ret_type )
+ {
+-	OSL_TRACE( "> calling ~MediateClassData(): freeing mediate vtables." );
++    sal_uInt32 nOffsetAndIndex = ( ( nVtableOffset ) << 16 ) | ( nFunctionIndex );
+ 	
+-	for ( t_classdata_map::const_iterator iPos( m_map.begin() ); iPos != m_map.end(); ++iPos )
+-	{
+-		::rtl_freeMemory( iPos->second );
+-	}
+-}
+-//--------------------------------------------------------------------------------------------------
+-static inline void codeSnippet( long * code, sal_uInt32 vtable_pos, bool simple_ret_type ) SAL_THROW( () )
+-{
+     if (! simple_ret_type)
+-        vtable_pos |= 0x80000000;
++        nOffsetAndIndex |= 0x8000;
++
+     OSL_ASSERT( sizeof (long) == 4 );
+ 
+      /* generate this code */
+      // lr      %r0,%r13
+      // bras    %r13,0x6
+-     // .long   cpp_vtable_call 
+-     // .long   vtable_pos
++     // .long   privateSnippetExecutor 
++     // .long   nOffsetAndIndex
+      // stm     %r2,%r6,8(%r15)
+      // std     %f0,64(%r15)
+      // std     %f2,72(%r15)
+@@ -595,142 +581,123 @@ static inline void codeSnippet( long * c
+      // lr      %r13,%r0
+      // br      %r1
+ 
++    unsigned char * p = code;
++    *reinterpret_cast< sal_Int16 * >(p) = 0x180d;
++    p += sizeof(sal_Int16);
++    *reinterpret_cast< sal_Int32 * >(p) = 0xa7d50006;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) =
++        reinterpret_cast< sal_Int32 >(privateSnippetExecutor);
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = nOffsetAndIndex;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x9026f008;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x6000f040;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x6020f048;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x5820d004;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x4130f008;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x4140f040;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x4150f060;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int32 * >(p) = 0x5810d000;
++    p += sizeof(sal_Int32);
++    *reinterpret_cast< sal_Int16 * >(p) = 0x18d0;
++    p += sizeof(sal_Int16);
++    *reinterpret_cast< sal_Int16 * >(p) = 0x07f1;
++    p += sizeof(sal_Int16);
++
++    return (code + codeSnippetSize);
++}
++}
++
++void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const *, unsigned char const *)
++{
++}
++
++struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
++
++bridges::cpp_uno::shared::VtableFactory::Slot *
++bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
++{
++    return static_cast< Slot * >(block) + 2;
++}
++
++sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
++    sal_Int32 slotCount)
++{
++    return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
++}
++
++bridges::cpp_uno::shared::VtableFactory::Slot *
++bridges::cpp_uno::shared::VtableFactory::initializeBlock(
++    void * block, sal_Int32 slotCount)
++{
++    Slot * slots = mapBlockToVtable(block);
++    slots[-2].fn = 0;
++    slots[-1].fn = 0;
++    return slots + slotCount;
++}
++
++unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
++    Slot ** slots, unsigned char * code,
++    typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
++    sal_Int32 functionCount, sal_Int32 vtableOffset)
++{
++     (*slots) -= functionCount;
++     Slot * s = *slots;
++#ifdef CMC_DEBUG
++    fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
++    fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
++#endif
+ 
+-      * ((short*)code)++ = 0x180d;
+-      * code++ = 0xa7d50006;
+-      * code++ = cpp_vtable_call;
+-      * code++ = vtable_pos;
+-      * code++ = 0x9026f008;
+-      * code++ = 0x6000f040;
+-      * code++ = 0x6020f048;
+-      * code++ = 0x5820d004;
+-      * code++ = 0x4130f008;
+-      * code++ = 0x4140f040;
+-      * code++ = 0x4150f060;
+-      * code++ = 0x5810d000;
+-      * ((short*)code)++ = 0x18d0;
+-      * ((short*)code)++ = 0x07f1;
+-
+-}
+-//__________________________________________________________________________________________________
+-void const * MediateClassData::get_vtable( typelib_InterfaceTypeDescription * pTD ) SAL_THROW( () )
+-{
+-    void * buffer;
+-    const int nSnippetSize = 50;
+-
+-    // avoiding locked counts
+-    OUString const & unoName = *(OUString const *)&((typelib_TypeDescription *)pTD)->pTypeName;
+-    {
+-	MutexGuard aGuard( m_mutex );
+-	t_classdata_map::const_iterator iFind( m_map.find( unoName ) );
+-	if (iFind == m_map.end())
+-    {
+-        // create new vtable
+-        sal_Int32 nSlots = pTD->nMapFunctionIndexToMemberIndex;
+-        buffer = ::rtl_allocateMemory( ((2+ nSlots) * sizeof (void *)) + (nSlots *nSnippetSize) );
+-        
+-        ::std::pair< t_classdata_map::iterator, bool > insertion(
+-            m_map.insert( t_classdata_map::value_type( unoName, buffer ) ) );
+-        OSL_ENSURE( insertion.second, "### inserting new vtable buffer failed?!" );
+-        
+-        void ** slots = (void **)buffer;
+-        *slots++ = 0;
+-        *slots++ = 0; // rtti
+-        char * code = (char *)(slots + nSlots);
+-        
+-        sal_uInt32 vtable_pos = 0;
+-        sal_Int32 nAllMembers = pTD->nAllMembers;
+-        typelib_TypeDescriptionReference ** ppAllMembers = pTD->ppAllMembers;
+-        for ( sal_Int32 nPos = 0; nPos < nAllMembers; ++nPos )
+-        {
+-            typelib_TypeDescription * pTD = 0;
+-            TYPELIB_DANGER_GET( &pTD, ppAllMembers[ nPos ] );
+-            OSL_ASSERT( pTD );
+-            if (typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass)
+-            {
+-                bool simple_ret = cppu_isSimpleType(
+-                    ((typelib_InterfaceAttributeTypeDescription *)pTD)->pAttributeTypeRef->eTypeClass );
+-                // get method
+-                *slots = code;
+-                codeSnippet( (long *)code, vtable_pos++, simple_ret );
+-                code += nSnippetSize;
+-                slots++;
+-                if (! ((typelib_InterfaceAttributeTypeDescription *)pTD)->bReadOnly)
+-                {
+-                    // set method
+-                    *slots = code;
+-                    codeSnippet( (long *)code, vtable_pos++, true );
+-                    code += nSnippetSize;
+-                    slots++;
+-                }
+-            }
+-            else
+-            {
+-                bool simple_ret = cppu_isSimpleType(
+-                    ((typelib_InterfaceMethodTypeDescription *)pTD)->pReturnTypeRef->eTypeClass );
+-                *slots = code;
+-                codeSnippet( (long *)code, vtable_pos++, simple_ret );
+-                code += nSnippetSize;
+-                slots++;
+-            }
+-            TYPELIB_DANGER_RELEASE( pTD );
+-        }
+-        OSL_ASSERT( vtable_pos == nSlots );
+-    }
+-    else
++    for (sal_Int32 i = 0; i < type->nMembers; ++i) {
++        typelib_TypeDescription * member = 0;
++        TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
++        OSL_ASSERT(member != 0);
++        switch (member->eTypeClass) {
++        case typelib_TypeClass_INTERFACE_ATTRIBUTE:
++            // Getter:
++            (s++)->fn = code;
++            code = codeSnippet(
++                code, functionOffset++, vtableOffset,
++                bridges::cpp_uno::shared::isSimpleType(
++                    reinterpret_cast<
++                    typelib_InterfaceAttributeTypeDescription * >(
++                        member)->pAttributeTypeRef));
++
++            // Setter:
++            if (!reinterpret_cast<
++                typelib_InterfaceAttributeTypeDescription * >(
++                    member)->bReadOnly)
+     {
+-        buffer = iFind->second;
+-    }
++                (s++)->fn = code;
++                code = codeSnippet(code, functionOffset++, vtableOffset, true);
+     }
++            break;
+     
+-    return ((void **)buffer +2);
+-}
++        case typelib_TypeClass_INTERFACE_METHOD:
++            (s++)->fn = code;
++            code = codeSnippet(
++                code, functionOffset++, vtableOffset,
++                bridges::cpp_uno::shared::isSimpleType(
++                    reinterpret_cast<
++                    typelib_InterfaceMethodTypeDescription * >(
++                        member)->pReturnTypeRef));
++            break;
+ 
+-//==================================================================================================
+-void SAL_CALL cppu_cppInterfaceProxy_patchVtable(
+-	XInterface * pCppI, typelib_InterfaceTypeDescription * pTypeDescr ) throw ()
+-{
+-	static MediateClassData * s_pMediateClassData = 0;
+-	if (! s_pMediateClassData)
+-	{
+-		MutexGuard aGuard( Mutex::getGlobalMutex() );
+-		if (! s_pMediateClassData)
+-		{
+-#ifdef LEAK_STATIC_DATA
+-			s_pMediateClassData = new MediateClassData();
+-#else
+-			static MediateClassData s_aMediateClassData;
+-			s_pMediateClassData = &s_aMediateClassData;
+-#endif
+-		}
++        default:
++            OSL_ASSERT(false);
++            break;
+ 	}
+-	*(void const **)pCppI = s_pMediateClassData->get_vtable( pTypeDescr );
++        TYPELIB_DANGER_RELEASE(member);
+ }
+-
++    return code;
+ }
+ 
+-extern "C"
+-{
+-//##################################################################################################
+-sal_Bool SAL_CALL component_canUnload( TimeValue * pTime )
+-	SAL_THROW_EXTERN_C()
+-{
+-	return CPPU_CURRENT_NAMESPACE::g_moduleCount.canUnload(
+-        &CPPU_CURRENT_NAMESPACE::g_moduleCount, pTime );
+-}
+-//##################################################################################################
+-void SAL_CALL uno_initEnvironment( uno_Environment * pCppEnv )
+-	SAL_THROW_EXTERN_C()
+-{
+-	CPPU_CURRENT_NAMESPACE::cppu_cppenv_initEnvironment(
+-        pCppEnv );
+-}
+-//##################################################################################################
+-void SAL_CALL uno_ext_getMapping(
+-	uno_Mapping ** ppMapping, uno_Environment * pFrom, uno_Environment * pTo )
+-	SAL_THROW_EXTERN_C()
+-{
+-	CPPU_CURRENT_NAMESPACE::cppu_ext_getMapping(
+-        ppMapping, pFrom, pTo );
+-}
+-}
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+Index: bridges/source/cpp_uno/gcc3_linux_s390/except.cxx
+===================================================================
+RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx,v
+retrieving revision 1.5
+retrieving revision 1.5.92.1
+diff -u -u -p -b -w -B -r1.5 -r1.5.92.1
+--- bridges/source/cpp_uno/gcc3_linux_s390/except.cxx	16 Sep 2006 15:49:02 -0000	1.5
++++ bridges/source/cpp_uno/gcc3_linux_s390/except.cxx	29 Feb 2008 14:56:00 -0000	1.5.92.1
+@@ -46,7 +46,7 @@
+ #include <osl/diagnose.h>
+ #include <osl/mutex.hxx>
+ 
+-#include <bridges/cpp_uno/bridge.hxx>
++#include <com/sun/star/uno/genfunc.hxx>
+ #include <typelib/typedescription.hxx>
+ #include <uno/any2.h>
+ 
+@@ -291,4 +291,4 @@ void fillUnoException( __cxa_exception *
+ }
+ 
+ }
+-
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+Index: bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
+===================================================================
+RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk,v
+retrieving revision 1.5
+retrieving revision 1.5.24.1
+diff -u -u -p -b -w -B -r1.5 -r1.5.24.1
+--- bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk	15 Oct 2007 11:57:04 -0000	1.5
++++ bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk	29 Feb 2008 14:56:00 -0000	1.5.24.1
+@@ -52,6 +52,10 @@ ENABLE_EXCEPTIONS=TRUE
+ CFLAGS += -DLEAK_STATIC_DATA
+ .ENDIF
+ 
++# In case someone enabled the non-standard -fomit-frame-pointer which does not
++# work with the .cxx sources in this directory:
++CFLAGSCXX += -fno-omit-frame-pointer
++
+ CFLAGSNOOPT=-O0
+ 
+ SLOFILES= \
+@@ -66,10 +70,8 @@ SHL1IMPLIB=i$(TARGET)
+ SHL1VERSIONMAP=..$/..$/bridge_exports.map
+ SHL1RPATH=URELIB
+ 
+-SHL1OBJS= \
+-	$(SLO)$/except.obj		\
+-	$(SLO)$/cpp2uno.obj		\
+-	$(SLO)$/uno2cpp.obj
++SHL1OBJS= $(SLOFILES)
++SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
+ 
+ SHL1STDLIBS= \
+ 	$(CPPULIB)			\
+Index: bridges/source/cpp_uno/gcc3_linux_s390/share.hxx
+===================================================================
+RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_linux_s390/share.hxx,v
+retrieving revision 1.3
+retrieving revision 1.3.162.1
+diff -u -u -p -b -w -B -r1.3 -r1.3.162.1
+--- bridges/source/cpp_uno/gcc3_linux_s390/share.hxx	7 Sep 2005 22:24:36 -0000	1.3
++++ bridges/source/cpp_uno/gcc3_linux_s390/share.hxx	29 Feb 2008 14:56:00 -0000	1.3.162.1
+@@ -33,6 +33,8 @@
+  *
+  ************************************************************************/
+ 
++#include "uno/mapping.h"
++
+ #include <typeinfo>
+ #include <exception>
+ #include <cstddef>
+@@ -40,6 +42,9 @@
+ namespace CPPU_CURRENT_NAMESPACE
+ {
+ 
++  void dummy_can_throw_anything( char const * );
++
++
+ // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+ 
+ struct _Unwind_Exception
+@@ -92,3 +97,4 @@ void raiseException(
+ void fillUnoException(
+     __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+ }
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+Index: bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
+===================================================================
+RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx,v
+retrieving revision 1.4
+retrieving revision 1.4.92.1
+diff -u -u -p -b -w -B -r1.4 -r1.4.92.1
+--- bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx	16 Sep 2006 15:49:15 -0000	1.4
++++ bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx	29 Feb 2008 14:56:00 -0000	1.4.92.1
+@@ -37,23 +37,26 @@
+ #include "precompiled_bridges.hxx"
+ 
+ #include <malloc.h>
+-#include <rtl/alloc.h>
+ 
++#include <com/sun/star/uno/genfunc.hxx>
+ #include <uno/data.h>
+-#include <bridges/cpp_uno/bridge.hxx>
+-#include <bridges/cpp_uno/type_misc.hxx>
++
++#include "bridges/cpp_uno/shared/bridge.hxx"
++#include "bridges/cpp_uno/shared/types.hxx"
++#include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
++#include "bridges/cpp_uno/shared/vtables.hxx"
+ 
+ #include "share.hxx"
+ 
++#include <stdio.h>
++#include <string.h>
++
+ 
+ using namespace ::rtl;
+ using namespace ::com::sun::star::uno;
+ 
+-namespace CPPU_CURRENT_NAMESPACE
++namespace
+ {
+-
+-void dummy_can_throw_anything( char const * );
+-
+ static sal_Int32
+ invoke_count_words(char * pPT)
+ {
+@@ -209,7 +212,7 @@ static void callVirtualMethod(
+      volatile float fret;
+      volatile int iret, iret2;
+ 
+-     char * dummy = alloca(32); // dummy alloca to force r11 usage for exception handling
++     void * dummy = alloca(32); // dummy alloca to force r11 usage for exception handling
+ 
+     __asm__ __volatile__
+      (
+@@ -287,10 +290,10 @@ static void callVirtualMethod(
+ }
+ 
+ 
+-//================================================================================================== 
++//============================================================================ 
+ static void cpp_call(
+-	cppu_unoInterfaceProxy * pThis,
+-	sal_Int32 nVtableCall,
++        bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
++        bridges::cpp_uno::shared::VtableSlot  aVtableSlot,
+ 	typelib_TypeDescriptionReference * pReturnTypeRef,
+ 	sal_Int32 nParams, typelib_MethodParameter * pParams,
+ 	void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
+@@ -313,22 +316,23 @@ static void cpp_call(
+ 	
+ 	if (pReturnTypeDescr)
+ 	{
+-		if (cppu_isSimpleType( pReturnTypeDescr ))
++		if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+ 		{
+ 			pCppReturn = pUnoReturn; // direct way for simple types
+ 		}
+ 		else
+ 		{
+ 			// complex return via ptr
+-			pCppReturn = *(void **)pCppStack = (cppu_relatesToInterface( pReturnTypeDescr )
++			pCppReturn = *(void **)pCppStack = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
+ 												? alloca( pReturnTypeDescr->nSize )
+ 												: pUnoReturn); // direct way
+                         *pPT++ = 'I'; //signify that a complex return type on stack
+ 			pCppStack += sizeof(void *);
+ 		}
+ 	}
+-	// push this
+-	*(void**)pCppStack = pThis->pCppI;
++        // push "this" pointer
++        void * pAdjustedThisPtr = reinterpret_cast< void ** >( pThis->getCppI() ) + aVtableSlot.offset;
++	*(void**)pCppStack = pAdjustedThisPtr;
+ 	pCppStack += sizeof( void* );
+         *pPT++ = 'I';
+ 
+@@ -349,10 +353,10 @@ static void cpp_call(
+ 		typelib_TypeDescription * pParamTypeDescr = 0;
+ 		TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
+ 		
+-		if (!rParam.bOut && cppu_isSimpleType( pParamTypeDescr ))
++		if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ 		{
+ 			uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
+-									&pThis->pBridge->aUno2Cpp );
++									pThis->getBridge()->getUno2Cpp() );
+ 
+ 			switch (pParamTypeDescr->eTypeClass)
+ 			{
+@@ -414,11 +418,11 @@ static void cpp_call(
+ 				ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ 			}
+ 			// is in/inout
+-			else if (cppu_relatesToInterface( pParamTypeDescr ))
++			else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
+ 			{
+ 				uno_copyAndConvertData(
+ 					*(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+-					pUnoArgs[nPos], pParamTypeDescr, &pThis->pBridge->aUno2Cpp );
++					pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
+ 				
+ 				pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
+ 				// will be released at reconversion
+@@ -444,7 +448,7 @@ static void cpp_call(
+ 	{
+ 		OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 3), "UNALIGNED STACK !!! (Please DO panic)" );
+ 		callVirtualMethod(
+-			pThis->pCppI, nVtableCall,
++			pAdjustedThisPtr, aVtableSlot.index,
+ 			pCppReturn, pReturnTypeDescr->eTypeClass, pParamType,
+ 			(sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
+ 		// NO exception occured...
+@@ -462,13 +466,13 @@ static void cpp_call(
+ 				{
+ 					uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
+ 					uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
+-											&pThis->pBridge->aCpp2Uno );
++											pThis->getBridge()->getCpp2Uno() );
+ 				}
+ 			}
+ 			else // pure out
+ 			{
+ 				uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
+-										&pThis->pBridge->aCpp2Uno );
++										pThis->getBridge()->getCpp2Uno() );
+ 			}
+ 			// destroy temp cpp param => cpp: every param was constructed
+ 			uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
+@@ -479,14 +483,16 @@ static void cpp_call(
+ 		if (pCppReturn && pUnoReturn != pCppReturn)
+ 		{
+ 			uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
+-									&pThis->pBridge->aCpp2Uno );
++									pThis->getBridge()->getCpp2Uno() );
+ 			uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
+ 		}
+ 	}
+  	catch (...)
+  	{
+   		// fill uno exception
+-		fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, &pThis->pBridge->aCpp2Uno );
++		fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, 
++			*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
++
+         
+ 		// temporary params
+ 		for ( ; nTempIndizes--; )
+@@ -501,33 +507,40 @@ static void cpp_call(
+ 			TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ 	}
+ }
++}
+ 
++namespace bridges { namespace cpp_uno { namespace shared {
+ 
+-//==================================================================================================
+-void SAL_CALL cppu_unoInterfaceProxy_dispatch(
++void unoInterfaceProxyDispatch(
+ 	uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
+-	void * pReturn, void * pArgs[], uno_Any ** ppException ) throw ()
++	void * pReturn, void * pArgs[], uno_Any ** ppException )
+ {
++#ifdef CMC_DEBUG
++	fprintf(stderr, "unoInterfaceProxyDispatch\n");
++#endif
++	
++
+ 	// is my surrogate
+-	cppu_unoInterfaceProxy * pThis = (cppu_unoInterfaceProxy *)pUnoI;
++        bridges::cpp_uno::shared::UnoInterfaceProxy * pThis 
++            = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
+ 	typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+ 	
+ 	switch (pMemberDescr->eTypeClass)
+ 	{
+ 	case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ 	{
+-		// determine vtable call index
+-		sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+-		OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
+ 		
+-		sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos];
+-		OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
++        VtableSlot aVtableSlot(
++            getVtableSlot(
++                reinterpret_cast<
++                    typelib_InterfaceAttributeTypeDescription const * >(
++                        pMemberDescr)));
+ 		
+ 		if (pReturn)
+ 		{
+ 			// dependent dispatch
+ 			cpp_call(
+-				pThis, nVtableCall,
++				pThis, aVtableSlot,
+ 				((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
+ 				0, 0, // no params
+ 				pReturn, pArgs, ppException );
+@@ -547,8 +560,9 @@ void SAL_CALL cppu_unoInterfaceProxy_dis
+ 				&pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
+ 			
+ 			// dependent dispatch
++                        aVtableSlot.index += 1; //get then set method
+ 			cpp_call(
+-				pThis, nVtableCall +1, // get, then set method
++				pThis, aVtableSlot,
+ 				pReturnTypeRef,
+ 				1, &aParam,
+ 				pReturn, pArgs, ppException );
+@@ -560,14 +574,13 @@ void SAL_CALL cppu_unoInterfaceProxy_dis
+ 	}
+ 	case typelib_TypeClass_INTERFACE_METHOD:
+ 	{
+-		// determine vtable call index
+-		sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+-		OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
+ 		
+-		sal_Int32 nVtableCall = pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos];
+-		OSL_ENSURE( nVtableCall < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
+-		
+-		switch (nVtableCall)
++        VtableSlot aVtableSlot(
++            getVtableSlot(
++                reinterpret_cast<
++                    typelib_InterfaceMethodTypeDescription const * >(
++                        pMemberDescr)));
++		switch (aVtableSlot.index)
+ 		{
+ 			// standard calls
+ 		case 1: // acquire uno interface
+@@ -585,8 +598,8 @@ void SAL_CALL cppu_unoInterfaceProxy_dis
+ 			if (pTD)
+ 			{
+                 uno_Interface * pInterface = 0;
+-                (*pThis->pBridge->pUnoEnv->getRegisteredInterface)(
+-                    pThis->pBridge->pUnoEnv,
++                (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
++                    pThis->pBridge->getUnoEnv(),
+                     (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+ 			
+                 if (pInterface)
+@@ -605,7 +618,7 @@ void SAL_CALL cppu_unoInterfaceProxy_dis
+ 		default:
+ 			// dependent dispatch
+ 			cpp_call(
+-				pThis, nVtableCall,
++				pThis, aVtableSlot,
+ 				((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
+ 				((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
+ 				((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
+@@ -626,5 +639,5 @@ void SAL_CALL cppu_unoInterfaceProxy_dis
+ 	}
+ }
+ 
+-}
+-
++} } }
++/* vi:set tabstop=4 shiftwidth=4 expandtab: */
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_sparc
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_linux_x86-64
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_macosx_intel
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_macosx_powerpc
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_netbsd_intel
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_os2_intel
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_os2_intel/defs
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_solaris_intel
+cvs diff: Diffing bridges/source/cpp_uno/gcc3_solaris_sparc
+cvs diff: Diffing bridges/source/cpp_uno/mingw_intel
+cvs diff: Diffing bridges/source/cpp_uno/msvc_win32_intel
+cvs diff: Diffing bridges/source/cpp_uno/shared
+cvs diff: Diffing bridges/source/jni_uno
+cvs diff: Diffing bridges/source/jni_uno/java
+cvs diff: Diffing bridges/source/jni_uno/java/com
+cvs diff: Diffing bridges/source/jni_uno/java/com/sun
+cvs diff: Diffing bridges/source/jni_uno/java/com/sun/star
+cvs diff: Diffing bridges/source/jni_uno/java/com/sun/star/bridges
+cvs diff: Diffing bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno
+cvs diff: Diffing bridges/source/remote
+cvs diff: Diffing bridges/source/remote/context
+cvs diff: Diffing bridges/source/remote/idl
+cvs diff: Diffing bridges/source/remote/static
+cvs diff: Diffing bridges/source/remote/urp
+cvs diff: Diffing bridges/test
+cvs diff: Diffing bridges/test/com
+cvs diff: Diffing bridges/test/com/sun
+cvs diff: Diffing bridges/test/com/sun/star
+cvs diff: Diffing bridges/test/com/sun/star/lib
+cvs diff: Diffing bridges/test/com/sun/star/lib/uno
+cvs diff: Diffing bridges/test/com/sun/star/lib/uno/bridges
+cvs diff: Diffing bridges/test/com/sun/star/lib/uno/bridges/java_remote
+cvs diff: Diffing bridges/test/inter_libs_exc
+cvs diff: Diffing bridges/test/java_uno
+cvs diff: Diffing bridges/test/java_uno/acquire
+cvs diff: Diffing bridges/test/java_uno/any
+cvs diff: Diffing bridges/test/java_uno/equals
+cvs diff: Diffing bridges/test/java_uno/nativethreadpool
+cvs diff: Diffing bridges/test/performance
+cvs diff: Diffing bridges/unotypes
+cvs diff: Diffing config_office
+Index: config_office/set_soenv.in
+===================================================================
+RCS file: /cvs/tools/config_office/set_soenv.in,v
+retrieving revision 1.174
+retrieving revision 1.174.4.1
+diff -u -u -p -b -w -B -r1.174 -r1.174.4.1
+--- config_office/set_soenv.in	27 Feb 2008 10:03:23 -0000	1.174
++++ config_office/set_soenv.in	29 Feb 2008 14:47:00 -0000	1.174.4.1
+@@ -374,7 +374,7 @@ elsif ( $platform =~ m/freebsd/ ) 
+    }
+       $INPATH         = $OUTPATH.$PROEXT;
+ } 
+-elsif ( $platform =~ m/linux-gnu/ ) 
++elsif ( $platform =~ m/linux/ ) 
+ {
+ # General Linux settings:
+       $CVER           = "C300";
+@@ -1083,7 +1083,7 @@ if ($platform =~ m/solaris/) 
+                         $ps.$JRETHREADDIR.
+                         $ps.'$SOLARVER'.$ds.'$INPATH'.$LIB;
+ }
+-elsif ($platform =~ m/linux-gnu|netbsd|osf1|freebsd|aix/)
++elsif ($platform =~ m/linux|netbsd|osf1|freebsd|aix/)
+ {  $LD_LIBRARY_PATH   = $cur_dir.
+                         $ps.'$SOLARENV'.$ds.'$INPATH'.$LIB.
+                         $ps.$JRELIBDIR.
+@@ -1125,7 +1125,7 @@ if ($platform =~ m/solaris/) 
+                         $L.$USR_DT.$LIB.
+                         $L.$USR_OPENWIN.$LIB;
+ }
+-elsif ($platform =~ m/linux-gnu|netbsd|osf1|irix|freebsd|aix/)
++elsif ($platform =~ m/linux|netbsd|osf1|irix|freebsd|aix/)
+ {
+    $SOLAREXTRALIB     = $L.$par_dir.$LIB64;
+ }
+@@ -1191,7 +1191,7 @@ if ($platform =~ m/cygwin|os2/)
+ }
+      
+ # The general environment path.
+-if ($platform =~ m/linux-gnu|netbsd|odf1|irix|freebsd|aix|solaris/)
++if ($platform =~ m/linux|netbsd|odf1|irix|freebsd|aix|solaris/)
+ {  $PATH              = $cur_dir.
+                         $ps.'$SOLARVER'.$ds.'$INPATH'.$BIN.
+                         $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN.
+@@ -1382,7 +1382,7 @@ if ($platform =~ m/solaris/) 
+                         $L_STLPORT_LIB.
+                         $L.$XLIB;
+ }
+-elsif ($platform =~ m/linux-gnu|netbasd|osf1|irix|aix|freebsd/)
++elsif ($platform =~ m/linux|netbasd|osf1|irix|aix|freebsd/)
+ {  $SOLARLIB          = $L.$par_dir.$LIB.
+                         $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB.
+                         $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
+@@ -1425,7 +1425,7 @@ $SOLARINC             = $I.$cur_dir.
+                         $I.'$SOLARENV'.$INC.
+                         $I.'$SRC_ROOT'.$ds."res";
+ 
+-if ($platform =~ m/solaris|linux-gnu|osf1|freebsd|netbsd|irix/)
++if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd|irix/)
+ {
+ $SOLARINC	     .= $STLPORT_stlport;
+ if ($platform =~ m/linux|freebsd|netbsd/)
+@@ -1443,7 +1443,7 @@ if ($platform =~ m/solaris/)
+     $temp =~ s:$COMPATH:/bin\$:;
+     $SOLARINC         .= $I.$temp.$ds."include";
+ }
+-if ($platform =~ m/linux-gnu/)
++if ($platform =~ m/linux/)
+ {
+ # This simply adds an include path, so even cases that break the FHS work
+    $SOLARINC         .= $STLPORT_inc_stlport;
+@@ -1459,7 +1459,7 @@ if ($platform =~ m/linux-gnu/)
+    		if ($platform =~ m/solaris/)
+    		{  $SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."solaris";
+    		}
+-   		elsif  ($platform =~ m/linux-gnu|osf1/)
++   		elsif  ($platform =~ m/linux|osf1/)
+    		{  $SOLARINC   .=$I.'$JAVA_HOME'.$INCLUDE.$ds."linux";
+    		}
+    		elsif ($platform =~ m/freebsd/)
+@@ -1480,7 +1480,7 @@ if ($platform =~ m/linux-gnu/)
+    		$SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."native_threads".$ds."include";
+ 	}
+     #The tail, if needed
+-    if ($platform =~ m/linux-gnu|freebsd|netbsd/)
++    if ($platform =~ m/linux|freebsd|netbsd/)
+     {  $SOLARINC  .= $I.$XINC;
+     }
+     elsif ($platform =~ m/osf1/)
+cvs diff: Diffing config_office/guw
+cvs diff: Diffing bean
+cvs diff: Diffing bean/com
+cvs diff: Diffing bean/com/sun
+cvs diff: Diffing bean/com/sun/star
+cvs diff: Diffing bean/com/sun/star/beans
+cvs diff: Diffing bean/com/sun/star/comp
+cvs diff: Diffing bean/com/sun/star/comp/beans
+cvs diff: Diffing bean/native
+cvs diff: Diffing bean/native/unix
+Index: bean/native/unix/makefile.mk
+===================================================================
+RCS file: /cvs/api/bean/native/unix/makefile.mk,v
+retrieving revision 1.9
+retrieving revision 1.9.10.1
+diff -u -u -p -b -w -B -r1.9 -r1.9.10.1
+--- bean/native/unix/makefile.mk	26 Jun 2007 17:45:46 -0000	1.9
++++ bean/native/unix/makefile.mk	29 Feb 2008 23:19:13 -0000	1.9.10.1
+@@ -30,9 +30,6 @@ SHL1LIBS=	$(SLB)$/$(TARGET).lib
+ SHL1STDLIBS=$(AWTLIB)
+ 
+ .IF "$(OS)" == "LINUX"
+-.IF "$(CPUNAME)" == "S390"
+-SHL1STDLIBS+=-lzip -lawt
+-.ENDIF
+ SHL1STDLIBS+=-lstdc++
+ .ENDIF
+ 
+cvs diff: Diffing bean/native/win32
+cvs diff: Diffing bean/prj
+cvs diff: Diffing bean/qa
+cvs diff: Diffing bean/qa/complex
+cvs diff: Diffing bean/test
+cvs diff: Diffing bean/test/applet
+cvs diff: Diffing bean/test/applet/oooapplet
+cvs diff: Diffing bean/util



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]