You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by js...@apache.org on 2013/06/11 17:00:40 UTC

svn commit: r1491822 - /openoffice/trunk/main/odk/source/unoapploader/unx/unoapploader.c

Author: jsc
Date: Tue Jun 11 15:00:40 2013
New Revision: 1491822

URL: http://svn.apache.org/r1491822
Log:
#122483# correct library path

Modified:
    openoffice/trunk/main/odk/source/unoapploader/unx/unoapploader.c

Modified: openoffice/trunk/main/odk/source/unoapploader/unx/unoapploader.c
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/odk/source/unoapploader/unx/unoapploader.c?rev=1491822&r1=1491821&r2=1491822&view=diff
==============================================================================
--- openoffice/trunk/main/odk/source/unoapploader/unx/unoapploader.c (original)
+++ openoffice/trunk/main/odk/source/unoapploader/unx/unoapploader.c Tue Jun 11 15:00:40 2013
@@ -179,12 +179,22 @@ int main( int argc, char *argv[] )
 
         value = getenv( ENVVARNAME );
 
+        // workaround for finding wrong libsqlite3.dylib in the office installation
+        // For MacOS > 10.6 nss uses the system lib -> unresolved symbol _sqlite3_wal_checkpoint
+#ifdef MACOSX
+        size = strlen( ENVVARNAME ) + strlen( "=/usr/lib:" ) + strlen( libpath ) + 1;
+#else
         size = strlen( ENVVARNAME ) + strlen( "=" ) + strlen( libpath ) + 1;
+#endif
 		if ( value != NULL )
             size += strlen( PATHSEPARATOR ) + strlen( value );
 		envstr = (char*) malloc( size );
         strcpy( envstr, ENVVARNAME );
+#ifdef MACOSX
+        strcat( envstr, "=/usr/lib:" );
+#else
         strcat( envstr, "=" );
+#endif        
         strcat( envstr, libpath );
         if ( freeLibpath != 0 )
         {
@@ -196,10 +206,12 @@ int main( int argc, char *argv[] )
             strcat( envstr, value );
 		}
         putenv( envstr );
+        fprintf( stderr, "DYLD_LIBRARY_PATH=%s\n", envstr );
+ 
     }
     else
     {
-        fprintf( stderr, "Warning: no UNO installation found!\n" );
+        fprintf( stderr, "Warning: no office installation found!\n" );
         fflush( stderr );
     }