Kaydet (Commit) 795aa222 authored tarafından Yuri Dario's avatar Yuri Dario

i118923 - OS/2 port: fix change of local LIBPATH.

üst 3d5352e1
...@@ -54,10 +54,14 @@ int main( int argc, char* argv[]) ...@@ -54,10 +54,14 @@ int main( int argc, char* argv[])
DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName); DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName);
// adjust libpath // adjust libpath
#if OSL_DEBUG_LEVEL > 0
rc = DosQueryExtLIBPATH( (PSZ)szLibpath, BEGIN_LIBPATH);
fprintf( stderr, "1 BeginLibPath: %s\n", szLibpath);
#endif
_splitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
char* basedir = strstr( szDir, "\\PROGRAM\\"); char* basedir = strstr( szDir, "\\PROGRAM\\");
if (basedir) *basedir = 0; if (basedir) *basedir = 0;
sprintf( szLibpath, "\"%s%s\\URE\\BIN\";\"%s%s\\BASIS\\PROGRAM\";%BeginLIBPATH%", sprintf( szLibpath, "\"%s%s\\URE\\BIN\";\"%s%s\\BASIS\\PROGRAM\";%%BeginLIBPATH%%;",
szDrive, szDir, szDrive, szDir); szDrive, szDir, szDrive, szDir);
DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH); DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
// make sure we load DLL from our path only, so multiple instances/versions // make sure we load DLL from our path only, so multiple instances/versions
...@@ -67,6 +71,10 @@ int main( int argc, char* argv[]) ...@@ -67,6 +71,10 @@ int main( int argc, char* argv[])
// java cannot load with this flag enabled // java cannot load with this flag enabled
DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT); DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
#endif #endif
#if OSL_DEBUG_LEVEL > 0
rc = DosQueryExtLIBPATH( (PSZ)szLibpath, BEGIN_LIBPATH);
fprintf( stderr, "2 BeginLibPath: %s\n", szLibpath);
#endif
// adjust exe name // adjust exe name
_splitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment