VirtualBox

vbox的更動 960 路徑 trunk/src/libs/xpcom18a4/xpcom


忽略:
時間撮記:
2007-2-17 上午09:12:10 (18 年 以前)
作者:
vboxsync
訊息:

Darwin hacking.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/libs/xpcom18a4/xpcom/glue/standalone/nsXPCOMGlue.cpp

    r1 r960  
    111111
    112112        xpcomLib = PR_LoadLibraryWithFlags(libSpec, PR_LD_LAZY|PR_LD_GLOBAL);
     113#ifdef __DARWIN__
     114        /* works around bundle problem. */
     115        if (!xpcomLib) {
     116            const char *home = PR_GetEnv("VBOX_XPCOM_HOME");
     117            if (home) {
     118                char path[PATH_MAX];
     119                snprintf(path, sizeof(path), "%s/%s", home, libSpec.value.pathname);
     120                libSpec.value.pathname = path;
     121                xpcomLib = PR_LoadLibraryWithFlags(libSpec, PR_LD_LAZY|PR_LD_GLOBAL);
     122            }
     123        }
     124#endif
    113125        if (!xpcomLib)
    114126            return NS_ERROR_FAILURE;
     
    162174        xpcomLib = nsnull;
    163175    }
    164    
     176
    165177    memset(&xpcomFunctions, 0, sizeof(xpcomFunctions));
    166178    return NS_OK;
     
    170182#ifndef XPCOM_GLUE_NO_DYNAMIC_LOADING
    171183extern "C" NS_COM nsresult
    172 NS_InitXPCOM2(nsIServiceManager* *result, 
     184NS_InitXPCOM2(nsIServiceManager* *result,
    173185              nsIFile* binDirectory,
    174186              nsIDirectoryServiceProvider* appFileLocationProvider)
     
    442454      }
    443455  }
    444                  
     456
    445457#if XP_WIN32
    446   // On windows, the current directory is searched before the 
    447   // PATH environment variable.  This is a very bad thing 
     458  // On windows, the current directory is searched before the
     459  // PATH environment variable.  This is a very bad thing
    448460  // since libraries in the cwd will be picked up before
    449461  // any that are in either the application or GRE directory.
     
    465477    // Startup the XPCOM Glue that links us up with XPCOM.
    466478    nsresult rv = XPCOMGlueStartup(xpcomLocation);
    467    
     479
    468480    if (NS_FAILED(rv)) {
    469481        NS_WARNING("gre: XPCOMGlueStartup failed");
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette