зеркало из https://github.com/mozilla/pjs.git
Mac specific fix. Checking in rjc's fix to load libraries if file spec was an alias to a library rather than the actual library file spec. Needed so XPCOM will work on Mac.
This commit is contained in:
Родитель
d3f3cfce1d
Коммит
d59873884c
|
@ -596,6 +596,8 @@ PR_LoadLibrary(const char *name)
|
|||
FSSpec fileSpec;
|
||||
PRUint32 index;
|
||||
|
||||
Boolean tempUnusedBool; // rjc
|
||||
|
||||
/* Copy the name: we'll change it */
|
||||
cMacPath = strdup(name);
|
||||
if (cMacPath == NULL)
|
||||
|
@ -646,6 +648,11 @@ PR_LoadLibrary(const char *name)
|
|||
goto unlock;
|
||||
fileSpec.parID = pb.dirInfo.ioDrDirID;
|
||||
|
||||
// resolve an alias if this was one (rjc)
|
||||
err = ResolveAliasFile(&fileSpec, true, &tempUnusedBool, &tempUnusedBool);
|
||||
if (err != noErr)
|
||||
goto unlock;
|
||||
|
||||
/* Finally, try to load the library */
|
||||
err = GetDiskFragment(&fileSpec, 0, kCFragGoesToEOF, fileSpec.name,
|
||||
kLoadCFrag, &connectionID, &main, errName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче