Changeset 18244 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 25, 2009 10:07:16 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44970
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/VBoxXPCOMCGlue.c
r18241 r18244 32 32 * Header Files * 33 33 *******************************************************************************/ 34 #ifdef LIBVIRT_VERSION 35 # include <config.h> 36 #endif /* LIBVIRT_VERSION */ 37 34 38 #include <stdio.h> 35 39 #include <string.h> … … 79 83 size_t cbReq; 80 84 char szBuf[4096]; 81 char * pszBuf;82 85 int rc = -1; 83 86 … … 91 94 return -1; 92 95 } 93 if (pszHome) 94 { 95 memcpy(pszBuf, pszHome, cchHome); 96 pszBuf[cchHome] = '/'; 97 cchHome++; 98 } 99 memcpy(&pszBuf[cchHome], DYNLIB_NAME, sizeof(DYNLIB_NAME)); 96 memcpy(szBuf, pszHome, cchHome); 97 szBuf[cchHome] = '/'; 98 cchHome++; 99 memcpy(&szBuf[cchHome], DYNLIB_NAME, sizeof(DYNLIB_NAME)); 100 100 101 101 /* … … 104 104 */ 105 105 setenv("VBOX_APP_HOME", pszHome, 0 /* no need to overwrite */); 106 g_hVBoxXPCOMC = dlopen( pszBuf, RTLD_NOW | RTLD_LOCAL);106 g_hVBoxXPCOMC = dlopen(szBuf, RTLD_NOW | RTLD_LOCAL); 107 107 if (g_hVBoxXPCOMC) 108 108 { … … 120 120 else 121 121 sprintf(g_szVBoxErrMsg, "%.80s: pfnGetFunctions(%#x) failed", 122 pszBuf, VBOX_XPCOMC_VERSION);122 szBuf, VBOX_XPCOMC_VERSION); 123 123 } 124 124 else 125 125 sprintf(g_szVBoxErrMsg, "dlsym(%.80s/%.32s): %128s", 126 pszBuf, VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME, dlerror());126 szBuf, VBOX_GET_XPCOMC_FUNCTIONS_SYMBOL_NAME, dlerror()); 127 127 if (rc != 0) 128 128 { … … 132 132 } 133 133 else 134 sprintf(g_szVBoxErrMsg, "dlopen(%.80s): %128s", pszBuf, dlerror());134 sprintf(g_szVBoxErrMsg, "dlopen(%.80s): %128s", szBuf, dlerror()); 135 135 return rc; 136 136 }
Note:
See TracChangeset
for help on using the changeset viewer.