Author: pfg
Date: Thu Jun 28 01:56:56 2012
New Revision: 1354794
URL: http://svn.apache.org/viewvc?rev=1354794&view=rev
Log:
Merge r1337261 - Fix build of FreeBSD i386 bridge with USE_DOUBLE_MMAP.
Modified:
incubator/ooo/symphony/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
Modified:
incubator/ooo/symphony/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
URL:
http://svn.apache.org/viewvc/incubator/ooo/symphony/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx?rev=1354794&r1=1354793&r2=1354794&view=diff
==============================================================================
---
incubator/ooo/symphony/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
(original)
+++
incubator/ooo/symphony/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
Thu Jun 28 01:56:56 2012
@@ -362,7 +362,7 @@ extern "C" typedef void (*PrivateSnippet
int const codeSnippetSize = 16;
unsigned char * codeSnippet(
- unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
+ unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32
functionIndex, sal_Int32 vtableOffset,
typelib_TypeClass returnTypeClass)
{
if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass)) {
@@ -408,7 +408,7 @@ unsigned char * codeSnippet(
// jmp privateSnippetExecutor:
*p++ = 0xE9;
*reinterpret_cast< sal_Int32 * >(p)
- = ((unsigned char *) exec) - p - sizeof (sal_Int32);
+ = ((unsigned char *) exec) - p - sizeof (sal_Int32) - writetoexecdiff;
p += sizeof (sal_Int32);
OSL_ASSERT(p - code <= codeSnippetSize);
return code + codeSnippetSize;
@@ -441,7 +441,7 @@ bridges::cpp_uno::shared::VtableFactory:
}
unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- Slot ** slots, unsigned char * code,
+ Slot ** slots, unsigned char * code, sal_PtrDiff writetoexecdiff,
typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
sal_Int32 functionCount, sal_Int32 vtableOffset)
{
@@ -454,9 +454,9 @@ unsigned char * bridges::cpp_uno::shared
switch (member->eTypeClass) {
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
// Getter:
- (s++)->fn = code;
+ (s++)->fn = code + writetoexecdiff;
code = codeSnippet(
- code, functionOffset++, vtableOffset,
+ code, writetoexecdiff, functionOffset++, vtableOffset,
reinterpret_cast< typelib_InterfaceAttributeTypeDescription *
>(
member)->pAttributeTypeRef->eTypeClass);
// Setter:
@@ -464,17 +464,17 @@ unsigned char * bridges::cpp_uno::shared
typelib_InterfaceAttributeTypeDescription * >(
member)->bReadOnly)
{
- (s++)->fn = code;
+ (s++)->fn = code + writetoexecdiff;
code = codeSnippet(
- code, functionOffset++, vtableOffset,
+ code, writetoexecdiff, functionOffset++, vtableOffset,
typelib_TypeClass_VOID);
}
break;
case typelib_TypeClass_INTERFACE_METHOD:
- (s++)->fn = code;
+ (s++)->fn = code + writetoexecdiff;
code = codeSnippet(
- code, functionOffset++, vtableOffset,
+ code, writetoexecdiff, functionOffset++, vtableOffset,
reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
member)->pReturnTypeRef->eTypeClass);
break;