Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; c-c part; r+sr=dmose
authorArpad Borsos <arpad.borsos@googlemail.com>
Wed, 29 Oct 2008 03:37:29 +0100
changeset 753 ea049a1644bdc5225e35393423a5f0e5bdff930d
parent 752 efd446a5a224268e2307d7a52682b750db80cef4
child 754 a1b646111579206bf09f0b1f2611cf3783922c05
push id679
push usersgautherie.bz@free.fr
push dateWed, 29 Oct 2008 02:38:07 +0000
treeherdercomm-central@ea049a1644bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs456388
Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; c-c part; r+sr=dmose
calendar/base/src/calICSService.cpp
calendar/base/src/calRecurrenceDateSet.cpp
directory/xpcom/base/src/nsLDAPConnection.cpp
directory/xpcom/base/src/nsLDAPConnection.h
directory/xpcom/base/src/nsLDAPMessage.h
directory/xpcom/base/src/nsLDAPProtocolModule.cpp
mailnews/addrbook/build/nsAbFactory.cpp
mailnews/addrbook/src/nsAbBSDirectory.cpp
mailnews/addrbook/src/nsAbCardProperty.cpp
mailnews/addrbook/src/nsAbMDBDirectory.cpp
mailnews/addrbook/src/nsAbView.cpp
mailnews/addrbook/src/nsDirPrefs.cpp
mailnews/base/src/nsMsgAccountManager.cpp
mailnews/base/src/nsMsgAccountManager.h
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgTagService.cpp
mailnews/base/util/nsMsgTxn.cpp
mailnews/build/nsMailModule.cpp
mailnews/compose/src/nsMsgSend.h
mailnews/db/msgdb/build/nsMsgDBFactory.cpp
mailnews/db/msgdb/public/nsMsgDatabase.h
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/import/build/nsImportModule.cpp
mailnews/import/src/nsImportAddressBooks.cpp
mailnews/import/src/nsImportMail.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h
mailnews/mime/src/mimebuf.cpp
mailnews/mime/src/mimebuf.h
mailnews/mime/src/mimecryp.cpp
mailnews/mime/src/mimedrft.cpp
mailnews/mime/src/mimei.cpp
mailnews/mime/src/mimemoz2.cpp
mailnews/mime/src/mimemrel.cpp
mailnews/mime/src/mimeobj.cpp
mailnews/mime/src/mimetext.cpp
suite/browser/src/nsBookmarksService.h
--- a/calendar/base/src/calICSService.cpp
+++ b/calendar/base/src/calICSService.cpp
@@ -485,17 +485,17 @@ calIcalComponent::AddTimezoneReference(c
     nsresult rv = aTimezone->GetTzid(tzid);
     NS_ENSURE_SUCCESS(rv, rv);
     if (!mReferencedTimezones.Put(tzid, aTimezone)) {
         return NS_ERROR_OUT_OF_MEMORY;
     }
     return NS_OK;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 TimezoneHashToTimezoneArray(nsACString const& /*tzid*/, calITimezone * tz, void * arg)
 {
     calITimezone *** const arrayPtr = static_cast<calITimezone ***>(arg);
     NS_ADDREF(**arrayPtr = tz);
     ++(*arrayPtr);
     return PL_DHASH_NEXT;
 }
 
@@ -957,17 +957,17 @@ void calIcalComponent::ClearAllPropertie
          prop; prop = next)
     {
         next = icalcomponent_get_next_property(mComponent, kind);
         icalcomponent_remove_property(mComponent, prop);
         icalproperty_free(prop);
     }
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 AddTimezoneComponentToIcal(nsACString const& /*tzid*/, calITimezone * tz, void * arg)
 {
     icalcomponent * const comp = static_cast<icalcomponent *>(arg);
     icaltimezone * icaltz = cal::getIcalTimezone(tz);
     if (icaltz) {
         icalcomponent * const tzcomp = icalcomponent_new_clone(icaltimezone_get_component(icaltz));
         icalcomponent_add_component(comp, tzcomp);
     }
--- a/calendar/base/src/calRecurrenceDateSet.cpp
+++ b/calendar/base/src/calRecurrenceDateSet.cpp
@@ -180,17 +180,17 @@ calRecurrenceDateSet::AddDate(calIDateTi
 
     mDates.AppendObject(aDate);
 
     mSorted = PR_FALSE;
 
     return NS_OK;
 }
 
-static int PR_CALLBACK
+static int
 calDateTimeComparator (calIDateTime *aElement1,
                        calIDateTime *aElement2,
                        void *aData)
 {
     PRInt32 result;
     aElement1->Compare(aElement2, &result);
     return result;
 }
--- a/directory/xpcom/base/src/nsLDAPConnection.cpp
+++ b/directory/xpcom/base/src/nsLDAPConnection.cpp
@@ -584,19 +584,19 @@ nsLDAPConnectionLoop::Init()
             return NS_ERROR_OUT_OF_MEMORY;
         }
     }
 
     return NS_OK;
 }
 
 // typedef PRBool
-// (*PR_CALLBACK nsHashtableEnumFunc)
+// (* nsHashtableEnumFunc)
 //      (nsHashKey *aKey, void *aData, void* aClosure);
-PRBool PR_CALLBACK
+PRBool
 CheckLDAPOperationResult(nsHashKey *aKey, void *aData, void* aClosure)
 {
     int lderrno;
     nsresult rv;
     PRInt32 returnCode;
     LDAPMessage *msgHandle;
     nsCOMPtr<nsILDAPMessage> msg;
     PRBool operationFinished = PR_TRUE;
--- a/directory/xpcom/base/src/nsLDAPConnection.h
+++ b/directory/xpcom/base/src/nsLDAPConnection.h
@@ -67,19 +67,19 @@ class nsLDAPConnectionLoop;
 class nsLDAPConnection : public nsILDAPConnection,
                          public nsSupportsWeakReference,
                          public nsIDNSListener
 
 {
     friend class nsLDAPOperation;
     friend class nsLDAPMessage;
     friend class nsLDAPConnectionLoop;
-    friend PRBool PR_CALLBACK CheckLDAPOperationResult(nsHashKey *aKey, 
-                                                       void *aData,
-                                                       void* aClosure);
+    friend PRBool CheckLDAPOperationResult(nsHashKey *aKey,
+                                           void *aData,
+                                           void* aClosure);
 
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSILDAPCONNECTION
     NS_DECL_NSIDNSLISTENER
 
     // constructor & destructor
     //
--- a/directory/xpcom/base/src/nsLDAPMessage.h
+++ b/directory/xpcom/base/src/nsLDAPMessage.h
@@ -52,19 +52,19 @@
 { 0x76e061ad, 0xa59f, 0x43b6, \
   { 0xb8, 0x12, 0xee, 0x6e, 0x8e, 0x69, 0x42, 0x3f }}
 
 class nsLDAPMessage : public nsILDAPMessage
 {
     friend class nsLDAPOperation;
     friend class nsLDAPConnection;
     friend class nsLDAPConnectionLoop;
-    friend PRBool PR_CALLBACK CheckLDAPOperationResult(nsHashKey *aKey, 
-                                                       void *aData,
-                                                       void* aClosure);
+    friend PRBool CheckLDAPOperationResult(nsHashKey *aKey,
+                                           void *aData,
+                                           void* aClosure);
 
   public:       
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSILDAPMESSAGE
 
     // constructor & destructor
     //
--- a/directory/xpcom/base/src/nsLDAPProtocolModule.cpp
+++ b/directory/xpcom/base/src/nsLDAPProtocolModule.cpp
@@ -123,17 +123,17 @@ static const nsModuleComponentInfo compo
     { "LDAP BER Value", NS_LDAPBERVALUE_CID,
       "@mozilla.org/network/ldap-ber-value;1", nsLDAPBERValueConstructor },
     { "LDAP BER Element", NS_LDAPBERELEMENT_CID,
       "@mozilla.org/network/ldap-ber-element;1", nsLDAPBERElementConstructor },
     { "LDAP Control", NS_LDAPCONTROL_CID,
       "@mozilla.org/network/ldap-control;1", nsLDAPControlConstructor}
 };
 
-PR_STATIC_CALLBACK(nsresult)
+static nsresult
 nsLDAPInitialize(nsIModule *aSelf)
 {
 #ifdef PR_LOGGING
     gLDAPLogModule = PR_NewLogModule("ldap");
     if (!gLDAPLogModule) {
         PR_fprintf(PR_STDERR, 
                    "nsLDAP_Initialize(): PR_NewLogModule() failed\n");
         return NS_ERROR_NOT_AVAILABLE;
--- a/mailnews/addrbook/build/nsAbFactory.cpp
+++ b/mailnews/addrbook/build/nsAbFactory.cpp
@@ -397,16 +397,16 @@ static const nsModuleComponentInfo compo
 
   { "ldif handler service",
     NS_ABLDIFSERVICE_CID,
     NS_ABLDIFSERVICE_CONTRACTID,
     nsAbLDIFServiceConstructor }
 };
 
 
-PR_STATIC_CALLBACK(void)
+static void
 msgAbModuleDtor(nsIModule* self)
 {
     nsAddrDatabase::CleanupCache();
 }
 
 NS_IMPL_NSGETMODULE_WITH_DTOR(nsAbModule, components, msgAbModuleDtor)
 
--- a/mailnews/addrbook/src/nsAbBSDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbBSDirectory.cpp
@@ -266,17 +266,17 @@ NS_IMETHODIMP nsAbBSDirectory::CreateDir
 struct GetDirectories
 {
   GetDirectories(DIR_Server* aServer) : mServer(aServer) { }
 
   nsCOMArray<nsIAbDirectory> directories;
   DIR_Server* mServer;
 };
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 GetDirectories_getDirectory(nsISupports *aKey, DIR_Server* aData, void* aClosure)
 {
   GetDirectories* getDirectories = (GetDirectories*)aClosure;
 
   if (aData == getDirectories->mServer) {
     nsCOMPtr<nsIAbDirectory> abDir = do_QueryInterface(aKey);
     getDirectories->directories.AppendObject(abDir);
   }
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -206,17 +206,17 @@ nsAbSimpleProperty::GetName(nsAString& a
 
 NS_IMETHODIMP
 nsAbSimpleProperty::GetValue(nsIVariant* *aValue)
 {
     NS_IF_ADDREF(*aValue = mValue);
     return NS_OK;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 PropertyHashToArrayFunc (const nsACString &aKey, nsIVariant* aData, void *userArg)
 {
   nsCOMArray<nsIProperty>* propertyArray = static_cast<nsCOMArray<nsIProperty> *>(userArg);
   propertyArray->AppendObject(new nsAbSimpleProperty(aKey, aData));
   return PL_DHASH_NEXT;
 }
 
 NS_IMETHODIMP nsAbCardProperty::GetProperties(nsISimpleEnumerator **props)
--- a/mailnews/addrbook/src/nsAbMDBDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirectory.cpp
@@ -417,17 +417,17 @@ NS_IMETHODIMP nsAbMDBDirectory::GetURI(n
 NS_IMETHODIMP nsAbMDBDirectory::GetChildNodes(nsISimpleEnumerator* *aResult)
 {
   if (mIsQueryURI)
     return NS_NewEmptyEnumerator(aResult);
 
   return NS_NewArrayEnumerator(aResult, mSubDirectories);
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator) 
+static PLDHashOperator 
 enumerateSearchCache(nsISupports *aKey, nsCOMPtr<nsIAbCard> &aData, void* aClosure)
 {
   nsIMutableArray* array = static_cast<nsIMutableArray*>(aClosure);
 
   array->AppendElement(aData, PR_FALSE);
   return PL_DHASH_NEXT;
 }
 
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -593,17 +593,17 @@ NS_IMETHODIMP nsAbView::GetCardFromRow(P
 
 typedef struct SortClosure
 {
   const PRUnichar *colID;
   PRInt32 factor;
   nsAbView *abView;
 } SortClosure;
 
-static int PR_CALLBACK
+static int
 inplaceSortCallback(const void *data1, const void *data2, void *privateData)
 {
   AbCard *card1 = (AbCard *)data1;
   AbCard *card2 = (AbCard *)data2;
   
   SortClosure *closure = (SortClosure *) privateData;
   
   PRInt32 sortValue;
--- a/mailnews/addrbook/src/nsDirPrefs.cpp
+++ b/mailnews/addrbook/src/nsDirPrefs.cpp
@@ -714,17 +714,17 @@ static void DIR_DeleteServerList(nsVoidA
     delete wholeList;
   }
 }
 
 /*****************************************************************************
  * Functions for managing JavaScript prefs for the DIR_Servers 
  */
 
-PR_STATIC_CALLBACK(int)
+static int
 comparePrefArrayMembers(const void* aElement1, const void* aElement2, void* aData)
 {
     const char* element1 = *static_cast<const char* const *>(aElement1);
     const char* element2 = *static_cast<const char* const *>(aElement2);
     const PRUint32 offset = *((const PRUint32*)aData);
 
     // begin the comparison at |offset| chars into the string -
     // this avoids comparing the "ldap_2.servers." portion of every element,
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -900,25 +900,25 @@ NS_IMETHODIMP nsMsgAccountManager::GetFo
     NS_ENSURE_SUCCESS(rv, rv);
     m_msgFolderCache->Init(cacheFile);
   }
 
   NS_IF_ADDREF(*aFolderCache = m_msgFolderCache);
   return rv;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashWriteFolderCache(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   nsIMsgFolderCache *folderCache = (nsIMsgFolderCache *) aClosure;
   aServer->WriteToFolderCache(folderCache);
   return PL_DHASH_NEXT;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashCleanupOnExit(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   PRBool emptyTrashOnExit = PR_FALSE;
   PRBool cleanupInboxOnExit = PR_FALSE;
   nsresult rv;
 
   if (WeAreOffline())
     return PL_DHASH_STOP;
@@ -1031,24 +1031,24 @@ hashCleanupOnExit(nsCStringHashKey::KeyT
            }
          }
        }
      }
    }
    return PL_DHASH_NEXT;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashCloseCachedConnections(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   aServer->CloseCachedConnections();
   return PL_DHASH_NEXT;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashShutdown(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   aServer->Shutdown();
   return PL_DHASH_NEXT;
 }
 
 /* readonly attribute nsISupportsArray accounts; */
 NS_IMETHODIMP
@@ -1140,17 +1140,17 @@ nsMsgAccountManager::getIdentitiesToArra
   if (NS_FAILED(rv))
     return PR_TRUE;
 
   identities->EnumerateForwards(addIdentityIfUnique, aData);
 
   return PR_TRUE;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashGetServersToArray(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   nsISupportsArray *array = (nsISupportsArray*) aClosure;
   nsCOMPtr<nsISupports> serverSupports = do_QueryInterface(aServer);
   array->AppendElement(aServer);
   return PL_DHASH_NEXT;
 }
 
@@ -2002,29 +2002,29 @@ nsMsgAccountManager::findServersForIdent
           break;
         }
       }
     }
   }
   return PR_TRUE;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashAddListener(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   nsIFolderListener* listener = (nsIFolderListener *) aClosure;
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> rootFolder;
   rv = aServer->GetRootFolder(getter_AddRefs(rootFolder));
   NS_ENSURE_SUCCESS(rv, PL_DHASH_NEXT);
   rv = rootFolder->AddFolderListener(listener);
   return PL_DHASH_NEXT;
 }
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 hashRemoveListener(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure)
 {
   nsIFolderListener* listener = (nsIFolderListener *) aClosure;
 
   nsresult rv;
   nsCOMPtr<nsIMsgFolder> rootFolder;
   rv = aServer->GetRootFolder(getter_AddRefs(rootFolder));
   NS_ENSURE_SUCCESS(rv, PL_DHASH_NEXT);
--- a/mailnews/base/src/nsMsgAccountManager.h
+++ b/mailnews/base/src/nsMsgAccountManager.h
@@ -134,17 +134,17 @@ private:
 
   // sets the pref for the default server
   nsresult setDefaultAccountPref(nsIMsgAccount *aDefaultAccount);
 
   // fires notifications to the appropriate root folders
   nsresult notifyDefaultServerChange(nsIMsgAccount *aOldAccount,
                                      nsIMsgAccount *aNewAccount);
     
-  PR_STATIC_CALLBACK(PLDHashOperator) hashUnloadServer(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure);
+  static PLDHashOperator hashUnloadServer(nsCStringHashKey::KeyType aKey, nsCOMPtr<nsIMsgIncomingServer>& aServer, void* aClosure);
 
   //
   // account enumerators
   // ("element" is always an account)
   //
 
   // find the identities that correspond to the given server
   static PRBool findIdentitiesForServer(nsISupports *element, void *aData);
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -2128,17 +2128,17 @@ NS_IMETHODIMP nsMsgDBView::GetSuppressMs
 }
 
 NS_IMETHODIMP nsMsgDBView::GetUsingLines(PRBool * aUsingLines)
 {
   *aUsingLines = mShowSizeInLines;
   return NS_OK;
 }
 
-int PR_CALLBACK CompareViewIndices (const void *v1, const void *v2, void *)
+int CompareViewIndices (const void *v1, const void *v2, void *)
 {
   nsMsgViewIndex i1 = *(nsMsgViewIndex*) v1;
   nsMsgViewIndex i2 = *(nsMsgViewIndex*) v2;
   return i1 - i2;
 }
 
 NS_IMETHODIMP nsMsgDBView::GetIndicesForSelection(PRUint32 *length, nsMsgViewIndex **indices)
 {
@@ -3218,17 +3218,17 @@ void nsMsgDBView::ReverseSort()
             nsIMsgFolder *topFolder = folders->ObjectAt(topIndex);
             folders->ReplaceObjectAt(topFolder, bottomIndex);
             folders->ReplaceObjectAt(bottomFolder, topIndex);
         }
         // no need to swap elements in m_levels; since we only call
         // ReverseSort in non-threaded mode, m_levels are all the same.
     }
 }
-int PR_CALLBACK
+int
 nsMsgDBView::FnSortIdKey(const void *pItem1, const void *pItem2, void *privateData)
 {
     PRInt32 retVal = 0;
     nsresult rv;
     viewSortInfo* sortInfo = (viewSortInfo *) privateData;
 
     IdKey** p1 = (IdKey**)pItem1;
     IdKey** p2 = (IdKey**)pItem2;
@@ -3243,17 +3243,17 @@ nsMsgDBView::FnSortIdKey(const void *pIt
     if (sortInfo->view->m_secondarySort == nsMsgViewSortType::byId)
       return (sortInfo->view->m_secondarySortOrder == nsMsgViewSortOrder::ascending &&
               (*p1)->id >= (*p2)->id) ? 1 : -1;
     else
       return sortInfo->view->SecondarySort((*p1)->id, (*p1)->folder, (*p2)->id, (*p2)->folder, sortInfo);
     // here we'd use the secondary sort
 }
 
-int PR_CALLBACK
+int
 nsMsgDBView::FnSortIdKeyPtr(const void *pItem1, const void *pItem2, void *privateData)
 {
   PRInt32 retVal = 0;
   nsresult rv;
 
   IdKeyPtr** p1 = (IdKeyPtr**)pItem1;
   IdKeyPtr** p2 = (IdKeyPtr**)pItem2;
   viewSortInfo* sortInfo = (viewSortInfo *) privateData;
@@ -3268,17 +3268,17 @@ nsMsgDBView::FnSortIdKeyPtr(const void *
 
   if (sortInfo->view->m_secondarySort == nsMsgViewSortType::byId)
     return (sortInfo->view->m_secondarySortOrder == nsMsgViewSortOrder::ascending &&
             (*p1)->id >= (*p2)->id) ? 1 : -1;
   else
     return sortInfo->view->SecondarySort((*p1)->id, (*p1)->folder, (*p2)->id, (*p2)->folder, sortInfo);
 }
 
-int PR_CALLBACK
+int
 nsMsgDBView::FnSortIdUint32(const void *pItem1, const void *pItem2, void *privateData)
 {
   IdUint32** p1 = (IdUint32**)pItem1;
   IdUint32** p2 = (IdUint32**)pItem2;
   viewSortInfo* sortInfo = (viewSortInfo *) privateData;
 
   if ((*p1)->dword > (*p2)->dword)
     return (sortInfo->ascendingSort) ? 1 : -1;
@@ -3714,17 +3714,17 @@ PRInt32  nsMsgDBView::SecondarySort(nsMs
 
   PRUint16  maxLen;
   eFieldType fieldType;
   nsMsgViewSortTypeValue sortType = comparisonContext->view->m_secondarySort;
   nsMsgViewSortOrderValue sortOrder = comparisonContext->view->m_secondarySortOrder;
   rv = GetFieldTypeAndLenForSort(sortType, &maxLen, &fieldType);
   const void *pValue1 = &EntryInfo1, *pValue2 = &EntryInfo2;
   
-  int (* PR_CALLBACK comparisonFun) (const void *pItem1, const void *pItem2, void *privateData) = nsnull;
+  int (* comparisonFun) (const void *pItem1, const void *pItem2, void *privateData) = nsnull;
   int retStatus = 0;
   hdr1->GetMessageKey(&EntryInfo1.id);
   hdr2->GetMessageKey(&EntryInfo2.id);
   
   //check if a custom column handler exists. If it does then grab it and pass it in
   //to either GetCollationKey or GetLongField - we need the custom column handler for
   // the previous sort, if any.
   nsIMsgCustomColumnHandler* colHandler = nsnull; // GetCurColumnHandlerFromDBInfo();
@@ -4577,17 +4577,17 @@ nsMsgViewIndex nsMsgDBView::GetInsertInd
   EntryInfo2.key = nsnull;
 
   nsresult rv;
   PRUint16  maxLen;
   eFieldType fieldType;
   rv = GetFieldTypeAndLenForSort(sortType, &maxLen, &fieldType);
   const void *pValue1 = &EntryInfo1, *pValue2 = &EntryInfo2;
 
-  int (* PR_CALLBACK comparisonFun) (const void *pItem1, const void *pItem2, void *privateData) = nsnull;
+  int (* comparisonFun) (const void *pItem1, const void *pItem2, void *privateData) = nsnull;
   int retStatus = 0;
   msgHdr->GetMessageKey(&EntryInfo1.id);
   msgHdr->GetFolder(&EntryInfo1.folder);
   EntryInfo1.folder->Release();
   //check if a custom column handler exists. If it does then grab it and pass it in
   //to either GetCollationKey or GetLongField
   nsIMsgCustomColumnHandler* colHandler = GetCurColumnHandlerFromDBInfo();
 
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -338,19 +338,19 @@ protected:
   nsMsgViewIndex	GetThreadFromMsgIndex(nsMsgViewIndex index, nsIMsgThread **threadHdr);
 
   // for sorting
   nsresult GetFieldTypeAndLenForSort(nsMsgViewSortTypeValue sortType, PRUint16 *pMaxLen, eFieldType *pFieldType);
   nsresult GetCollationKey(nsIMsgDBHdr *msgHdr, nsMsgViewSortTypeValue sortType, PRUint8 **result, 
                           PRUint32 *len, nsIMsgCustomColumnHandler* colHandler = nsnull);
   nsresult GetLongField(nsIMsgDBHdr *msgHdr, nsMsgViewSortTypeValue sortType, PRUint32 *result, 
                           nsIMsgCustomColumnHandler* colHandler = nsnull);
-  static int PR_CALLBACK FnSortIdKey(const void *pItem1, const void *pItem2, void *privateData);
-  static int PR_CALLBACK FnSortIdKeyPtr(const void *pItem1, const void *pItem2, void *privateData);
-  static int PR_CALLBACK FnSortIdUint32(const void *pItem1, const void *pItem2, void *privateData);
+  static int FnSortIdKey(const void *pItem1, const void *pItem2, void *privateData);
+  static int FnSortIdKeyPtr(const void *pItem1, const void *pItem2, void *privateData);
+  static int FnSortIdUint32(const void *pItem1, const void *pItem2, void *privateData);
 
   nsresult GetStatusSortValue(nsIMsgDBHdr *msgHdr, PRUint32 *result);
   nsresult GetLocationCollationKey(nsIMsgDBHdr *msgHdr, PRUint8 **result, PRUint32 *len);
   void PushSort(const MsgViewSortColumnInfo &newSort);
   nsresult EncodeColumnSort(nsString &columnSortString);
   nsresult DecodeColumnSort(nsString &columnSortString);
   // for view navigation
   nsresult NavigateFromPos(nsMsgNavigationTypeValue motion, nsMsgViewIndex startIndex, nsMsgKey *pResultKey, 
--- a/mailnews/base/src/nsMsgTagService.cpp
+++ b/mailnews/base/src/nsMsgTagService.cpp
@@ -55,24 +55,24 @@
 #define TAG_PREF_SUFFIX_ORDINAL ".ordinal"
 #define TAG_CMP_LESSER          -1
 #define TAG_CMP_EQUAL           0
 #define TAG_CMP_GREATER         1
 
 static PRBool gMigratingKeys = PR_FALSE;
 
 // comparison functions for nsQuickSort
-PR_STATIC_CALLBACK(int)
+static int
 CompareMsgTagKeys(const void* aTagPref1, const void* aTagPref2, void* aData)
 {
   return strcmp(*static_cast<const char* const*>(aTagPref1),
                 *static_cast<const char* const*>(aTagPref2));
 }
 
-PR_STATIC_CALLBACK(int)
+static int
 CompareMsgTags(const void* aTagPref1, const void* aTagPref2, void* aData)
 {
   // Sort nsMsgTag objects by ascending order, using their ordinal or key.
   // The "smallest" value will be first in the sorted array,
   // thus being the most important element.
   nsMsgTag *element1 = *(nsMsgTag**) aTagPref1;
   nsMsgTag *element2 = *(nsMsgTag**) aTagPref2;
 
--- a/mailnews/base/util/nsMsgTxn.cpp
+++ b/mailnews/base/util/nsMsgTxn.cpp
@@ -132,17 +132,17 @@ NS_IMETHODIMP nsSimpleProperty::GetName(
 NS_IMETHODIMP nsSimpleProperty::GetValue(nsIVariant* *aValue)
 {
   NS_IF_ADDREF(*aValue = mValue);
   return NS_OK;
 }
 
 // end nsSimpleProperty
 
-PR_STATIC_CALLBACK(PLDHashOperator)
+static PLDHashOperator
 PropertyHashToArrayFunc (const nsAString &aKey,
                          nsIVariant* aData,
                          void *userArg)
 {
   nsCOMArray<nsIProperty> *propertyArray =
       static_cast<nsCOMArray<nsIProperty> *>(userArg);
   nsSimpleProperty *sprop = new nsSimpleProperty(aKey, aData);
   propertyArray->AppendObject(sprop);
--- a/mailnews/build/nsMailModule.cpp
+++ b/mailnews/build/nsMailModule.cpp
@@ -1267,15 +1267,15 @@ static const nsModuleComponentInfo gComp
       NS_ABMANAGERSTARTUPHANDLER_CONTRACTID, nsAbManagerConstructor },
     { "Compose Service", NS_MSGCOMPOSESERVICE_CID,
       NS_MSGCOMPOSESTARTUPHANDLER_CONTRACTID, nsMsgComposeServiceConstructor },
     { "NNTP Service", NS_NNTPSERVICE_CID,
       NS_NEWSSTARTUPHANDLER_CONTRACTID, nsNntpServiceConstructor },
 #endif
 };
 
-PR_STATIC_CALLBACK(void) nsMailModuleDtor(nsIModule* self)
+static void nsMailModuleDtor(nsIModule* self)
 {
     nsAddrDatabase::CleanupCache();
     nsMsgDatabase::CleanupCache();
 }
 
 NS_IMPL_NSGETMODULE_WITH_DTOR(nsMailModule, gComponents, nsMailModuleDtor)
--- a/mailnews/compose/src/nsMsgSend.h
+++ b/mailnews/compose/src/nsMsgSend.h
@@ -423,12 +423,12 @@ private:
   nsCString                   mSmtpPassword;            // store the smtp Password use during a send
 };
 
 //
 // These C routines should only be used by the nsMsgSendPart class.
 //
 extern nsresult mime_write_message_body(nsIMsgSend *state, const char *buf, PRInt32 size);
 extern char   *mime_get_stream_write_buffer(void);
-extern nsresult PR_CALLBACK mime_encoder_output_fn (const char *buf, PRInt32 size, void *closure);
+extern nsresult mime_encoder_output_fn (const char *buf, PRInt32 size, void *closure);
 extern PRBool UseQuotedPrintable(void);
 
 #endif /*  __MSGSEND_H__ */
--- a/mailnews/db/msgdb/build/nsMsgDBFactory.cpp
+++ b/mailnews/db/msgdb/build/nsMsgDBFactory.cpp
@@ -61,17 +61,17 @@ static const nsModuleComponentInfo msgDB
     { "Imap DB", NS_IMAPDB_CID, NS_IMAPDB_CONTRACTID, nsImapMailDatabaseConstructor },
     { "Msg Retention Settings", NS_MSG_RETENTIONSETTINGS_CID,
       NS_MSG_RETENTIONSETTINGS_CONTRACTID, nsMsgRetentionSettingsConstructor },
     { "Msg Download Settings", NS_MSG_DOWNLOADSETTINGS_CID,
       NS_MSG_DOWNLOADSETTINGS_CONTRACTID, nsMsgDownloadSettingsConstructor },
    { "Msg DB Service", NS_MSGDB_SERVICE_CID, NS_MSGDB_SERVICE_CONTRACTID, nsMsgDBServiceConstructor }
 };
 
-PR_STATIC_CALLBACK(void)
+static void
 msgDBModuleDtor(nsIModule* self)
 {
     nsMsgDatabase::CleanupCache();
 }
 
 NS_IMPL_NSGETMODULE_WITH_DTOR(nsMsgDBModule, msgDB_components, msgDBModuleDtor)
 
 
--- a/mailnews/db/msgdb/public/nsMsgDatabase.h
+++ b/mailnews/db/msgdb/public/nsMsgDatabase.h
@@ -294,23 +294,23 @@ protected:
   nsresult      ClearUseHdrCache();
   nsresult      RemoveHdrFromUseCache(nsIMsgDBHdr *hdr, nsMsgKey key);
   
   mdb_pos       FindInsertIndexInSortedTable(nsIMdbTable *table, mdb_id idToInsert);
 
   void          ClearCachedObjects(PRBool dbGoingAway);
   // all instantiated headers, but doesn't hold refs. 
   PLDHashTable  *m_headersInUse;
-  static PLDHashNumber PR_CALLBACK HashKey(PLDHashTable* aTable, const void* aKey);
-  static PRBool PR_CALLBACK MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey);
-  static void PR_CALLBACK MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLDHashEntryHdr* aTo);
-  static void PR_CALLBACK ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
-  static PLDHashOperator PR_CALLBACK HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
+  static PLDHashNumber HashKey(PLDHashTable* aTable, const void* aKey);
+  static PRBool MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey);
+  static void MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLDHashEntryHdr* aTo);
+  static void ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
+  static PLDHashOperator HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
                                PRUint32 number, void *arg);
-  static PLDHashOperator PR_CALLBACK ClearHeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
+  static PLDHashOperator ClearHeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
                                PRUint32 number, void *arg);
   static PLDHashTableOps gMsgDBHashTableOps;
   struct MsgHdrHashElement {
     PLDHashEntryHdr mHeader;
     nsMsgKey       mKey;
     nsIMsgDBHdr     *mHdr;
   };
   PLDHashTable  *m_cachedHeaders;
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -307,26 +307,26 @@ nsresult nsMsgDatabase::AddHdrToCache(ns
       NS_ADDREF(hdr);     // make the cache hold onto the header
       return NS_OK;
     }
   }
   return NS_ERROR_FAILURE;
 }
 
 
-/* static */PLDHashOperator PR_CALLBACK nsMsgDatabase::HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
+/* static */PLDHashOperator nsMsgDatabase::HeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
                                PRUint32 number, void *arg)
 {
 
   MsgHdrHashElement* element = reinterpret_cast<MsgHdrHashElement*>(hdr);
   NS_IF_RELEASE(element->mHdr);
   return PL_DHASH_NEXT;
 }
 
-/* static */PLDHashOperator PR_CALLBACK nsMsgDatabase::ClearHeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
+/* static */PLDHashOperator nsMsgDatabase::ClearHeaderEnumerator (PLDHashTable *table, PLDHashEntryHdr *hdr,
                                PRUint32 number, void *arg)
 {
 
   MsgHdrHashElement* element = reinterpret_cast<MsgHdrHashElement*>(hdr);
   if (element && element->mHdr)
   {
     nsMsgHdr* msgHdr = static_cast<nsMsgHdr*>(element->mHdr);  // closed system, so this is ok
     // clear out m_mdbRow member variable - the db is going away, which means that this member
@@ -461,39 +461,39 @@ PLDHashTableOps nsMsgDatabase::gMsgDBHas
   MoveEntry,
   ClearEntry,
   PL_DHashFinalizeStub,
   nsnull
 };
 
 // HashKey is supposed to maximize entropy in the low order bits, and the key
 // as is, should do that.
-PLDHashNumber PR_CALLBACK
+PLDHashNumber
 nsMsgDatabase::HashKey(PLDHashTable* aTable, const void* aKey)
 {
   return PLDHashNumber(NS_PTR_TO_INT32(aKey));
 }
 
-PRBool PR_CALLBACK
+PRBool
 nsMsgDatabase::MatchEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aEntry, const void* aKey)
 {
   const MsgHdrHashElement* hdr = reinterpret_cast<const MsgHdrHashElement*>(aEntry);
   return aKey == (const void *) hdr->mKey; // ### or get the key from the hdr...
 }
 
-void PR_CALLBACK
+void
 nsMsgDatabase::MoveEntry(PLDHashTable* aTable, const PLDHashEntryHdr* aFrom, PLDHashEntryHdr* aTo)
 {
   const MsgHdrHashElement* from = reinterpret_cast<const MsgHdrHashElement*>(aFrom);
   MsgHdrHashElement* to = reinterpret_cast<MsgHdrHashElement*>(aTo);
   // ### eh? Why is this needed? I don't think we have a copy operator?
   *to = *from;
 }
 
-void PR_CALLBACK
+void
 nsMsgDatabase::ClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry)
 {
   MsgHdrHashElement* element = reinterpret_cast<MsgHdrHashElement*>(aEntry);
   element->mHdr = nsnull; // eh? Need to release this or not?
   element->mKey = nsMsgKey_None; // eh?
 }
 
 
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -159,18 +159,18 @@ inline BaseToken* TokenEnumeration::next
     return token;
 }
 
 struct VisitClosure {
     PRBool (*f) (BaseToken*, void*);
     void* data;
 };
 
-static PLDHashOperator PR_CALLBACK VisitEntry(PLDHashTable* table, PLDHashEntryHdr* entry,
-                                              PRUint32 number, void* arg)
+static PLDHashOperator VisitEntry(PLDHashTable* table, PLDHashEntryHdr* entry,
+                                  PRUint32 number, void* arg)
 {
     VisitClosure* closure = reinterpret_cast<VisitClosure*>(arg);
     BaseToken* token = static_cast<BaseToken*>(entry);
     return (closure->f(token, closure->data) ? PL_DHASH_NEXT : PL_DHASH_STOP);
 }
 
 // member variables
 static const PLDHashTableOps gTokenTableOps = {
@@ -1085,17 +1085,17 @@ nsresult nsBayesianFilter::tokenizeMessa
     NS_ENSURE_SUCCESS(rv, rv);
 
     aAnalyzer->setSource(aMessageURI);
     return msgService->StreamMessage(aMessageURI, aAnalyzer->mTokenListener,
                                      aMsgWindow, nsnull, PR_TRUE /* convert data */,
                                      NS_LITERAL_CSTRING("filter"), PR_FALSE, nsnull);
 }
 
-PR_STATIC_CALLBACK(int) compareTokens(const void* p1, const void* p2, void* /* data */)
+static int compareTokens(const void* p1, const void* p2, void* /* data */)
 {
     Token *t1 = (Token*) p1, *t2 = (Token*) p2;
     double delta = t1->mDistance - t2->mDistance;
     return (delta == 0.0 ? 0 : (delta > 0.0 ? 1 : -1));
 }
 
 inline double dmax(double x, double y) { return (x > y ? x : y); }
 inline double dmin(double x, double y) { return (x < y ? x : y); }
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
@@ -66,47 +66,47 @@ nsCOMPtr<nsIStringBundle> nsMsgComposeSe
 #define MIME_SMIME_SIGNATURE_CONTENT_DESCRIPTION "S/MIME Cryptographic Signature"
 
 #define MK_MIME_ERROR_WRITING_FILE -1
 
 #define SMIME_STRBUNDLE_URL "chrome://messenger/locale/am-smime.properties"
 
 static void mime_crypto_write_base64 (void *closure, const char *buf,
               unsigned long size);
-static nsresult PR_CALLBACK mime_encoder_output_fn(const char *buf, PRInt32 size, void *closure);
-static nsresult PR_CALLBACK mime_nested_encoder_output_fn (const char *buf, PRInt32 size, void *closure);
+static nsresult mime_encoder_output_fn(const char *buf, PRInt32 size, void *closure);
+static nsresult mime_nested_encoder_output_fn (const char *buf, PRInt32 size, void *closure);
 static int make_multipart_signed_header_string(PRBool outer_p,
                   char **header_return,
                   char **boundary_return);
 static char *mime_make_separator(const char *prefix);
 
 // mscott --> FIX ME...for now cloning code from compose\nsMsgEncode.h/.cpp
 
 #include "prprf.h"
 #include "prmem.h"
 #include "nsCOMPtr.h"
 #include "nsMsgMimeCID.h"
 #include "nsIMimeConverter.h"
 
 MimeEncoderData *
-MIME_B64EncoderInit(nsresult (*PR_CALLBACK output_fn) (const char *buf, PRInt32 size, void *closure), void *closure) 
+MIME_B64EncoderInit(nsresult (* output_fn) (const char *buf, PRInt32 size, void *closure), void *closure) 
 {
   MimeEncoderData *returnEncoderData = nsnull;
   nsIMimeConverter *converter;
   nsresult res = CallCreateInstance(NS_MIME_CONVERTER_CONTRACTID, &converter);
   if (NS_SUCCEEDED(res) && nsnull != converter) 
   {
     res = converter->B64EncoderInit(output_fn, closure, &returnEncoderData);
     NS_RELEASE(converter);
   }
   return NS_SUCCEEDED(res) ? returnEncoderData : nsnull;
 }
 
 MimeEncoderData * 
-MIME_QPEncoderInit(nsresult (*PR_CALLBACK output_fn) (const char *buf, PRInt32 size, void *closure), void *closure) 
+MIME_QPEncoderInit(nsresult (* output_fn) (const char *buf, PRInt32 size, void *closure), void *closure) 
 {
   MimeEncoderData *returnEncoderData = nsnull;
   nsIMimeConverter *converter;
   nsresult res = CallCreateInstance(NS_MIME_CONVERTER_CONTRACTID, &converter);
   if (NS_SUCCEEDED(res) && nsnull != converter) 
   {
     res = converter->QPEncoderInit(output_fn, closure, &returnEncoderData);
     NS_RELEASE(converter);
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -1949,17 +1949,17 @@ nsImapMailFolder::BuildIdsAndKeyArray(ns
     if (msgDBHdr)
       rv = msgDBHdr->GetMessageKey(&key);
     if (NS_SUCCEEDED(rv))
       keyArray.AppendElement(key);
   }
   return AllocateUidStringFromKeys(keyArray.Elements(), keyArray.Length(), msgIds);
 }
 
-static int PR_CALLBACK CompareKey (const void *v1, const void *v2, void *)
+static int CompareKey (const void *v1, const void *v2, void *)
 {
   // QuickSort callback to compare array values
   nsMsgKey i1 = *(nsMsgKey *)v1;
   nsMsgKey i2 = *(nsMsgKey *)v2;
   return i1 - i2;
 }
 
 /* static */nsresult
--- a/mailnews/import/build/nsImportModule.cpp
+++ b/mailnews/import/build/nsImportModule.cpp
@@ -310,17 +310,17 @@ static const nsModuleComponentInfo compo
     { "Outlook Import Component", NS_OUTLOOKIMPORT_CID,
     "@mozilla.org/import/import-outlook;1", nsOutlookImportConstructor, OutlookRegister, nsnull }
 #endif
 #endif
 
 };
 
 
-PR_STATIC_CALLBACK(void) importModuleDtor(nsIModule* self)
+static void importModuleDtor(nsIModule* self)
 {
 #if defined(XP_WIN) || defined(XP_MACOSX)
     nsEudoraStringBundle::Cleanup();
 #endif
 
 #ifdef XP_WIN
 
 #if defined(_MSC_VER) && _MSC_VER >= 1100
--- a/mailnews/import/src/nsImportAddressBooks.cpp
+++ b/mailnews/import/src/nsImportAddressBooks.cpp
@@ -59,17 +59,17 @@
 #include "nsServiceManagerUtils.h"
 #include "msgCore.h"
 #include "ImportDebug.h"
 #include "nsIAbMDBDirectory.h"
 #include "nsComponentManagerUtils.h"
 #include "nsXPCOMCIDInternal.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
-PR_STATIC_CALLBACK( void) ImportAddressThread( void *stuff);
+static void ImportAddressThread( void *stuff);
 
 
 class AddressThreadData;
 
 class nsImportGenericAddressBooks : public nsIImportGeneric
 {
 public:
 
@@ -946,17 +946,17 @@ void nsImportGenericAddressBooks::Report
   PRUnichar *pFmt = nsImportStringBundle::GetStringByID( IMPORT_ERROR_GETABOOK, aBundle);
   PRUnichar *pText = nsTextFormatter::smprintf( pFmt, pName);
   pStream->Append( pText);
   nsTextFormatter::smprintf_free( pText);
   NS_Free(pFmt);
   pStream->AppendLiteral(MSG_LINEBREAK);
 }
 
-PR_STATIC_CALLBACK( void) ImportAddressThread( void *stuff)
+static void ImportAddressThread( void *stuff)
 {
   IMPORT_LOG0( "In Begin ImportAddressThread\n");
 
   AddressThreadData *pData = (AddressThreadData *)stuff;
   PRUint32  count = 0;
   nsresult   rv = pData->books->Count( &count);
 
   PRUint32          i;
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -74,17 +74,17 @@
 #include "ImportDebug.h"
 #include "plstr.h"
 #include "MailNewsTypes.h"
 
 #define IMPORT_MSGS_URL       "chrome://messenger/locale/importMsgs.properties"
 
 ////////////////////////////////////////////////////////////////////////
 
-PR_STATIC_CALLBACK( void) ImportMailThread( void *stuff);
+static void ImportMailThread( void *stuff);
 
 class ImportThreadData;
 
 class nsImportGenericMail : public nsIImportGeneric
 {
 public:
 
   nsImportGenericMail();
@@ -724,17 +724,17 @@ void ImportThreadData::DriverAbort()
   }
   else
     abort = PR_TRUE;
   DriverDelete();
 }
 
 
 
-PR_STATIC_CALLBACK( void)
+static void
 ImportMailThread( void *stuff)
 {
   ImportThreadData *pData = (ImportThreadData *)stuff;
 
   IMPORT_LOG0("ImportMailThread: Starting...");
 
   nsresult rv = NS_OK;
 
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -81,17 +81,17 @@
 #include "nsILineInputStream.h"
 #include "nsLocalStrings.h"
 
 #define EXTRA_SAFETY_SPACE 3096
 
 static PRLogModuleInfo *POP3LOGMODULE = nsnull;
 
 
-static PRIntn PR_CALLBACK
+static PRIntn
 net_pop3_remove_messages_marked_delete(PLHashEntry* he,
                                        PRIntn msgindex,
                                        void *arg)
 {
   Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
   return (uidlEntry->status == DELETE_CHAR)
     ? HT_ENUMERATE_REMOVE : HT_ENUMERATE_NEXT;
 }
@@ -124,43 +124,43 @@ put_hash(PLHashTable* table, const char*
         PL_HashTableAdd(table, (const void *)tmp->uidl, (void*) tmp);
       }
       else
         PR_Free(tmp);
     }
   }
 }
 
-static PRIntn PR_CALLBACK
+static PRIntn
 net_pop3_copy_hash_entries(PLHashEntry* he, PRIntn msgindex, void *arg)
 {
   Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
   put_hash((PLHashTable *) arg, uidlEntry->uidl, uidlEntry->status, uidlEntry->dateReceived);
   return HT_ENUMERATE_NEXT;
 }
 
-static void * PR_CALLBACK
+static void *
 AllocUidlTable(void * /* pool */, PRSize size)
 {
   return PR_MALLOC(size);
 }
 
-static void PR_CALLBACK
+static void
 FreeUidlTable(void * /* pool */, void *item)
 {
     PR_Free(item);
 }
 
-static PLHashEntry * PR_CALLBACK
+static PLHashEntry *
 AllocUidlInfo(void *pool, const void *key)
 {
     return PR_NEWZAP(PLHashEntry);
 }
 
-static void PR_CALLBACK
+static void
 FreeUidlInfo(void * /* pool */, PLHashEntry *he, PRUintn flag)
 {
   if (flag == HT_FREE_ENTRY)
   {
     Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
     if (uidlEntry)
     {
       PR_Free(uidlEntry->uidl);
@@ -299,44 +299,44 @@ net_pop3_load_state(const char* searchho
       }
     }
   }
   fileStream->Close();
 
   return result;
 }
 
-static PRIntn PR_CALLBACK
+static PRIntn
 hash_clear_mapper(PLHashEntry* he, PRIntn msgindex, void* arg)
 {
   Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
   PR_Free(uidlEntry->uidl);
   PR_Free(uidlEntry);
   he->value = nsnull;
 
   return HT_ENUMERATE_REMOVE;
 }
 
-static PRIntn PR_CALLBACK
+static PRIntn
 hash_empty_mapper(PLHashEntry* he, PRIntn msgindex, void* arg)
 {
   *((PRBool*) arg) = PR_FALSE;
   return HT_ENUMERATE_STOP;
 }
 
 static PRBool
 hash_empty(PLHashTable* hash)
 {
   PRBool result = PR_TRUE;
   PL_HashTableEnumerateEntries(hash, hash_empty_mapper, (void *)&result);
   return result;
 }
 
 
-static PRIntn PR_CALLBACK
+static PRIntn
 net_pop3_write_mapper(PLHashEntry* he, PRIntn msgindex, void* arg)
 {
   nsIOutputStream* file = (nsIOutputStream*) arg;
   Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
   NS_ASSERTION((uidlEntry->status == KEEP) ||
     (uidlEntry->status == DELETE_CHAR) ||
     (uidlEntry->status == FETCH_BODY) ||
     (uidlEntry->status == TOO_BIG), "invalid status");
@@ -344,17 +344,17 @@ net_pop3_write_mapper(PLHashEntry* he, P
     uidlEntry->uidl, uidlEntry->dateReceived);
   PR_ASSERT(tmpBuffer);
   PRUint32 numBytesWritten;
   file->Write(tmpBuffer, strlen(tmpBuffer), &numBytesWritten);
   PR_Free(tmpBuffer);
   return HT_ENUMERATE_NEXT;
 }
 
-static PRIntn PR_CALLBACK
+static PRIntn
 net_pop3_delete_old_msgs_mapper(PLHashEntry* he, PRIntn msgindex, void* arg)
 {
   PRTime cutOffDate = (PRTime) arg;
   Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
   if (uidlEntry->dateReceived < cutOffDate)
     uidlEntry->status = DELETE_CHAR; // mark for deletion
   return HT_ENUMERATE_NEXT;
 }
--- a/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h
+++ b/mailnews/mime/cthandlers/glue/nsMimeContentTypeHandler.h
@@ -49,18 +49,18 @@
  */
 #ifndef nsMimeContentTypeHandler_h_
 #define nsMimeContentTypeHandler_h_
 
 #include "prtypes.h"
 #include "nsIMimeContentTypeHandler.h"
 
 typedef MimeObjectClass  *
-(* PR_CALLBACK MCTHCreateCTHClass)(const char *content_type, 
-                                   contentTypeHandlerInitStruct *initStruct);
+(* MCTHCreateCTHClass)(const char *content_type, 
+                       contentTypeHandlerInitStruct *initStruct);
 
 class nsMimeContentTypeHandler : public nsIMimeContentTypeHandler {
 public: 
     nsMimeContentTypeHandler (const char *aMimeType, 
                               MCTHCreateCTHClass callback);
     virtual       ~nsMimeContentTypeHandler (void);
 
     /* this macro defines QueryInterface, AddRef and Release for this class */
--- a/mailnews/mime/src/mimebuf.cpp
+++ b/mailnews/mime/src/mimebuf.cpp
@@ -121,17 +121,17 @@ mime_ReBuffer (const char *net_buffer, P
   }
   while (net_buffer_size > 0);
 
   return 0;
 }
 
 static int
 convert_and_send_buffer(char* buf, int length, PRBool convert_newlines_p,
-              PRInt32 (*PR_CALLBACK per_line_fn) (char *line,
+              PRInt32 (* per_line_fn) (char *line,
                           PRUint32 line_length,
                           void *closure),
               void *closure)
 {
   /* Convert the line terminator to the native form.
    */
   char* newline;
 
@@ -183,17 +183,17 @@ convert_and_send_buffer(char* buf, int l
 
   return (*per_line_fn)(buf, length, closure);
 }
 
 extern "C" int
 mime_LineBuffer (const char *net_buffer, PRInt32 net_buffer_size,
         char **bufferP, PRInt32 *buffer_sizeP, PRUint32 *buffer_fpP,
         PRBool convert_newlines_p,
-        PRInt32 (*PR_CALLBACK per_line_fn) (char *line, PRUint32 line_length,
+        PRInt32 (* per_line_fn) (char *line, PRUint32 line_length,
                     void *closure),
         void *closure)
 {
   int status = 0;
   if (*buffer_fpP > 0 && *bufferP && (*bufferP)[*buffer_fpP - 1] == '\r' &&
     net_buffer_size > 0 && net_buffer[0] != '\n') {
   /* The last buffer ended with a CR.  The new buffer does not start
      with a LF.  This old buffer should be shipped out and discarded. */
--- a/mailnews/mime/src/mimebuf.h
+++ b/mailnews/mime/src/mimebuf.h
@@ -49,17 +49,17 @@
 extern "C" int mime_GrowBuffer (PRUint32 desired_size,
                PRUint32 element_size, PRUint32 quantum,
                char **buffer, PRInt32 *size);
 
 extern "C" int mime_LineBuffer (const char *net_buffer, PRInt32 net_buffer_size,
                char **bufferP, PRInt32 *buffer_sizeP,
                PRInt32 *buffer_fpP,
                PRBool convert_newlines_p,
-               PRInt32 (*PR_CALLBACK per_line_fn) (char *line, PRInt32
+               PRInt32 (* per_line_fn) (char *line, PRInt32
                          line_length, void *closure),
                void *closure);
 
 extern "C" int mime_ReBuffer (const char *net_buffer, PRInt32 net_buffer_size,
              PRUint32 desired_buffer_size,
              char **bufferP, PRUint32 *buffer_sizeP,
              PRUint32 *buffer_fpP,
              PRInt32 (*per_buffer_fn) (char *buffer,
--- a/mailnews/mime/src/mimecryp.cpp
+++ b/mailnews/mime/src/mimecryp.cpp
@@ -333,17 +333,17 @@ MimeHandleDecryptedOutput (const char *b
    appropriate.
    */
   MimeObject *obj = (MimeObject *) output_closure;
 
   /* Is it truly safe to use ibuffer here?  I think so... */
   return mime_LineBuffer (buf, buf_size,
              &obj->ibuffer, &obj->ibuffer_size, &obj->ibuffer_fp,
              PR_TRUE,
-             ((int (*PR_CALLBACK) (char *, PRInt32, void *))
+             ((int (*) (char *, PRInt32, void *))
               /* This cast is to turn void into MimeObject */
               MimeHandleDecryptedOutputLine),
              obj);
 }
 
 static int
 MimeHandleDecryptedOutputLine (char *line, PRInt32 length, MimeObject *obj)
 {
--- a/mailnews/mime/src/mimedrft.cpp
+++ b/mailnews/mime/src/mimedrft.cpp
@@ -433,17 +433,17 @@ dummy_file_write( char *buf, PRInt32 siz
     return NS_ERROR_FAILURE;
 
   nsIOutputStream  *tStream = (nsIOutputStream *) fileHandle;
   PRUint32 bytesWritten;
   tStream->Write(buf, size, &bytesWritten);
   return (int) bytesWritten;
 }
 
-static int PR_CALLBACK
+static int
 mime_parse_stream_write ( nsMIMESession *stream, const char *buf, PRInt32 size )
 {
   struct mime_draft_data *mdd = (struct mime_draft_data *) stream->data_object;
   NS_ASSERTION ( mdd, "null mime draft data!" );
 
   if ( !mdd || !mdd->obj )
     return -1;
 
@@ -1198,17 +1198,17 @@ mime_insert_forwarded_message_headers(ch
     mime_insert_normal_headers(body, headers, composeFormat, mailcharset);
     break;
   case 2:
     mime_insert_all_headers(body, headers, composeFormat, mailcharset);
     break;
   }
 }
 
-static void PR_CALLBACK
+static void
 mime_parse_stream_complete (nsMIMESession *stream)
 {
   struct mime_draft_data *mdd = (struct mime_draft_data *) stream->data_object;
   nsCOMPtr<nsIMsgCompFields> fields;
   int htmlAction = 0;
   int lineWidth = 0;
 
   char *host = 0;
@@ -1650,17 +1650,17 @@ mime_parse_stream_complete (nsMIMESessio
   PR_FREEIF(foll);
   PR_FREEIF(priority);
   PR_FREEIF(draftInfo);
   PR_Free(identityKey);
 
   mime_free_attach_data(newAttachData);
 }
 
-static void PR_CALLBACK
+static void
 mime_parse_stream_abort (nsMIMESession *stream, int status )
 {
   struct mime_draft_data *mdd = (struct mime_draft_data *) stream->data_object;
   NS_ASSERTION (mdd, "null mime draft data");
 
   if (!mdd)
     return;
 
--- a/mailnews/mime/src/mimei.cpp
+++ b/mailnews/mime/src/mimei.cpp
@@ -130,17 +130,17 @@ typedef struct {
   char        content_type[128];
   PRBool      force_inline_display;
 } cthandler_struct;
 
 nsVoidArray         *ctHandlerList = NULL;
 PRBool              foundIt = PR_FALSE;
 PRBool              force_display = PR_FALSE;
 
-PRBool PR_CALLBACK
+PRBool
 EnumFunction(void* aElement, void *aData)
 {
   cthandler_struct    *ptr = (cthandler_struct *) aElement;
   char                *ctPtr = (char *)aData;
 
   if ( (!aElement) || (!aData) )
     return PR_TRUE;
 
@@ -1800,17 +1800,17 @@ MimeObject_output_init(MimeObject *obj, 
     content_type = obj->content_type;
     if (!content_type)
     content_type = TEXT_PLAIN;
 
     //
     // Set the charset on the channel we are dealing with so people know
     // what the charset is set to. Do this for quoting/Printing ONLY!
     //
-    extern void   PR_CALLBACK ResetChannelCharset(MimeObject *obj);
+    extern void   ResetChannelCharset(MimeObject *obj);
     if ( (obj->options) &&
          ( (obj->options->format_out == nsMimeOutput::nsMimeMessageQuoting) ||
            (obj->options->format_out == nsMimeOutput::nsMimeMessageBodyQuoting) ||
            (obj->options->format_out == nsMimeOutput::nsMimeMessageSaveAs) ||
            (obj->options->format_out == nsMimeOutput::nsMimeMessagePrintOutput) ) )
       ResetChannelCharset(obj);
 
     status = obj->options->output_init_fn (content_type, charset, name,
--- a/mailnews/mime/src/mimemoz2.cpp
+++ b/mailnews/mime/src/mimemoz2.cpp
@@ -2010,17 +2010,17 @@ MimeGetStringByID(PRInt32 stringID)
   }
 
   if (!tempString)
     tempString = strdup(resultString);
 
   return tempString;
 }
 
-void PR_CALLBACK
+void
 ResetChannelCharset(MimeObject *obj)
 {
   if (obj->options && obj->options->stream_closure &&
       obj->options->default_charset && obj->headers )
   {
     mime_stream_data  *msd = (mime_stream_data *) (obj->options->stream_closure);
     char *ct = MimeHeaders_get (obj->headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
     if ( (ct) && (msd) && (msd->channel) )
--- a/mailnews/mime/src/mimemrel.cpp
+++ b/mailnews/mime/src/mimemrel.cpp
@@ -200,17 +200,17 @@ MimeMultipartRelated_initialize(MimeObje
   if (!relobj->hash) return MIME_OUT_OF_MEMORY;
 
   relobj->input_file_stream = nsnull;
   relobj->output_file_stream = nsnull;
 
   return ((MimeObjectClass*)&MIME_SUPERCLASS)->initialize(obj);
 }
 
-static PRIntn PR_CALLBACK
+static PRIntn
 mime_multipart_related_nukehash(PLHashEntry *table,
                                        PRIntn indx, void *arg)
 {
   if (table->key)
     PR_Free((char*) table->key);
 
   if (table->value)
     delete (MimeHashValue *)table->value;
--- a/mailnews/mime/src/mimeobj.cpp
+++ b/mailnews/mime/src/mimeobj.cpp
@@ -276,17 +276,17 @@ static int
 MimeObject_parse_buffer (const char *buffer, PRInt32 size, MimeObject *obj)
 {
   NS_ASSERTION(!obj->closed_p, "object shouldn't be closed");
   if (obj->closed_p) return -1;
 
   return mime_LineBuffer (buffer, size,
              &obj->ibuffer, &obj->ibuffer_size, &obj->ibuffer_fp,
              PR_TRUE,
-             ((int (*PR_CALLBACK) (char *, PRInt32, void *))
+             ((int (*) (char *, PRInt32, void *))
               /* This cast is to turn void into MimeObject */
               obj->clazz->parse_line),
              obj);
 }
 
 static int
 MimeObject_parse_line (const char *line, PRInt32 length, MimeObject *obj)
 {
--- a/mailnews/mime/src/mimetext.cpp
+++ b/mailnews/mime/src/mimetext.cpp
@@ -347,17 +347,17 @@ MimeInlineText_parse_decoded_buffer (con
 
   /* This is just like the parse_decoded_buffer method we inherit from the
    MimeLeaf class, except that we line-buffer to our own wrapper on the
    `parse_line' method instead of calling the `parse_line' method directly.
    */
   return mime_LineBuffer (buf, size,
              &obj->ibuffer, &obj->ibuffer_size, &obj->ibuffer_fp,
              PR_TRUE,
-             ((int (*PR_CALLBACK) (char *, PRInt32, void *))
+             ((int (*) (char *, PRInt32, void *))
               /* This cast is to turn void into MimeObject */
               MimeInlineText_rotate_convert_and_parse_line),
              obj);
 }
 
 
 #define MimeInlineText_grow_cbuffer(text, desired_size) \
   (((desired_size) >= (text)->cbuffer_size) ? \
--- a/suite/browser/src/nsBookmarksService.h
+++ b/suite/browser/src/nsBookmarksService.h
@@ -166,17 +166,17 @@ protected:
     void AnnotateBookmarkSchedule(nsIRDFResource* aSource,
                                   PRBool scheduleFlag);
 
     nsresult InsertResource(nsIRDFResource* aResource,
                             nsIRDFResource* aParentFolder, PRInt32 aIndex);
 
     nsresult getLocaleString(const char *key, nsString &str);
 
-    static int PR_CALLBACK
+    static int
     Compare(const void* aElement1, const void* aElement2, void* aData);
 
     nsresult
     Sort(nsIRDFResource* aFolder, nsIRDFResource* aProperty,
          PRInt32 aDirection, PRBool aFoldersFirst, PRBool aRecurse);
 
     nsresult
     GetURLFromResource(nsIRDFResource* aResource, nsAString& aURL);