diff options
author | Maho Nakata <maho@FreeBSD.org> | 2007-01-05 04:19:23 +0000 |
---|---|---|
committer | Maho Nakata <maho@FreeBSD.org> | 2007-01-05 04:19:23 +0000 |
commit | c7d0a9b5a72cee6856335b0af2c6daac8d66d530 (patch) | |
tree | 1f0a6cbb025e29306c3df354bdc9b956f2533a25 /editors/openoffice-3-devel/files/rtld-workaround-i66667 | |
parent | 2f6310c437afb701d831df988865b394285388f5 (diff) | |
download | ports-c7d0a9b5a72cee6856335b0af2c6daac8d66d530.tar.gz ports-c7d0a9b5a72cee6856335b0af2c6daac8d66d530.zip |
The rtld behaviour of FreeBSD >=700022 is now same as Solaris, and
workaround is pushed into rtld-workaround-i66667.
Submitted by: jkim
Notes
Notes:
svn path=/head/; revision=181467
Diffstat (limited to 'editors/openoffice-3-devel/files/rtld-workaround-i66667')
-rw-r--r-- | editors/openoffice-3-devel/files/rtld-workaround-i66667 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/editors/openoffice-3-devel/files/rtld-workaround-i66667 b/editors/openoffice-3-devel/files/rtld-workaround-i66667 new file mode 100644 index 000000000000..26c0b1b4a88c --- /dev/null +++ b/editors/openoffice-3-devel/files/rtld-workaround-i66667 @@ -0,0 +1,55 @@ +Index: vcl/unx/gtk/app/gtkinst.cxx +=================================================================== +RCS file: /cvs/gsl/vcl/unx/gtk/app/gtkinst.cxx,v +retrieving revision 1.14 +diff -u -r1.14 gtkinst.cxx +--- vcl/unx/gtk/app/gtkinst.cxx 19 Jun 2006 19:44:33 -0000 1.14 ++++ vcl/unx/gtk/app/gtkinst.cxx 27 Jun 2006 02:11:09 -0000 +@@ -43,6 +43,7 @@ + #include <plugins/gtk/atkbridge.hxx> + + #include <rtl/strbuf.hxx> ++#include <rtl/ustrbuf.hxx> + + #if OSL_DEBUG_LEVEL > 1 + #include <stdio.h> +@@ -111,13 +112,27 @@ + GtkHookedYieldMutex *pYieldMutex = GET_YIELD_MUTEX(); + pYieldMutex->ThreadsLeave(); + } +- static bool hookLocks( oslModule pModule ) ++ static bool hookLocks( void ) + { +- typedef void (*GdkLockFn) (GCallback enter_fn, GCallback leave_fn); ++ typedef void (*GdkLockFn) ( GCallback enter_fn, GCallback leave_fn ); + rtl::OUString aSymbolName( RTL_CONSTASCII_USTRINGPARAM( "gdk_threads_set_lock_functions") ); + ++ /* XXX GDK library path should be set by configure. */ ++ OUStringBuffer aModName( 128 ); ++ aModName.appendAscii( SAL_DLLPREFIX"gdk-x11-2.0" ); ++ aModName.appendAscii( SAL_DLLEXTENSION ); ++ OUString aModule = aModName.makeStringAndClear(); ++ oslModule aMod = osl_loadModule( aModule.pData, SAL_LOADMODULE_DEFAULT ); ++ ++ if ( !aMod ) ++ { ++#if OSL_DEBUG_LEVEL > 1 ++ fprintf( stderr, "Failed to load "SAL_DLLPREFIX"gdk-x11-2.0"SAL_DLLEXTENSION"\n" ); ++#endif ++ return false; ++ } + GdkLockFn gdk_threads_set_lock_functions = +- (GdkLockFn) osl_getFunctionSymbol( pModule, aSymbolName.pData ); ++ (GdkLockFn) osl_getFunctionSymbol( aMod, aSymbolName.pData ); + if ( !gdk_threads_set_lock_functions ) + { + #if OSL_DEBUG_LEVEL > 1 +@@ -150,7 +165,7 @@ + if ( !g_thread_supported() ) + g_thread_init( NULL ); + +- if ( hookLocks( pModule ) ) ++ if ( hookLocks() ) + pYieldMutex = new GtkHookedYieldMutex(); + else + pYieldMutex = new GtkYieldMutex(); |