unoapploader.c (2e82054b) | unoapploader.c (bec0253d) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 165 unchanged lines hidden (view full) --- 174 { 175 /* Assume an old OOo 2.x installation without unoinfo: */ 176 libpath = (char *) path; 177 freeLibpath = 0; 178 } 179 180 value = getenv( ENVVARNAME ); 181 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 165 unchanged lines hidden (view full) --- 174 { 175 /* Assume an old OOo 2.x installation without unoinfo: */ 176 libpath = (char *) path; 177 freeLibpath = 0; 178 } 179 180 value = getenv( ENVVARNAME ); 181 |
182 // workaround for finding wrong libsqlite3.dylib in the office installation 183 // For MacOS > 10.6 nss uses the system lib -> unresolved symbol _sqlite3_wal_checkpoint 184#ifdef MACOSX 185 size = strlen( ENVVARNAME ) + strlen( "=/usr/lib:" ) + strlen( libpath ) + 1; 186#else |
|
182 size = strlen( ENVVARNAME ) + strlen( "=" ) + strlen( libpath ) + 1; | 187 size = strlen( ENVVARNAME ) + strlen( "=" ) + strlen( libpath ) + 1; |
188#endif |
|
183 if ( value != NULL ) 184 size += strlen( PATHSEPARATOR ) + strlen( value ); 185 envstr = (char*) malloc( size ); 186 strcpy( envstr, ENVVARNAME ); | 189 if ( value != NULL ) 190 size += strlen( PATHSEPARATOR ) + strlen( value ); 191 envstr = (char*) malloc( size ); 192 strcpy( envstr, ENVVARNAME ); |
193#ifdef MACOSX 194 strcat( envstr, "=/usr/lib:" ); 195#else |
|
187 strcat( envstr, "=" ); | 196 strcat( envstr, "=" ); |
197#endif |
|
188 strcat( envstr, libpath ); 189 if ( freeLibpath != 0 ) 190 { 191 free( libpath ); 192 } 193 if ( value != NULL ) 194 { 195 strcat( envstr, PATHSEPARATOR ); 196 strcat( envstr, value ); 197 } 198 putenv( envstr ); | 198 strcat( envstr, libpath ); 199 if ( freeLibpath != 0 ) 200 { 201 free( libpath ); 202 } 203 if ( value != NULL ) 204 { 205 strcat( envstr, PATHSEPARATOR ); 206 strcat( envstr, value ); 207 } 208 putenv( envstr ); |
209 fprintf( stderr, "DYLD_LIBRARY_PATH=%s\n", envstr ); 210 |
|
199 } 200 else 201 { | 211 } 212 else 213 { |
202 fprintf( stderr, "Warning: no UNO installation found!\n" ); | 214 fprintf( stderr, "Warning: no office installation found!\n" ); |
203 fflush( stderr ); 204 } 205 206 /* set the executable name for the application process */ 207 cmdname = createCommandName( argv[0] ); 208 argv[0] = cmdname; 209 210 /* --- 87 unchanged lines hidden --- | 215 fflush( stderr ); 216 } 217 218 /* set the executable name for the application process */ 219 cmdname = createCommandName( argv[0] ); 220 argv[0] = cmdname; 221 222 /* --- 87 unchanged lines hidden --- |