Bug 789847 - Remove PR_CALLBACK usage from tree
authorIsaac Aggrey <isaac.aggrey@gmail.com>
Tue, 25 Sep 2012 11:18:38 -0500
changeset 108268 b13571ca268d80be7ef1b4a6e279a15fdd37f280
parent 108267 be63bddab58b180d875089af902f5aacdd7216d9
child 108269 8fc98a70f97a5f3a91e08d133660d49793e48e66
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
bugs789847
milestone18.0a1
Bug 789847 - Remove PR_CALLBACK usage from tree
content/smil/nsSMILAnimationController.cpp
content/smil/nsSMILTimedElement.cpp
gfx/thebes/gfxPlatformFontList.cpp
modules/libpref/public/Preferences.h
security/manager/ssl/src/nsCertOverrideService.h
security/manager/ssl/src/nsCrypto.cpp
security/manager/ssl/src/nsIdentityChecking.cpp
security/manager/ssl/src/nsKeygenThread.cpp
security/manager/ssl/src/nsNSSCallbacks.cpp
security/manager/ssl/src/nsNSSCallbacks.h
security/manager/ssl/src/nsNSSCertificateDB.cpp
security/manager/ssl/src/nsNSSComponent.cpp
security/manager/ssl/src/nsNSSComponent.h
security/manager/ssl/src/nsNSSIOLayer.cpp
security/manager/ssl/src/nsNSSShutDown.cpp
security/manager/ssl/src/nsNSSShutDown.h
security/manager/ssl/src/nsPKCS12Blob.cpp
security/manager/ssl/src/nsPKCS12Blob.h
security/manager/ssl/src/nsPSMBackgroundThread.cpp
security/manager/ssl/src/nsPSMBackgroundThread.h
security/manager/ssl/src/nsProtectedAuthThread.cpp
security/manager/ssl/src/nsSmartCardMonitor.cpp
testing/mochitest/ssltunnel/ssltunnel.cpp
widget/gtk2/nsCUPSShim.h
xpcom/threads/nsProcess.h
xpcom/threads/nsProcessCommon.cpp
--- a/content/smil/nsSMILAnimationController.cpp
+++ b/content/smil/nsSMILAnimationController.cpp
@@ -208,17 +208,17 @@ nsSMILAnimationController::Traverse(
 {
   // Traverse last compositor table
   if (mLastCompositorTable) {
     mLastCompositorTable->EnumerateEntries(CompositorTableEntryTraverse,
                                            aCallback);
   }
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::CompositorTableEntryTraverse(
                                       nsSMILCompositor* aCompositor,
                                       void* aArg)
 {
   nsCycleCollectionTraversalCallback* cb =
     static_cast<nsCycleCollectionTraversalCallback*>(aArg);
   aCompositor->Traverse(cb);
   return PL_DHASH_NEXT;
@@ -298,51 +298,51 @@ nsSMILAnimationController::MaybeStartSam
   } else {
     mDeferredStartSampling = true;
   }
 }
 
 //----------------------------------------------------------------------
 // Sample-related methods and callbacks
 
-PR_CALLBACK PLDHashOperator
+PLDHashOperator
 TransferCachedBaseValue(nsSMILCompositor* aCompositor,
                         void* aData)
 {
   nsSMILCompositorTable* lastCompositorTable =
     static_cast<nsSMILCompositorTable*>(aData);
   nsSMILCompositor* lastCompositor =
     lastCompositorTable->GetEntry(aCompositor->GetKey());
 
   if (lastCompositor) {
     aCompositor->StealCachedBaseValue(lastCompositor);
   }
 
   return PL_DHASH_NEXT;  
 }
 
-PR_CALLBACK PLDHashOperator
+PLDHashOperator
 RemoveCompositorFromTable(nsSMILCompositor* aCompositor,
                           void* aData)
 {
   nsSMILCompositorTable* lastCompositorTable =
     static_cast<nsSMILCompositorTable*>(aData);
   lastCompositorTable->RemoveEntry(aCompositor->GetKey());
   return PL_DHASH_NEXT;
 }
 
-PR_CALLBACK PLDHashOperator
+PLDHashOperator
 DoClearAnimationEffects(nsSMILCompositor* aCompositor,
                         void* /*aData*/)
 {
   aCompositor->ClearAnimationEffects();
   return PL_DHASH_NEXT;
 }
 
-PR_CALLBACK PLDHashOperator
+PLDHashOperator
 DoComposeAttribute(nsSMILCompositor* aCompositor,
                    void* /*aData*/)
 {
   aCompositor->ComposeAttribute();
   return PL_DHASH_NEXT;
 }
 
 void
@@ -462,47 +462,47 @@ nsSMILAnimationController::RewindElement
   mChildContainerTable.EnumerateEntries(RewindNeeded, &rewindNeeded);
   if (!rewindNeeded)
     return;
 
   mAnimationElementTable.EnumerateEntries(RewindAnimation, nullptr);
   mChildContainerTable.EnumerateEntries(ClearRewindNeeded, nullptr);
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::RewindNeeded(TimeContainerPtrKey* aKey,
                                         void* aData)
 {
   NS_ABORT_IF_FALSE(aData,
       "Null data pointer during time container enumeration");
   bool* rewindNeeded = static_cast<bool*>(aData);
 
   nsSMILTimeContainer* container = aKey->GetKey();
   if (container->NeedsRewind()) {
     *rewindNeeded = true;
     return PL_DHASH_STOP;
   }
 
   return PL_DHASH_NEXT;
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::RewindAnimation(AnimationElementPtrKey* aKey,
                                            void* aData)
 {
   nsISMILAnimationElement* animElem = aKey->GetKey();
   nsSMILTimeContainer* timeContainer = animElem->GetTimeContainer();
   if (timeContainer && timeContainer->NeedsRewind()) {
     animElem->TimedElement().Rewind();
   }
 
   return PL_DHASH_NEXT;
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::ClearRewindNeeded(TimeContainerPtrKey* aKey,
                                              void* aData)
 {
   aKey->GetKey()->ClearNeedsRewind();
   return PL_DHASH_NEXT;
 }
 
 void
@@ -577,17 +577,17 @@ nsSMILAnimationController::DoMilestoneSa
         elem->TimedElement().SampleEndAt(containerTime);
       } else {
         elem->TimedElement().SampleAt(containerTime);
       }
     }
   }
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::GetNextMilestone(TimeContainerPtrKey* aKey,
                                             void* aData)
 {
   NS_ABORT_IF_FALSE(aKey, "Null hash key for time container hash table");
   NS_ABORT_IF_FALSE(aKey->GetKey(), "Null time container key in hash table");
   NS_ABORT_IF_FALSE(aData,
       "Null data pointer during time container enumeration");
 
@@ -602,17 +602,17 @@ nsSMILAnimationController::GetNextMilest
     container->GetNextMilestoneInParentTime(thisMilestone);
   if (didGetMilestone && thisMilestone < *nextMilestone) {
     *nextMilestone = thisMilestone;
   }
 
   return PL_DHASH_NEXT;
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::GetMilestoneElements(TimeContainerPtrKey* aKey,
                                                 void* aData)
 {
   NS_ABORT_IF_FALSE(aKey, "Null hash key for time container hash table");
   NS_ABORT_IF_FALSE(aKey->GetKey(), "Null time container key in hash table");
   NS_ABORT_IF_FALSE(aData,
       "Null data pointer during time container enumeration");
 
@@ -624,17 +624,17 @@ nsSMILAnimationController::GetMilestoneE
     return PL_DHASH_NEXT;
 
   container->PopMilestoneElementsAtMilestone(params->mMilestone,
                                              params->mElements);
 
   return PL_DHASH_NEXT;
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::SampleTimeContainer(TimeContainerPtrKey* aKey,
                                                void* aData)
 {
   NS_ENSURE_TRUE(aKey, PL_DHASH_NEXT);
   NS_ENSURE_TRUE(aKey->GetKey(), PL_DHASH_NEXT);
   NS_ENSURE_TRUE(aData, PL_DHASH_NEXT);
 
   SampleTimeContainerParams* params =
@@ -647,17 +647,17 @@ nsSMILAnimationController::SampleTimeCon
     container->Sample();
     container->MarkSeekFinished();
     params->mActiveContainers->PutEntry(container);
   }
 
   return PL_DHASH_NEXT;
 }
 
-/*static*/ PR_CALLBACK PLDHashOperator
+/*static*/ PLDHashOperator
 nsSMILAnimationController::SampleAnimation(AnimationElementPtrKey* aKey,
                                            void* aData)
 {
   NS_ENSURE_TRUE(aKey, PL_DHASH_NEXT);
   NS_ENSURE_TRUE(aKey->GetKey(), PL_DHASH_NEXT);
   NS_ENSURE_TRUE(aData, PL_DHASH_NEXT);
 
   nsISMILAnimationElement* animElem = aKey->GetKey();
--- a/content/smil/nsSMILTimedElement.cpp
+++ b/content/smil/nsSMILTimedElement.cpp
@@ -2313,17 +2313,17 @@ nsSMILTimedElement::AreEndTimesDependent
     }
   }
   return true;
 }
 
 //----------------------------------------------------------------------
 // Hashtable callback functions
 
-/* static */ PR_CALLBACK PLDHashOperator
+/* static */ PLDHashOperator
 nsSMILTimedElement::NotifyNewIntervalCallback(TimeValueSpecPtrKey* aKey,
                                               void* aData)
 {
   NS_ABORT_IF_FALSE(aKey, "Null hash key for time container hash table");
   NS_ABORT_IF_FALSE(aKey->GetKey(),
                     "null nsSMILTimeValueSpec in set of time dependents");
 
   NotifyTimeDependentsParams* params =
--- a/gfx/thebes/gfxPlatformFontList.cpp
+++ b/gfx/thebes/gfxPlatformFontList.cpp
@@ -202,17 +202,17 @@ gfxPlatformFontList::InitOtherFamilyName
 {
     mOtherFamilyNamesInitialized = true;
 
     Telemetry::AutoTimer<Telemetry::FONTLIST_INITOTHERFAMILYNAMES> timer;
     // iterate over all font families and read in other family names
     mFontFamilies.Enumerate(gfxPlatformFontList::InitOtherFamilyNamesProc, this);
 }
                                                          
-PLDHashOperator PR_CALLBACK
+PLDHashOperator
 gfxPlatformFontList::InitOtherFamilyNamesProc(nsStringHashKey::KeyType aKey,
                                               nsRefPtr<gfxFontFamily>& aFamilyEntry,
                                               void* userArg)
 {
     gfxPlatformFontList *fc = static_cast<gfxPlatformFontList*>(userArg);
     aFamilyEntry->ReadOtherFamilyNames(fc);
     return PL_DHASH_NEXT;
 }
@@ -222,17 +222,17 @@ gfxPlatformFontList::InitFaceNameLists()
 {
     mFaceNamesInitialized = true;
 
     // iterate over all font families and read in other family names
     Telemetry::AutoTimer<Telemetry::FONTLIST_INITFACENAMELISTS> timer;
     mFontFamilies.Enumerate(gfxPlatformFontList::InitFaceNameListsProc, this);
 }
 
-PLDHashOperator PR_CALLBACK
+PLDHashOperator
 gfxPlatformFontList::InitFaceNameListsProc(nsStringHashKey::KeyType aKey,
                                            nsRefPtr<gfxFontFamily>& aFamilyEntry,
                                            void* userArg)
 {
     gfxPlatformFontList *fc = static_cast<gfxPlatformFontList*>(userArg);
     aFamilyEntry->ReadFaceNames(fc, fc->NeedFullnamePostscriptNames());
     return PL_DHASH_NEXT;
 }
@@ -303,17 +303,17 @@ struct FontListData {
                  nsTArray<nsString>& aListOfFonts) :
         mLangGroup(aLangGroup), mGenericFamily(aGenericFamily),
         mListOfFonts(aListOfFonts) {}
     nsIAtom *mLangGroup;
     const nsACString& mGenericFamily;
     nsTArray<nsString>& mListOfFonts;
 };
 
-PLDHashOperator PR_CALLBACK
+PLDHashOperator
 gfxPlatformFontList::HashEnumFuncForFamilies(nsStringHashKey::KeyType aKey,
                                              nsRefPtr<gfxFontFamily>& aFamilyEntry,
                                              void *aUserArg)
 {
     FontListData *data = static_cast<FontListData*>(aUserArg);
 
     // use the first variation for now.  This data should be the same
     // for all the variations and should probably be moved up to
@@ -353,19 +353,19 @@ gfxPlatformFontList::GetFontList(nsIAtom
     aListOfFonts.Compact();
 }
 
 struct FontFamilyListData {
     FontFamilyListData(nsTArray<nsRefPtr<gfxFontFamily> >& aFamilyArray) 
         : mFamilyArray(aFamilyArray)
     {}
 
-    static PLDHashOperator PR_CALLBACK AppendFamily(nsStringHashKey::KeyType aKey,
-                                                    nsRefPtr<gfxFontFamily>& aFamilyEntry,
-                                                    void *aUserArg)
+    static PLDHashOperator AppendFamily(nsStringHashKey::KeyType aKey,
+                                        nsRefPtr<gfxFontFamily>& aFamilyEntry,
+                                        void *aUserArg)
     {
         FontFamilyListData *data = static_cast<FontFamilyListData*>(aUserArg);
         data->mFamilyArray.AppendElement(aFamilyEntry);
         return PL_DHASH_NEXT;
     }
 
     nsTArray<nsRefPtr<gfxFontFamily> >& mFamilyArray;
 };
@@ -456,17 +456,17 @@ gfxPlatformFontList::SystemFindFontForCh
 
     // track the script for which fallback occurred (incremented one make it
     // 1-based)
     Telemetry::Accumulate(Telemetry::SYSTEM_FONT_FALLBACK_SCRIPT, aRunScript + 1);
 
     return fontEntry;
 }
 
-PLDHashOperator PR_CALLBACK 
+PLDHashOperator 
 gfxPlatformFontList::FindFontForCharProc(nsStringHashKey::KeyType aKey, nsRefPtr<gfxFontFamily>& aFamilyEntry,
      void *userArg)
 {
     GlobalFontMatch *data = static_cast<GlobalFontMatch*>(userArg);
  
      // evaluate all fonts in this family for a match
      aFamilyEntry->FindFontForChar(data);
 
--- a/modules/libpref/public/Preferences.h
+++ b/modules/libpref/public/Preferences.h
@@ -20,17 +20,17 @@
 
 class nsIFile;
 class nsCString;
 class nsString;
 class nsAdoptingString;
 class nsAdoptingCString;
 
 #ifndef have_PrefChangedFunc_typedef
-typedef int (*PR_CALLBACK PrefChangedFunc)(const char *, void *);
+typedef int (*PrefChangedFunc)(const char *, void *);
 #define have_PrefChangedFunc_typedef
 #endif
 
 namespace mozilla {
 
 namespace dom {
 class PrefSetting;
 }
--- a/security/manager/ssl/src/nsCertOverrideService.h
+++ b/security/manager/ssl/src/nsCertOverrideService.h
@@ -137,18 +137,18 @@ public:
 
   nsCertOverrideService();
   ~nsCertOverrideService();
 
   nsresult Init();
   void RemoveAllTemporaryOverrides();
 
   typedef void 
-  (*PR_CALLBACK CertOverrideEnumerator)(const nsCertOverride &aSettings,
-                                        void *aUserData);
+  (*CertOverrideEnumerator)(const nsCertOverride &aSettings,
+                            void *aUserData);
 
   // aCert == null: return all overrides
   // aCert != null: return overrides that match the given cert
   nsresult EnumerateCertOverrides(nsIX509Cert *aCert,
                                   CertOverrideEnumerator enumerator,
                                   void *aUserData);
 
     // Concates host name and the port number. If the port number is -1 then
--- a/security/manager/ssl/src/nsCrypto.cpp
+++ b/security/manager/ssl/src/nsCrypto.cpp
@@ -1464,20 +1464,20 @@ nsSetKeyEnciphermentPOP(CRMFCertReqMsg *
      */
     srv = CRMF_CertReqMsgSetKeyEnciphermentPOP(certReqMsg,
                                               crmfSubsequentMessage,
                                               crmfChallengeResp, nullptr);
   }
   return (srv == SECSuccess) ? NS_OK : NS_ERROR_FAILURE;
 }
 
-static void PR_CALLBACK
+static void
 nsCRMFEncoderItemCount(void *arg, const char *buf, unsigned long len);
 
-static void PR_CALLBACK
+static void
 nsCRMFEncoderItemStore(void *arg, const char *buf, unsigned long len);
 
 static nsresult
 nsSet_EC_DHMAC_ProofOfPossession(CRMFCertReqMsg *certReqMsg, 
                                  nsKeyPairInfo  *keyInfo,
                                  CRMFCertRequest *certReq)
 {
   // RFC 2511 Appendix A section 2 a) defines,
@@ -1728,24 +1728,24 @@ nsSetProofOfPossession(CRMFCertReqMsg *c
     return NS_OK;
   
   if (!gotDHMACParameters)
     return NS_ERROR_FAILURE;
   
   return nsSet_EC_DHMAC_ProofOfPossession(certReqMsg, keyInfo, certReq);
 }
 
-static void PR_CALLBACK
+static void
 nsCRMFEncoderItemCount(void *arg, const char *buf, unsigned long len)
 {
   unsigned long *count = (unsigned long *)arg;
   *count += len;
 }
 
-static void PR_CALLBACK
+static void
 nsCRMFEncoderItemStore(void *arg, const char *buf, unsigned long len)
 {
   SECItem *dest = (SECItem *)arg;
   memcpy(dest->data + dest->len, buf, len);
   dest->len += len;
 }
 
 static SECItem*
--- a/security/manager/ssl/src/nsIdentityChecking.cpp
+++ b/security/manager/ssl/src/nsIdentityChecking.cpp
@@ -949,17 +949,17 @@ isApprovedForEV(SECOidTag policyOIDTag, 
   if (isEVMatchInExternalDebugRootsFile(policyOIDTag, rootCert)) {
     return true;
   }
 #endif
 
   return false;
 }
 
-PRStatus PR_CALLBACK
+PRStatus
 nsNSSComponent::IdentityInfoInit()
 {
   for (size_t iEV=0; iEV < (sizeof(myTrustedEVInfos)/sizeof(nsMyTrustedEVInfo)); ++iEV) {
     nsMyTrustedEVInfo &entry = myTrustedEVInfos[iEV];
     if (!entry.oid_name) // invalid or placeholder list entry
       continue;
 
     SECStatus rv;
--- a/security/manager/ssl/src/nsKeygenThread.cpp
+++ b/security/manager/ssl/src/nsKeygenThread.cpp
@@ -106,17 +106,17 @@ nsresult nsKeygenThread::ConsumeResult(
     }
     else {
       rv = NS_ERROR_FAILURE;
     }
   
   return rv;
 }
 
-static void PR_CALLBACK nsKeygenThreadRunner(void *arg)
+static void nsKeygenThreadRunner(void *arg)
 {
   PR_SetCurrentThreadName("Keygen");
   nsKeygenThread *self = static_cast<nsKeygenThread *>(arg);
   self->Run();
 }
 
 nsresult nsKeygenThread::StartKeyGeneration(nsIObserver* aObserver)
 {
--- a/security/manager/ssl/src/nsNSSCallbacks.cpp
+++ b/security/manager/ssl/src/nsNSSCallbacks.cpp
@@ -766,27 +766,27 @@ void PK11PasswordPromptRunnable::RunOnTa
   }
   
   if (NS_SUCCEEDED(rv) && value) {
     mResult = ToNewUTF8String(nsDependentString(password));
     NS_Free(password);
   }
 }
 
-char* PR_CALLBACK
+char*
 PK11PasswordPrompt(PK11SlotInfo* slot, PRBool retry, void* arg)
 {
   nsRefPtr<PK11PasswordPromptRunnable> runnable = 
     new PK11PasswordPromptRunnable(slot,
                                    static_cast<nsIInterfaceRequestor*>(arg));
   runnable->DispatchToMainThreadAndWait();
   return runnable->mResult;
 }
 
-void PR_CALLBACK HandshakeCallback(PRFileDesc* fd, void* client_data) {
+void HandshakeCallback(PRFileDesc* fd, void* client_data) {
   nsNSSShutDownPreventionLock locker;
   int32_t sslStatus;
   char* signer = nullptr;
   char* cipherName = nullptr;
   int32_t keyLength;
   nsresult rv;
   int32_t encryptBits;
 
@@ -1021,17 +1021,17 @@ static const unsigned int numResponders 
 static CERT_StringFromCertFcn oldOCSPAIAInfoCallback = nullptr;
 
 /*
  * See if we have a hard-coded default responder for this certificate's
  * issuer (unless this certificate is a root certificate).
  *
  * The result needs to be freed (PORT_Free) when no longer in use.
  */
-char* PR_CALLBACK MyAlternateOCSPAIAInfoCallback(CERTCertificate *cert) {
+char* MyAlternateOCSPAIAInfoCallback(CERTCertificate *cert) {
   if (cert && !cert->isRoot) {
     unsigned int i;
     for (i=0; i < numResponders; i++) {
       if (!(myDefaultOCSPResponders[i].issuerName));
       else if (!(myDefaultOCSPResponders[i].issuerKeyID));
       else if (!(cert->authKeyID));
       else if (CERT_CompareName(myDefaultOCSPResponders[i].issuerName,
                                 &(cert->issuer)) != SECEqual);
--- a/security/manager/ssl/src/nsNSSCallbacks.h
+++ b/security/manager/ssl/src/nsNSSCallbacks.h
@@ -10,20 +10,20 @@
 #include "pk11func.h"
 #include "nspr.h"
 #include "ocspt.h"
 #include "nsIStreamLoader.h"
 #include "mozilla/CondVar.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/Attributes.h"
 
-char* PR_CALLBACK
+char*
 PK11PasswordPrompt(PK11SlotInfo *slot, PRBool retry, void* arg);
 
-void PR_CALLBACK HandshakeCallback(PRFileDesc *fd, void *client_data);
+void HandshakeCallback(PRFileDesc *fd, void *client_data);
 
 SECStatus RegisterMyOCSPAIAInfoCallback();
 SECStatus UnregisterMyOCSPAIAInfoCallback();
 
 class nsHTTPListener MOZ_FINAL : public nsIStreamLoaderObserver
 {
 private:
   // For XPCOM implementations that are not a base class for some other
--- a/security/manager/ssl/src/nsNSSCertificateDB.cpp
+++ b/security/manager/ssl/src/nsNSSCertificateDB.cpp
@@ -185,17 +185,17 @@ nsNSSCertificateDB::FindCertNicknames(ns
    * finish up
    */
 cleanup:
   if (certList)
     CERT_DestroyCertList(certList);
   return rv;
 }
 
-SECStatus PR_CALLBACK
+SECStatus
 collect_certs(void *arg, SECItem **certs, int numcerts)
 {
   CERTDERCerts *collectArgs;
   SECItem *cert;
   SECStatus rv;
 
   collectArgs = (CERTDERCerts *)arg;
 
@@ -1204,17 +1204,17 @@ nsNSSCertificateDB::ExportPKCS12File(nsI
   }
   blob.SetToken(localRef);
   //blob.LoadCerts(aCertNames, count);
   //return blob.ExportToFile(aFile);
   return blob.ExportToFile(aFile, certs, count);
 }
 
 
-static SECStatus PR_CALLBACK 
+static SECStatus 
 GetOCSPResponders (CERTCertificate *aCert,
                    SECItem         *aDBKey,
                    void            *aArg)
 {
   nsIMutableArray *array = static_cast<nsIMutableArray*>(aArg);
   PRUnichar* nn = nullptr;
   PRUnichar* url = nullptr;
   char *serviceURL = nullptr;
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -92,23 +92,22 @@ PRLogModuleInfo* gPIPNSSLog = nullptr;
 
 #define NS_CRYPTO_HASH_BUFFER_SIZE 4096
 
 static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID);
 int nsNSSComponent::mInstanceCount = 0;
 bool nsNSSComponent::globalConstFlagUsePKIXVerification = false;
 
 // XXX tmp callback for slot password
-extern char * PR_CALLBACK 
-pk11PasswordPrompt(PK11SlotInfo *slot, PRBool retry, void *arg);
+extern char* pk11PasswordPrompt(PK11SlotInfo *slot, PRBool retry, void *arg);
 
 #define PIPNSS_STRBUNDLE_URL "chrome://pipnss/locale/pipnss.properties"
 #define NSSERR_STRBUNDLE_URL "chrome://pipnss/locale/nsserrors.properties"
 
-static PLHashNumber PR_CALLBACK certHashtable_keyHash(const void *key)
+static PLHashNumber certHashtable_keyHash(const void *key)
 {
   if (!key)
     return 0;
   
   SECItem *certKey = (SECItem*)key;
   
   // lazy hash function, sum up all char values of SECItem
   
@@ -118,17 +117,17 @@ static PLHashNumber PR_CALLBACK certHash
   
   for (i = 0; i < certKey->len; ++i, ++c) {
     hash += *c;
   }
   
   return hash;
 }
 
-static int PR_CALLBACK certHashtable_keyCompare(const void *k1, const void *k2)
+static int certHashtable_keyCompare(const void *k1, const void *k2)
 {
   // return type is a bool, answering the question "are the keys equal?"
 
   if (!k1 || !k2)
     return false;
   
   SECItem *certKey1 = (SECItem*)k1;
   SECItem *certKey2 = (SECItem*)k2;
@@ -145,30 +144,30 @@ static int PR_CALLBACK certHashtable_key
     if (*c1 != *c2) {
       return false;
     }
   }
   
   return true;
 }
 
-static int PR_CALLBACK certHashtable_valueCompare(const void *v1, const void *v2)
+static int certHashtable_valueCompare(const void *v1, const void *v2)
 {
   // two values are identical if their keys are identical
   
   if (!v1 || !v2)
     return false;
   
   CERTCertificate *cert1 = (CERTCertificate*)v1;
   CERTCertificate *cert2 = (CERTCertificate*)v2;
   
   return certHashtable_keyCompare(&cert1->certKey, &cert2->certKey);
 }
 
-static int PR_CALLBACK certHashtable_clearEntry(PLHashEntry *he, int /*index*/, void * /*userdata*/)
+static int certHashtable_clearEntry(PLHashEntry *he, int /*index*/, void * /*userdata*/)
 {
   if (he && he->value) {
     CERT_DestroyCertificate((CERTCertificate*)he->value);
   }
   
   return HT_ENUMERATE_NEXT;
 }
 
--- a/security/manager/ssl/src/nsNSSComponent.h
+++ b/security/manager/ssl/src/nsNSSComponent.h
@@ -321,17 +321,17 @@ private:
   void createBackgroundThreads();
   nsCertVerificationThread *mCertVerificationThread;
 
   nsNSSHttpInterface mHttpForNSS;
   nsRefPtr<nsClientAuthRememberService> mClientAuthRememberService;
   nsRefPtr<nsCERTValInParamWrapper> mDefaultCERTValInParam;
   nsRefPtr<nsCERTValInParamWrapper> mDefaultCERTValInParamLocalOnly;
 
-  static PRStatus PR_CALLBACK IdentityInfoInit(void);
+  static PRStatus IdentityInfoInit(void);
   PRCallOnceType mIdentityInfoCallOnce;
 
 public:
   static bool globalConstFlagUsePKIXVerification;
 };
 
 class PSMContentListener : public nsIURIContentListener,
                             public nsSupportsWeakReference {
--- a/security/manager/ssl/src/nsNSSIOLayer.cpp
+++ b/security/manager/ssl/src/nsNSSIOLayer.cpp
@@ -587,17 +587,17 @@ getSocketInfoIfRunning(PRFileDesc * fd, 
     return nullptr;
   }
 
   return socketInfo;
 }
 
 } // unnnamed namespace
 
-static PRStatus PR_CALLBACK
+static PRStatus
 nsSSLIOLayerConnect(PRFileDesc* fd, const PRNetAddr* addr,
                     PRIntervalTime timeout)
 {
   PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] connecting SSL socket\n", (void*)fd));
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker))
     return PR_FAILURE;
   
@@ -662,17 +662,17 @@ nsSSLIOLayerHelpers::rememberTolerantSit
 
   nsAutoCString key;
   getSiteKey(socketInfo, key);
 
   MutexAutoLock lock(*mutex);
   nsSSLIOLayerHelpers::mTLSTolerantSites->PutEntry(key);
 }
 
-static PRStatus PR_CALLBACK
+static PRStatus
 nsSSLIOLayerClose(PRFileDesc *fd)
 {
   nsNSSShutDownPreventionLock locker;
   if (!fd)
     return PR_FAILURE;
 
   PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] Shutting down socket\n", (void*)fd));
   
@@ -942,17 +942,17 @@ int32_t checkHandshake(int32_t bytesTran
     socketInfo->SetHandshakeInProgress(false);
   }
   
   return bytesTransfered;
 }
 
 }
 
-static int16_t PR_CALLBACK
+static int16_t
 nsSSLIOLayerPoll(PRFileDesc * fd, int16_t in_flags, int16_t *out_flags)
 {
   nsNSSShutDownPreventionLock locker;
 
   if (!out_flags)
   {
     NS_WARNING("nsSSLIOLayerPoll called with null out_flags");
     return 0;
@@ -1040,55 +1040,54 @@ static PRStatus _PSM_InvalidStatus(void)
 
 static PRFileDesc *_PSM_InvalidDesc(void)
 {
     PR_ASSERT(!"I/O method is invalid");
     PR_SetError(PR_INVALID_METHOD_ERROR, 0);
     return NULL;
 }
 
-static PRStatus PR_CALLBACK PSMGetsockname(PRFileDesc *fd, PRNetAddr *addr)
+static PRStatus PSMGetsockname(PRFileDesc *fd, PRNetAddr *addr)
 {
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker))
     return PR_FAILURE;
 
   return fd->lower->methods->getsockname(fd->lower, addr);
 }
 
-static PRStatus PR_CALLBACK PSMGetpeername(PRFileDesc *fd, PRNetAddr *addr)
+static PRStatus PSMGetpeername(PRFileDesc *fd, PRNetAddr *addr)
 {
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker))
     return PR_FAILURE;
 
   return fd->lower->methods->getpeername(fd->lower, addr);
 }
 
-static PRStatus PR_CALLBACK PSMGetsocketoption(PRFileDesc *fd, 
-                                        PRSocketOptionData *data)
+static PRStatus PSMGetsocketoption(PRFileDesc *fd, PRSocketOptionData *data)
 {
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker))
     return PR_FAILURE;
 
   return fd->lower->methods->getsocketoption(fd, data);
 }
 
-static PRStatus PR_CALLBACK PSMSetsocketoption(PRFileDesc *fd, 
-                                        const PRSocketOptionData *data)
+static PRStatus PSMSetsocketoption(PRFileDesc *fd,
+                                   const PRSocketOptionData *data)
 {
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker))
     return PR_FAILURE;
 
   return fd->lower->methods->setsocketoption(fd, data);
 }
 
-static int32_t PR_CALLBACK PSMRecv(PRFileDesc *fd, void *buf, int32_t amount,
+static int32_t PSMRecv(PRFileDesc *fd, void *buf, int32_t amount,
     int flags, PRIntervalTime timeout)
 {
   nsNSSShutDownPreventionLock locker;
   nsNSSSocketInfo *socketInfo = getSocketInfoIfRunning(fd, reading, locker);
   if (!socketInfo)
     return -1;
 
   if (flags != PR_MSG_PEEK && flags != 0) {
@@ -1103,17 +1102,17 @@ static int32_t PR_CALLBACK PSMRecv(PRFil
 
 #ifdef DEBUG_SSL_VERBOSE
   DEBUG_DUMP_BUFFER((unsigned char*)buf, bytesRead);
 #endif
 
   return checkHandshake(bytesRead, true, fd, socketInfo);
 }
 
-static int32_t PR_CALLBACK PSMSend(PRFileDesc *fd, const void *buf, int32_t amount,
+static int32_t PSMSend(PRFileDesc *fd, const void *buf, int32_t amount,
     int flags, PRIntervalTime timeout)
 {
   nsNSSShutDownPreventionLock locker;
   nsNSSSocketInfo *socketInfo = getSocketInfoIfRunning(fd, writing, locker);
   if (!socketInfo)
     return -1;
 
   if (flags != 0) {
@@ -1129,29 +1128,29 @@ static int32_t PR_CALLBACK PSMSend(PRFil
                                                   flags, timeout);
 
   PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] wrote %d bytes\n",
          fd, bytesWritten));
 
   return checkHandshake(bytesWritten, false, fd, socketInfo);
 }
 
-static int32_t PR_CALLBACK
+static int32_t
 nsSSLIOLayerRead(PRFileDesc* fd, void* buf, int32_t amount)
 {
   return PSMRecv(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT);
 }
 
-static int32_t PR_CALLBACK
+static int32_t
 nsSSLIOLayerWrite(PRFileDesc* fd, const void* buf, int32_t amount)
 {
   return PSMSend(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT);
 }
 
-static PRStatus PR_CALLBACK PSMConnectcontinue(PRFileDesc *fd, int16_t out_flags)
+static PRStatus PSMConnectcontinue(PRFileDesc *fd, int16_t out_flags)
 {
   nsNSSShutDownPreventionLock locker;
   if (!getSocketInfoIfRunning(fd, not_reading_or_writing, locker)) {
     return PR_FAILURE;
   }
 
   return fd->lower->methods->connectcontinue(fd, out_flags);
 }
--- a/security/manager/ssl/src/nsNSSShutDown.cpp
+++ b/security/manager/ssl/src/nsNSSShutDown.cpp
@@ -152,17 +152,17 @@ nsresult nsNSSShutDownList::doPK11Logout
   // This is guaranteed by holding the list lock.
 
   MutexAutoLock lock(singleton->mListLock);
   PL_DHashTableEnumerate(&mPK11LogoutCancelObjects, doPK11LogoutHelper, 0);
 
   return NS_OK;
 }
 
-PLDHashOperator PR_CALLBACK
+PLDHashOperator
 nsNSSShutDownList::doPK11LogoutHelper(PLDHashTable *table, 
   PLDHashEntryHdr *hdr, uint32_t number, void *arg)
 {
   ObjectHashEntry *entry = static_cast<ObjectHashEntry*>(hdr);
 
   nsOnPK11LogoutCancelObject *pklco = 
     reinterpret_cast<nsOnPK11LogoutCancelObject*>(entry->obj);
 
@@ -204,17 +204,17 @@ nsresult nsNSSShutDownList::evaporateAll
     MutexAutoLock lock(mListLock);
     removedCount = PL_DHashTableEnumerate(&mObjects, evaporateAllNSSResourcesHelper, 0);
   } while (removedCount > 0);
 
   mActivityState.releaseCurrentThreadActivityRestriction();
   return NS_OK;
 }
 
-PLDHashOperator PR_CALLBACK
+PLDHashOperator
 nsNSSShutDownList::evaporateAllNSSResourcesHelper(PLDHashTable *table, 
   PLDHashEntryHdr *hdr, uint32_t number, void *arg)
 {
   ObjectHashEntry *entry = static_cast<ObjectHashEntry*>(hdr);
   {
     MutexAutoUnlock unlock(singleton->mListLock);
     entry->obj->shutdown(nsNSSShutDownObject::calledFromList);
   }
--- a/security/manager/ssl/src/nsNSSShutDown.h
+++ b/security/manager/ssl/src/nsNSSShutDown.h
@@ -142,21 +142,21 @@ public:
   
   static nsNSSActivityState *getActivityState()
   {
     return singleton ? &singleton->mActivityState : nullptr;
   }
   
 private:
   nsNSSShutDownList();
-  static PLDHashOperator PR_CALLBACK
+  static PLDHashOperator
   evaporateAllNSSResourcesHelper(PLDHashTable *table, PLDHashEntryHdr *hdr,
                                                         uint32_t number, void *arg);
 
-  static PLDHashOperator PR_CALLBACK
+  static PLDHashOperator
   doPK11LogoutHelper(PLDHashTable *table, PLDHashEntryHdr *hdr,
                                                     uint32_t number, void *arg);
 protected:
   mozilla::Mutex mListLock;
   static nsNSSShutDownList *singleton;
   PLDHashTable mObjects;
   uint32_t mActiveSSLSockets;
   PLDHashTable mPK11LogoutCancelObjects;
--- a/security/manager/ssl/src/nsPKCS12Blob.cpp
+++ b/security/manager/ssl/src/nsPKCS12Blob.cpp
@@ -582,17 +582,17 @@ nsPKCS12Blob::inputToDecoder(SEC_PKCS12D
 }
 
 //
 // C callback methods
 //
 
 // digest_open
 // prepare a memory buffer for reading/writing digests
-SECStatus PR_CALLBACK
+SECStatus
 nsPKCS12Blob::digest_open(void *arg, PRBool reading)
 {
   nsPKCS12Blob *cx = reinterpret_cast<nsPKCS12Blob *>(arg);
   NS_ENSURE_TRUE(cx, SECFailure);
   
   if (reading) {
     NS_ENSURE_TRUE(cx->mDigest, SECFailure);
 
@@ -617,17 +617,17 @@ nsPKCS12Blob::digest_open(void *arg, PRB
   }
 
   return SECSuccess;
 }
 
 // digest_close
 // destroy a possibly active iterator
 // remove the data buffer if requested
-SECStatus PR_CALLBACK
+SECStatus
 nsPKCS12Blob::digest_close(void *arg, PRBool remove_it)
 {
   nsPKCS12Blob *cx = reinterpret_cast<nsPKCS12Blob *>(arg);
   NS_ENSURE_TRUE(cx, SECFailure);
 
   delete cx->mDigestIterator;
   cx->mDigestIterator = nullptr;
 
@@ -636,17 +636,17 @@ nsPKCS12Blob::digest_close(void *arg, PR
     cx->mDigest = nullptr;
   }
   
   return SECSuccess;
 }
 
 // digest_read
 // read bytes from the memory buffer
-int PR_CALLBACK
+int
 nsPKCS12Blob::digest_read(void *arg, unsigned char *buf, unsigned long len)
 {
   nsPKCS12Blob *cx = reinterpret_cast<nsPKCS12Blob *>(arg);
   NS_ENSURE_TRUE(cx, SECFailure);
   NS_ENSURE_TRUE(cx->mDigest, SECFailure);
 
   // iterator object must exist when digest has been opened in read mode
   NS_ENSURE_TRUE(cx->mDigestIterator, SECFailure);
@@ -659,17 +659,17 @@ nsPKCS12Blob::digest_read(void *arg, uns
   memcpy(buf, cx->mDigestIterator->get(), len);
   cx->mDigestIterator->advance(len);
   
   return len;
 }
 
 // digest_write
 // append bytes to the memory buffer
-int PR_CALLBACK
+int
 nsPKCS12Blob::digest_write(void *arg, unsigned char *buf, unsigned long len)
 {
   nsPKCS12Blob *cx = reinterpret_cast<nsPKCS12Blob *>(arg);
   NS_ENSURE_TRUE(cx, SECFailure);
   NS_ENSURE_TRUE(cx->mDigest, SECFailure);
 
   // make sure we are in write mode, read iterator has not yet been allocated
   NS_ENSURE_FALSE(cx->mDigestIterator, SECFailure);
@@ -678,17 +678,17 @@ nsPKCS12Blob::digest_write(void *arg, un
                      static_cast<uint32_t>(len));
   
   return len;
 }
 
 // nickname_collision
 // what to do when the nickname collides with one already in the db.
 // TODO: not handled, throw a dialog allowing the nick to be changed?
-SECItem * PR_CALLBACK
+SECItem *
 nsPKCS12Blob::nickname_collision(SECItem *oldNick, PRBool *cancel, void *wincx)
 {
   nsNSSShutDownPreventionLock locker;
   *cancel = false;
   nsresult rv;
   nsCOMPtr<nsINSSComponent> nssComponent(do_GetService(kNSSComponentCID, &rv));
   if (NS_FAILED(rv)) return nullptr;
   int count = 1;
@@ -740,17 +740,17 @@ nsPKCS12Blob::nickname_collision(SECItem
   newNick->type = siAsciiString;
   newNick->data = (unsigned char*) nsCRT::strdup(nickname.get());
   newNick->len  = strlen((char*)newNick->data);
   return newNick;
 }
 
 // write_export_file
 // write bytes to the exported PKCS#12 file
-void PR_CALLBACK
+void
 nsPKCS12Blob::write_export_file(void *arg, const char *buf, unsigned long len)
 {
   nsPKCS12Blob *cx = (nsPKCS12Blob *)arg;
   PR_Write(cx->mTmpFile, buf, len);
 }
 
 // pip_ucs2_ascii_conversion_fn
 // required to be set by NSS (to do PKCS#12), but since we've already got
--- a/security/manager/ssl/src/nsPKCS12Blob.h
+++ b/security/manager/ssl/src/nsPKCS12Blob.h
@@ -82,19 +82,19 @@ private:
 
   // simulated file I/O for "in memory" temporary digest data
   nsCString                 *mDigest;
   nsCString::const_iterator *mDigestIterator;
 
   bool        mTokenSet;
 
   // C-style callback functions for the NSS PKCS#12 library
-  static SECStatus PR_CALLBACK digest_open(void *, PRBool);
-  static SECStatus PR_CALLBACK digest_close(void *, PRBool);
-  static int       PR_CALLBACK digest_read(void *, unsigned char *, unsigned long);
-  static int       PR_CALLBACK digest_write(void *, unsigned char *, unsigned long);
-  static SECItem * PR_CALLBACK nickname_collision(SECItem *, PRBool *, void *);
-  static void PR_CALLBACK write_export_file(void *arg, const char *buf, unsigned long len);
+  static SECStatus digest_open(void *, PRBool);
+  static SECStatus digest_close(void *, PRBool);
+  static int       digest_read(void *, unsigned char *, unsigned long);
+  static int       digest_write(void *, unsigned char *, unsigned long);
+  static SECItem * nickname_collision(SECItem *, PRBool *, void *);
+  static void write_export_file(void *arg, const char *buf, unsigned long len);
 
 };
 
 #endif /* _NS_PKCS12BLOB_H_ */
 
--- a/security/manager/ssl/src/nsPSMBackgroundThread.cpp
+++ b/security/manager/ssl/src/nsPSMBackgroundThread.cpp
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsPSMBackgroundThread.h"
 #include "nsThreadUtils.h"
 
 using namespace mozilla;
 
-void PR_CALLBACK nsPSMBackgroundThread::nsThreadRunner(void *arg)
+void nsPSMBackgroundThread::nsThreadRunner(void *arg)
 {
   nsPSMBackgroundThread *self = static_cast<nsPSMBackgroundThread *>(arg);
   PR_SetCurrentThreadName(self->mName.BeginReading());
   self->Run();
 }
 
 nsPSMBackgroundThread::nsPSMBackgroundThread()
 : mThreadHandle(nullptr),
--- a/security/manager/ssl/src/nsPSMBackgroundThread.h
+++ b/security/manager/ssl/src/nsPSMBackgroundThread.h
@@ -9,17 +9,17 @@
 #include "nscore.h"
 #include "mozilla/CondVar.h"
 #include "mozilla/Mutex.h"
 #include "nsNSSComponent.h"
 
 class nsPSMBackgroundThread
 {
 protected:
-  static void PR_CALLBACK nsThreadRunner(void *arg);
+  static void nsThreadRunner(void *arg);
   virtual void Run(void) = 0;
 
   // used to join the thread
   PRThread *mThreadHandle;
 
   // Shared mutex used for condition variables,
   // and to protect access to mExitState.
   // Derived classes may use it to protect additional
--- a/security/manager/ssl/src/nsProtectedAuthThread.cpp
+++ b/security/manager/ssl/src/nsProtectedAuthThread.cpp
@@ -11,17 +11,17 @@
 #include "nsPKCS11Slot.h"
 #include "nsProtectedAuthThread.h"
 
 using namespace mozilla;
 using namespace mozilla::psm;
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsProtectedAuthThread, nsIProtectedAuthThread)
 
-static void PR_CALLBACK nsProtectedAuthThreadRunner(void *arg)
+static void nsProtectedAuthThreadRunner(void *arg)
 {
     PR_SetCurrentThreadName("Protected Auth");
 
     nsProtectedAuthThread *self = static_cast<nsProtectedAuthThread *>(arg);
     self->Run();
 }
 
 nsProtectedAuthThread::nsProtectedAuthThread()
--- a/security/manager/ssl/src/nsSmartCardMonitor.cpp
+++ b/security/manager/ssl/src/nsSmartCardMonitor.cpp
@@ -93,17 +93,17 @@ SmartCardThreadList::Add(SmartCardMonito
      // OK to forget current here, it's on the list
     return thread->Start();
   }
   return NS_ERROR_OUT_OF_MEMORY;
 }
 
 
 // We really should have a Unity PL Hash function...
-static PR_CALLBACK PLHashNumber
+static PLHashNumber
 unity(const void *key) { return PLHashNumber(NS_PTR_TO_INT32(key)); }
 
 SmartCardMonitoringThread::SmartCardMonitoringThread(SECMODModule *module_)
   : mThread(nullptr)
 {
   mModule = SECMOD_ReferenceModule(module_);
   // simple hash functions, most modules have less than 3 slots, so 10 buckets
   // should be plenty
--- a/testing/mochitest/ssltunnel/ssltunnel.cpp
+++ b/testing/mochitest/ssltunnel/ssltunnel.cpp
@@ -260,17 +260,17 @@ PRNetAddr websocket_server;
 PRThreadPool* threads = NULL;
 PRLock* shutdown_lock = NULL;
 PRCondVar* shutdown_condvar = NULL;
 // Not really used, unless something fails to start
 bool shutdown_server = false;
 bool do_http_proxy = false;
 bool any_host_spec_config = false;
 
-PR_CALLBACK int ClientAuthValueComparator(const void *v1, const void *v2)
+int ClientAuthValueComparator(const void *v1, const void *v2)
 {
   int a = *static_cast<const client_auth_option*>(v1) -
           *static_cast<const client_auth_option*>(v2);
   if (a == 0)
     return 0;
   if (a > 0)
     return 1;
   else // (a < 0)
--- a/widget/gtk2/nsCUPSShim.h
+++ b/widget/gtk2/nsCUPSShim.h
@@ -23,34 +23,34 @@ typedef struct               /**** Desti
 {
     char          *name,       /* Printer or class name */
                   *instance;   /* Local instance name or NULL */
     int           is_default;  /* Is this printer the default? */
     int           num_options; /* Number of options */
     cups_option_t *options;    /* Options */
 } cups_dest_t;
 
-typedef cups_dest_t* (PR_CALLBACK *CupsGetDestType)(const char *printer,
-                                                    const char *instance,
-                                                    int num_dests, 
-                                                    cups_dest_t *dests);
-typedef int (PR_CALLBACK *CupsGetDestsType)(cups_dest_t **dests);
-typedef int (PR_CALLBACK *CupsFreeDestsType)(int         num_dests,
-                                             cups_dest_t *dests);
-typedef int (PR_CALLBACK *CupsPrintFileType)(const char    *printer,
-                                             const char    *filename,
-                                             const char    *title,
-                                             int           num_options,
-                                             cups_option_t *options);
-typedef int (PR_CALLBACK *CupsTempFdType)(char *filename,
-                                          int   length);
-typedef int (PR_CALLBACK *CupsAddOptionType)(const char    *name,
-                                             const char    *value,
-                                             int           num_options,
-                                             cups_option_t **options);
+typedef cups_dest_t* (*CupsGetDestType)(const char *printer,
+                                        const char *instance,
+                                        int num_dests,
+                                        cups_dest_t *dests);
+typedef int (*CupsGetDestsType)(cups_dest_t **dests);
+typedef int (*CupsFreeDestsType)(int         num_dests,
+                                 cups_dest_t *dests);
+typedef int (*CupsPrintFileType)(const char    *printer,
+                                 const char    *filename,
+                                 const char    *title,
+                                 int           num_options,
+                                 cups_option_t *options);
+typedef int (*CupsTempFdType)(char *filename,
+                              int   length);
+typedef int (*CupsAddOptionType)(const char    *name,
+                                 const char    *value,
+                                 int           num_options,
+                                 cups_option_t **options);
 
 struct PRLibrary;
 
 /* Note: this class relies on static initialization. */
 class nsCUPSShim {
     public:
         /**
          * Initialize this object. Attempt to load the CUPS shared
--- a/xpcom/threads/nsProcess.h
+++ b/xpcom/threads/nsProcess.h
@@ -39,17 +39,17 @@ public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPROCESS
   NS_DECL_NSIOBSERVER
 
   nsProcess();
 
 private:
   ~nsProcess();
-  static void PR_CALLBACK Monitor(void *arg);
+  static void Monitor(void *arg);
   void ProcessComplete();
   nsresult CopyArgsAndRunProcess(bool blocking, const char** args,
                                  uint32_t count, nsIObserver* observer,
                                  bool holdWeak);
   nsresult CopyArgsAndRunProcessw(bool blocking, const PRUnichar** args,
                                   uint32_t count, nsIObserver* observer,
                                   bool holdWeak);
   // The 'args' array is null-terminated.
--- a/xpcom/threads/nsProcessCommon.cpp
+++ b/xpcom/threads/nsProcessCommon.cpp
@@ -216,17 +216,17 @@ static int assembleCmdLine(char *const *
     int32_t numChars = MultiByteToWideChar(codePage, 0, cmdLine, -1, NULL, 0); 
     *wideCmdLine = (PRUnichar *) PR_MALLOC(numChars*sizeof(PRUnichar));
     MultiByteToWideChar(codePage, 0, cmdLine, -1, *wideCmdLine, numChars); 
     PR_Free(cmdLine);
     return 0;
 }
 #endif
 
-void PR_CALLBACK nsProcess::Monitor(void *arg)
+void nsProcess::Monitor(void *arg)
 {
     nsRefPtr<nsProcess> process = dont_AddRef(static_cast<nsProcess*>(arg));
 
     if (!process->mBlocking)
         PR_SetCurrentThreadName("RunProcess");
 
 #if defined(PROCESSMODEL_WINAPI)
     DWORD dwRetVal;