Bug 480745 - Remove XP_MAC from mozilla/security. r=bsmith, sr=kaie

This commit is contained in:
Ludovic Hirlimann 2012-08-16 17:35:19 -04:00
parent 2dc86e8608
commit 23b07d64df
3 changed files with 2 additions and 38 deletions

View File

@ -1657,14 +1657,9 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
else else
{ {
// XP_MAC == CFM
// XP_MACOSX == MachO // XP_MACOSX == MachO
#if defined(XP_MAC) && defined(XP_MACOSX) #if 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)
// On Mac CFM we place all NSS DBs in the Security // On Mac CFM we place all NSS DBs in the Security
// Folder in the profile directory. // Folder in the profile directory.
nsCOMPtr<nsIFile> cfmSecurityPath; nsCOMPtr<nsIFile> cfmSecurityPath;
@ -1672,11 +1667,7 @@ nsNSSComponent::InitializeNSS(bool showWarningBox)
cfmSecurityPath->AppendNative(NS_LITERAL_CSTRING("Security")); cfmSecurityPath->AppendNative(NS_LITERAL_CSTRING("Security"));
#endif #endif
#if defined(XP_MAC) #ifdef defined(XP_MACOSX)
// 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)
// On MachO, we need to access both directories, // On MachO, we need to access both directories,
// and therefore need separate nsIFile instances. // and therefore need separate nsIFile instances.
// Keep cfmSecurityPath instance, obtain new instance for MachO profilePath. // Keep cfmSecurityPath instance, obtain new instance for MachO profilePath.

View File

@ -52,9 +52,5 @@ pip_ucs2_ascii_conversion_fn(PRBool toUnicode,
nsresult nsresult
setPassword(PK11SlotInfo *slot, nsIInterfaceRequestor *ctx); setPassword(PK11SlotInfo *slot, nsIInterfaceRequestor *ctx);
#ifdef XP_MAC
extern OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath);
#endif
#endif #endif

View File

@ -581,29 +581,6 @@ nsPKCS12Blob::inputToDecoder(SEC_PKCS12DecoderContext *dcx, nsIFile *file)
return NS_OK; 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 // C callback methods
// //