зеркало из https://github.com/mozilla/gecko-dev.git
Bug 480745 - Remove XP_MAC from mozilla/security. r=bsmith, sr=kaie
This commit is contained in:
Родитель
3a86b73bc5
Коммит
10a9b621f5
|
@ -1657,14 +1657,9 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
|
|||
else
|
||||
{
|
||||
|
||||
// XP_MAC == CFM
|
||||
// XP_MACOSX == MachO
|
||||
|
||||
#if defined(XP_MAC) && defined(XP_MACOSX)
|
||||
#error "This code assumes XP_MAC and XP_MACOSX will never be defined at the same time"
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) || defined(XP_MACOSX)
|
||||
#if defined(XP_MACOSX)
|
||||
// On Mac CFM we place all NSS DBs in the Security
|
||||
// Folder in the profile directory.
|
||||
nsCOMPtr<nsIFile> cfmSecurityPath;
|
||||
|
@ -1672,11 +1667,7 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
|
|||
cfmSecurityPath->AppendNative(NS_LITERAL_CSTRING("Security"));
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC)
|
||||
// on CFM, cfmSecurityPath and profilePath point to the same oject
|
||||
profilePath->Create(nsIFile::DIRECTORY_TYPE, 0); //This is for Mac, don't worry about
|
||||
//permissions.
|
||||
#elif defined(XP_MACOSX)
|
||||
#ifdef defined(XP_MACOSX)
|
||||
// On MachO, we need to access both directories,
|
||||
// and therefore need separate nsIFile instances.
|
||||
// Keep cfmSecurityPath instance, obtain new instance for MachO profilePath.
|
||||
|
|
|
@ -52,9 +52,5 @@ pip_ucs2_ascii_conversion_fn(PRBool toUnicode,
|
|||
nsresult
|
||||
setPassword(PK11SlotInfo *slot, nsIInterfaceRequestor *ctx);
|
||||
|
||||
#ifdef XP_MAC
|
||||
extern OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -581,29 +581,6 @@ nsPKCS12Blob::inputToDecoder(SEC_PKCS12DecoderContext *dcx, nsIFile *file)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_MAC
|
||||
|
||||
OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath)
|
||||
{
|
||||
int 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
|
||||
|
||||
//
|
||||
// C callback methods
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче