зеркало из https://github.com/mozilla/gecko-dev.git
I couldn't figure out why the ConvertMacPathToUnixPath symbol is no longer exported by the NSPR library, so we'll include our implementation in the meantime.
This commit is contained in:
Родитель
b8986c4568
Коммит
2b19fc9918
|
@ -53,6 +53,26 @@ static nsIStringBundle* gPIPNSSBundle = nsnull;
|
|||
|
||||
#ifdef XP_MAC
|
||||
extern OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath);
|
||||
|
||||
OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath)
|
||||
{
|
||||
PRIntn len;
|
||||
char *cursor;
|
||||
|
||||
len = PL_strlen(macPath);
|
||||
cursor = (char*)PR_Malloc(len+2);
|
||||
if (!cursor)
|
||||
return memFullErr;
|
||||
|
||||
memcpy(cursor+1, macPath, len+1);
|
||||
*unixPath = cursor;
|
||||
*cursor = '/';
|
||||
while ((cursor = PL_strchr(cursor, ':')) != NULL) {
|
||||
*cursor = '/';
|
||||
cursor++;
|
||||
}
|
||||
return noErr;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void InitializePIPNSSBundle();
|
||||
|
|
Загрузка…
Ссылка в новой задаче