summaryrefslogtreecommitdiffstats
path: root/mailnews
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 20:14:13 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 20:14:13 -0500
commita2a658f885ea5cca042709f5a53224dbe57fb478 (patch)
tree014221ae0a8cc6e9b81d4f8ecc48da984e6aedc6 /mailnews
parent713dca2fd8c13e9d417adc7f56ea3b2b54e6d54e (diff)
downloadUXP-a2a658f885ea5cca042709f5a53224dbe57fb478.tar
UXP-a2a658f885ea5cca042709f5a53224dbe57fb478.tar.gz
UXP-a2a658f885ea5cca042709f5a53224dbe57fb478.tar.lz
UXP-a2a658f885ea5cca042709f5a53224dbe57fb478.tar.xz
UXP-a2a658f885ea5cca042709f5a53224dbe57fb478.zip
Bug 1416033 - remove some unneeded includes in mailnews
Tag #1273
Diffstat (limited to 'mailnews')
-rw-r--r--mailnews/addrbook/public/nsIAbLDAPCard.idl4
-rw-r--r--mailnews/addrbook/src/nsAbBSDirectory.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbCardProperty.cpp2
-rw-r--r--mailnews/addrbook/src/nsAbDirProperty.h2
-rw-r--r--mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectory.cpp3
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectoryModify.h1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbLDAPReplicationQuery.h1
-rw-r--r--mailnews/addrbook/src/nsAbMDBDirFactory.cpp1
-rw-r--r--mailnews/addrbook/src/nsAbMDBDirProperty.cpp4
-rw-r--r--mailnews/addrbook/src/nsAbMDBDirectory.cpp2
-rw-r--r--mailnews/addrbook/src/nsAbManager.cpp4
-rw-r--r--mailnews/addrbook/src/nsAbManager.h1
-rw-r--r--mailnews/addrbook/src/nsAbOSXDirectory.h2
-rw-r--r--mailnews/addrbook/src/nsAbView.cpp3
-rw-r--r--mailnews/addrbook/src/nsAddbookProtocolHandler.cpp3
-rw-r--r--mailnews/addrbook/src/nsAddbookProtocolHandler.h2
-rw-r--r--mailnews/addrbook/src/nsAddrDatabase.cpp1
-rw-r--r--mailnews/addrbook/src/nsAddrDatabase.h1
-rw-r--r--mailnews/addrbook/src/nsWabAddressBook.cpp1
-rw-r--r--mailnews/base/src/nsMsgAccountManager.cpp1
-rw-r--r--mailnews/base/src/nsMsgBiffManager.cpp1
-rw-r--r--mailnews/base/src/nsMsgDBView.cpp2
-rw-r--r--mailnews/base/src/nsMsgFolderCompactor.cpp1
-rw-r--r--mailnews/base/util/nsMsgCompressIStream.cpp1
-rw-r--r--mailnews/base/util/nsMsgDBFolder.cpp1
-rw-r--r--mailnews/base/util/nsMsgLineBuffer.cpp2
-rw-r--r--mailnews/base/util/nsMsgMailNewsUrl.cpp1
-rw-r--r--mailnews/base/util/nsMsgProtocol.cpp2
-rw-r--r--mailnews/db/msgdb/src/nsMailDatabase.cpp1
-rw-r--r--mailnews/db/msgdb/src/nsMsgDatabase.cpp3
-rw-r--r--mailnews/db/msgdb/src/nsMsgHdr.cpp1
-rw-r--r--mailnews/extensions/smime/src/nsMsgComposeSecure.cpp3
-rw-r--r--mailnews/imap/src/nsIMAPNamespace.cpp1
-rw-r--r--mailnews/imap/src/nsImapMailFolder.cpp2
-rw-r--r--mailnews/imap/src/nsImapOfflineSync.cpp2
-rw-r--r--mailnews/imap/src/nsImapProtocol.cpp2
-rw-r--r--mailnews/imap/src/nsImapUrl.cpp2
-rw-r--r--mailnews/import/outlook/src/MapiMessage.cpp1
-rw-r--r--mailnews/import/outlook/src/nsOutlookCompose.cpp1
-rw-r--r--mailnews/import/text/src/nsTextAddress.cpp1
-rw-r--r--mailnews/intl/nsCharsetConverterManager.h1
-rw-r--r--mailnews/mime/emitters/nsMimeBaseEmitter.cpp1
-rw-r--r--mailnews/news/src/nsNNTPProtocol.cpp1
47 files changed, 9 insertions, 69 deletions
diff --git a/mailnews/addrbook/public/nsIAbLDAPCard.idl b/mailnews/addrbook/public/nsIAbLDAPCard.idl
index 6761623f2..c1e444291 100644
--- a/mailnews/addrbook/public/nsIAbLDAPCard.idl
+++ b/mailnews/addrbook/public/nsIAbLDAPCard.idl
@@ -2,8 +2,8 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 "nsIAbCard.idl"
+
+#include "nsISupports.idl"
interface nsIAbLDAPAttributeMap;
interface nsILDAPModification;
diff --git a/mailnews/addrbook/src/nsAbBSDirectory.cpp b/mailnews/addrbook/src/nsAbBSDirectory.cpp
index 7ebe67845..446963bb2 100644
--- a/mailnews/addrbook/src/nsAbBSDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbBSDirectory.cpp
@@ -3,7 +3,6 @@
* 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 "nsIPrefService.h"
#include "nsAbBSDirectory.h"
#include "nsDirPrefs.h"
diff --git a/mailnews/addrbook/src/nsAbCardProperty.cpp b/mailnews/addrbook/src/nsAbCardProperty.cpp
index 2c40a4034..aa4b51db1 100644
--- a/mailnews/addrbook/src/nsAbCardProperty.cpp
+++ b/mailnews/addrbook/src/nsAbCardProperty.cpp
@@ -6,7 +6,7 @@
#include "nsAbCardProperty.h"
#include "nsAbBaseCID.h"
#include "nsIPrefService.h"
-#include "nsIAddrDatabase.h"
+#include "nsIAbDirectory.h"
#include "plbase64.h"
#include "nsIStringBundle.h"
#include "plstr.h"
diff --git a/mailnews/addrbook/src/nsAbDirProperty.h b/mailnews/addrbook/src/nsAbDirProperty.h
index 99d16a133..5e15a15fc 100644
--- a/mailnews/addrbook/src/nsAbDirProperty.h
+++ b/mailnews/addrbook/src/nsAbDirProperty.h
@@ -13,10 +13,8 @@
#define nsAbDirProperty_h__
#include "nsIAbDirectory.h" /* include the interface we are going to support */
-#include "nsIAbCard.h"
#include "nsCOMPtr.h"
#include "nsDirPrefs.h"
-#include "nsIAddrDatabase.h"
#include "nsStringGlue.h"
#include "nsIPrefBranch.h"
#include "nsIMutableArray.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
index cc4c04250..acec2e539 100644
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
@@ -7,7 +7,6 @@
#include "nsAbLDAPChangeLogData.h"
#include "nsAbLDAPChangeLogQuery.h"
#include "nsILDAPMessage.h"
-#include "nsIAbCard.h"
#include "nsIAddrBookSession.h"
#include "nsAbBaseCID.h"
#include "nsAbUtils.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectory.cpp b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
index d1bb484c0..480de0564 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
@@ -8,7 +8,6 @@
#include "nsAbQueryStringToExpression.h"
#include "nsAbBaseCID.h"
-#include "nsIAbManager.h"
#include "nsServiceManagerUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsNetCID.h"
@@ -18,6 +17,8 @@
#include "nsEnumeratorUtils.h"
#include "nsIAbLDAPAttributeMap.h"
#include "nsIAbMDBDirectory.h"
+#include "nsIAbManager.h"
+#include "nsIAddrDatabase.h"
#include "nsILDAPURL.h"
#include "nsILDAPConnection.h"
#include "nsAppDirectoryServiceDefs.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
index 95af79c04..8322f6974 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.cpp
@@ -8,7 +8,6 @@
#include "nsILDAPConnection.h"
#include "nsILDAPErrors.h"
#include "nsILDAPModification.h"
-#include "nsIServiceManager.h"
#include "nsIAbLDAPDirectory.h"
#include "nsIMutableArray.h"
#include "nsComponentManagerUtils.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
index 8e14b8368..c1a2f591f 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryModify.h
@@ -8,7 +8,6 @@
#include "nsAbLDAPListenerBase.h"
#include "nsIAbLDAPDirectory.h"
-#include "nsILDAPOperation.h"
#include "nsIArray.h"
class nsILDAPURL;
diff --git a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
index 9b22c796c..18964a380 100644
--- a/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectoryQuery.cpp
@@ -7,7 +7,6 @@
#include "nsAbBoolExprToLDAPFilter.h"
#include "nsILDAPMessage.h"
#include "nsILDAPErrors.h"
-#include "nsILDAPOperation.h"
#include "nsIAbLDAPAttributeMap.h"
#include "nsIAbLDAPCard.h"
#include "nsAbUtils.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
index d82a8336c..cab9825ed 100644
--- a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.cpp
@@ -8,7 +8,6 @@
#include "nsAbLDAPReplicationQuery.h"
#include "nsAbLDAPReplicationService.h"
#include "nsAbLDAPReplicationData.h"
-#include "nsILDAPURL.h"
#include "nsAbBaseCID.h"
#include "nsAbUtils.h"
#include "nsDirPrefs.h"
diff --git a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
index f5d7cdda7..ebae95cbd 100644
--- a/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
+++ b/mailnews/addrbook/src/nsAbLDAPReplicationQuery.h
@@ -6,7 +6,6 @@
#ifndef nsAbLDAPReplicationQuery_h__
#define nsAbLDAPReplicationQuery_h__
-#include "nsIWebProgressListener.h"
#include "nsIAbLDAPReplicationQuery.h"
#include "nsIAbLDAPReplicationData.h"
#include "nsIAbLDAPDirectory.h"
diff --git a/mailnews/addrbook/src/nsAbMDBDirFactory.cpp b/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
index 73ecb32fc..546a80d17 100644
--- a/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirFactory.cpp
@@ -11,7 +11,6 @@
#include "nsIAbManager.h"
#include "nsIAbMDBDirectory.h"
#include "nsAbMDBDirFactory.h"
-#include "nsIAddrDBListener.h"
#include "nsIAddrDatabase.h"
#include "nsEnumeratorUtils.h"
#include "nsIMutableArray.h"
diff --git a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
index 7df904d87..1a7ae59d7 100644
--- a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp
@@ -3,14 +3,12 @@
* 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 "nsAbMDBDirProperty.h"
-#include "nsIServiceManager.h"
+#include "nsAbMDBDirProperty.h"
#include "nsStringGlue.h"
#include "nsCOMPtr.h"
#include "nsAbBaseCID.h"
#include "nsAddrDatabase.h"
#include "nsIAbCard.h"
-#include "nsIAbListener.h"
#include "nsArrayUtils.h"
#include "mdb.h"
#include "nsComponentManagerUtils.h"
diff --git a/mailnews/addrbook/src/nsAbMDBDirectory.cpp b/mailnews/addrbook/src/nsAbMDBDirectory.cpp
index be4799cf1..cb212158e 100644
--- a/mailnews/addrbook/src/nsAbMDBDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbMDBDirectory.cpp
@@ -8,9 +8,7 @@
#include "nsCOMPtr.h"
#include "nsAbBaseCID.h"
#include "nsAddrDatabase.h"
-#include "nsIAbListener.h"
#include "nsIAbManager.h"
-#include "nsIURL.h"
#include "nsNetCID.h"
#include "nsAbDirectoryQuery.h"
#include "nsIAbDirectoryQueryProxy.h"
diff --git a/mailnews/addrbook/src/nsAbManager.cpp b/mailnews/addrbook/src/nsAbManager.cpp
index 2de1b4468..ca640248e 100644
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -6,7 +6,6 @@
#include "nsAbManager.h"
#include "nsAbBaseCID.h"
#include "nsAddrDatabase.h"
-#include "nsIAbMDBDirectory.h"
#include "nsIOutputStream.h"
#include "nsNetUtil.h"
#include "nsMsgI18N.h"
@@ -15,7 +14,6 @@
#include "nsAppDirectoryServiceDefs.h"
#include "plstr.h"
#include "prmem.h"
-#include "nsIServiceManager.h"
#include "mozIDOMWindow.h"
#include "nsIFilePicker.h"
#include "plbase64.h"
@@ -32,9 +30,7 @@
#include "nsIObserverService.h"
#include "nsDirPrefs.h"
#include "nsThreadUtils.h"
-#include "nsIAbDirFactory.h"
#include "nsComponentManagerUtils.h"
-#include "nsIIOService.h"
#include "nsAbQueryStringToExpression.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Services.h"
diff --git a/mailnews/addrbook/src/nsAbManager.h b/mailnews/addrbook/src/nsAbManager.h
index 066fa8a08..0922db38d 100644
--- a/mailnews/addrbook/src/nsAbManager.h
+++ b/mailnews/addrbook/src/nsAbManager.h
@@ -12,7 +12,6 @@
#include "nsICommandLineHandler.h"
#include "nsIObserver.h"
#include "nsInterfaceHashtable.h"
-#include "nsIAbDirFactoryService.h"
#include "nsIAbDirectory.h"
class nsIAbLDAPAttributeMap;
diff --git a/mailnews/addrbook/src/nsAbOSXDirectory.h b/mailnews/addrbook/src/nsAbOSXDirectory.h
index 7e3fad96c..1be054480 100644
--- a/mailnews/addrbook/src/nsAbOSXDirectory.h
+++ b/mailnews/addrbook/src/nsAbOSXDirectory.h
@@ -10,8 +10,6 @@
#include "nsISupports.h"
#include "nsAbBaseCID.h"
#include "nsAbDirProperty.h"
-#include "nsIAbDirectoryQuery.h"
-#include "nsIAbDirectorySearch.h"
#include "nsIAbDirSearchListener.h"
#include "nsIMutableArray.h"
#include "nsInterfaceHashtable.h"
diff --git a/mailnews/addrbook/src/nsAbView.cpp b/mailnews/addrbook/src/nsAbView.cpp
index aed4390de..0cd52396d 100644
--- a/mailnews/addrbook/src/nsAbView.cpp
+++ b/mailnews/addrbook/src/nsAbView.cpp
@@ -8,7 +8,6 @@
#include "nsAbView.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
-#include "nsIServiceManager.h"
#include "nsIAbCard.h"
#include "nsILocale.h"
#include "nsILocaleService.h"
@@ -26,7 +25,7 @@
#include "nsIStringBundle.h"
#include "nsIPrefLocalizedString.h"
#include "nsArrayUtils.h"
-#include "nsIAddrDatabase.h" // for kPriEmailColumn
+#include "nsIAddrDatabase.h" // for kPhoneticNameColumn
#include "nsMsgUtils.h"
#include "mozilla/Services.h"
diff --git a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
index 9507a3cc9..8681ae4a6 100644
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -4,9 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "msgCore.h" // precompiled header...
#include "nsStringGlue.h"
-#include "nsIIOService.h"
-#include "nsIStreamListener.h"
#include "nsAddbookProtocolHandler.h"
#include "nsAddbookUrl.h"
@@ -21,7 +19,6 @@
#include "nsIAbView.h"
#include "nsITreeView.h"
#include "nsIStringBundle.h"
-#include "nsIServiceManager.h"
#include "mozilla/Services.h"
#include "nsIAsyncInputStream.h"
#include "nsIAsyncOutputStream.h"
diff --git a/mailnews/addrbook/src/nsAddbookProtocolHandler.h b/mailnews/addrbook/src/nsAddbookProtocolHandler.h
index 1eb07a4ff..f14d54c4e 100644
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.h
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.h
@@ -11,7 +11,7 @@
#include "nsAddbookProtocolHandler.h"
#include "nsIProtocolHandler.h"
#include "nsIAddbookUrl.h"
-#include "nsIAddrDatabase.h"
+#include "nsIAbDirectory.h"
class nsAddbookProtocolHandler : public nsIProtocolHandler
{
diff --git a/mailnews/addrbook/src/nsAddrDatabase.cpp b/mailnews/addrbook/src/nsAddrDatabase.cpp
index 9b1450b94..463437958 100644
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -31,7 +31,6 @@
#include "nsIPrefBranch.h"
#include "nsIAbManager.h"
#include "mozilla/Services.h"
-#include <algorithm>
#define ID_PAB_TABLE 1
#define ID_DELETEDCARDS_TABLE 2
diff --git a/mailnews/addrbook/src/nsAddrDatabase.h b/mailnews/addrbook/src/nsAddrDatabase.h
index 3b4e4eee6..6a12f1744 100644
--- a/mailnews/addrbook/src/nsAddrDatabase.h
+++ b/mailnews/addrbook/src/nsAddrDatabase.h
@@ -14,7 +14,6 @@
#include "nsCOMPtr.h"
#include "nsTObserverArray.h"
#include "nsWeakPtr.h"
-#include "nsIWeakReferenceUtils.h"
typedef enum
{
diff --git a/mailnews/addrbook/src/nsWabAddressBook.cpp b/mailnews/addrbook/src/nsWabAddressBook.cpp
index 9c991ddf5..44ccdea2c 100644
--- a/mailnews/addrbook/src/nsWabAddressBook.cpp
+++ b/mailnews/addrbook/src/nsWabAddressBook.cpp
@@ -6,7 +6,6 @@
#include <tchar.h>
#include "nsWabAddressBook.h"
#include "mozilla/Logging.h"
-#include <algorithm>
#ifdef PR_LOGGING
static PRLogModuleInfo* gWabAddressBookLog
diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp
index 5dd3893b6..9dd73d6f9 100644
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -71,7 +71,6 @@
#include "nsIMsgFilterList.h"
#include "nsDirectoryServiceUtils.h"
#include "mozilla/Services.h"
-#include <algorithm>
#include "nsIFileStreams.h"
#include "nsIOutputStream.h"
#include "nsISafeOutputStream.h"
diff --git a/mailnews/base/src/nsMsgBiffManager.cpp b/mailnews/base/src/nsMsgBiffManager.cpp
index 360600147..d0fc8aba4 100644
--- a/mailnews/base/src/nsMsgBiffManager.cpp
+++ b/mailnews/base/src/nsMsgBiffManager.cpp
@@ -17,7 +17,6 @@
#include "nsServiceManagerUtils.h"
#include "nsMsgUtils.h"
#include "mozilla/Services.h"
-#include <algorithm>
#define PREF_BIFF_JITTER "mail.biff.add_interval_jitter"
diff --git a/mailnews/base/src/nsMsgDBView.cpp b/mailnews/base/src/nsMsgDBView.cpp
index f7856dd4d..baad45ef5 100644
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -43,7 +43,6 @@
#include "nsServiceManagerUtils.h"
#include "nsComponentManagerUtils.h"
#include "nsMemory.h"
-#include "nsAlgorithm.h"
#include "nsIAbManager.h"
#include "nsIAbDirectory.h"
#include "nsIAbCard.h"
@@ -51,7 +50,6 @@
#include "mozilla/Attributes.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "nsTArray.h"
-#include <algorithm>
using namespace mozilla::mailnews;
nsrefcnt nsMsgDBView::gInstanceCount = 0;
diff --git a/mailnews/base/src/nsMsgFolderCompactor.cpp b/mailnews/base/src/nsMsgFolderCompactor.cpp
index 5224aef51..c20d54b0f 100644
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -33,7 +33,6 @@
#include "nsIMsgFolderNotificationService.h"
#include "nsIMsgPluggableStore.h"
#include "nsMsgFolderCompactor.h"
-#include <algorithm>
#include "nsIOutputStream.h"
#include "nsIInputStream.h"
#include "nsPrintfCString.h"
diff --git a/mailnews/base/util/nsMsgCompressIStream.cpp b/mailnews/base/util/nsMsgCompressIStream.cpp
index 5b47422f2..b2a7013cf 100644
--- a/mailnews/base/util/nsMsgCompressIStream.cpp
+++ b/mailnews/base/util/nsMsgCompressIStream.cpp
@@ -5,7 +5,6 @@
#include "nsMsgCompressIStream.h"
#include "prio.h"
#include "prmem.h"
-#include "nsAlgorithm.h"
#include <algorithm>
#define BUFFER_SIZE 16384
diff --git a/mailnews/base/util/nsMsgDBFolder.cpp b/mailnews/base/util/nsMsgDBFolder.cpp
index 3a1a571e2..81790c69a 100644
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -63,7 +63,6 @@
#include "nsIPK11TokenDB.h"
#include "nsIPK11Token.h"
#include "nsMsgLocalFolderHdrs.h"
-#include <algorithm>
#define oneHour 3600000000U
#include "nsMsgUtils.h"
#include "nsIMsgFilterService.h"
diff --git a/mailnews/base/util/nsMsgLineBuffer.cpp b/mailnews/base/util/nsMsgLineBuffer.cpp
index 0a88cd840..56f8a9504 100644
--- a/mailnews/base/util/nsMsgLineBuffer.cpp
+++ b/mailnews/base/util/nsMsgLineBuffer.cpp
@@ -7,10 +7,8 @@
#include "prlog.h"
#include "prmem.h"
#include "nsMsgLineBuffer.h"
-#include "nsAlgorithm.h"
#include "nsMsgUtils.h"
#include "nsIInputStream.h" // used by nsMsgLineStreamBuffer
-#include <algorithm>
nsByteArray::nsByteArray()
{
diff --git a/mailnews/base/util/nsMsgMailNewsUrl.cpp b/mailnews/base/util/nsMsgMailNewsUrl.cpp
index 17f95fc30..2c80cb692 100644
--- a/mailnews/base/util/nsMsgMailNewsUrl.cpp
+++ b/mailnews/base/util/nsMsgMailNewsUrl.cpp
@@ -25,7 +25,6 @@
#include <time.h>
#include "nsMsgUtils.h"
#include "mozilla/Services.h"
-#include <algorithm>
#include "nsProxyRelease.h"
#include "mozilla/BasePrincipal.h"
diff --git a/mailnews/base/util/nsMsgProtocol.cpp b/mailnews/base/util/nsMsgProtocol.cpp
index f2190cb45..c86995189 100644
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -36,9 +36,7 @@
#include "nsIMsgIncomingServer.h"
#include "nsIInputStreamPump.h"
#include "nsMimeTypes.h"
-#include "nsAlgorithm.h"
#include "mozilla/Services.h"
-#include <algorithm>
#include "nsContentSecurityManager.h"
#undef PostMessage // avoid to collision with WinUser.h
diff --git a/mailnews/db/msgdb/src/nsMailDatabase.cpp b/mailnews/db/msgdb/src/nsMailDatabase.cpp
index b9202a4b2..9e7c15260 100644
--- a/mailnews/db/msgdb/src/nsMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp
@@ -8,7 +8,6 @@
#include "nsDBFolderInfo.h"
#include "nsMsgLocalFolderHdrs.h"
#include "nsNetUtil.h"
-#include "nsISeekableStream.h"
#include "nsMsgOfflineImapOperation.h"
#include "nsMsgFolderFlags.h"
#include "mozilla/Logging.h"
diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
index eb5f345f6..0b422b31d 100644
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -37,13 +37,10 @@
#include "nsCollationCID.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
-#include "nsIMsgPluggableStore.h"
-#include "nsAlgorithm.h"
#include "nsArrayEnumerator.h"
#include "nsIMemoryReporter.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "mozilla/mailnews/Services.h"
-#include <algorithm>
using namespace mozilla::mailnews;
using namespace mozilla;
diff --git a/mailnews/db/msgdb/src/nsMsgHdr.cpp b/mailnews/db/msgdb/src/nsMsgHdr.cpp
index 136079473..fd172024e 100644
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -10,7 +10,6 @@
#include "nsMsgUtils.h"
#include "nsIMsgThread.h"
#include "nsMsgMimeCID.h"
-#include "nsIMimeConverter.h"
#include "mozilla/Attributes.h"
using namespace mozilla::mailnews;
diff --git a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
index 55383c828..b98efdc5e 100644
--- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
+++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp
@@ -6,8 +6,6 @@
#include "nsMsgComposeSecure.h"
-#include <algorithm>
-
#include "ScopedNSSTypes.h"
#include "cert.h"
#include "keyhi.h"
@@ -16,7 +14,6 @@
#include "mozilla/mailnews/MimeEncoder.h"
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "msgCore.h"
-#include "nsAlgorithm.h"
#include "nsComponentManagerUtils.h"
#include "nsICryptoHash.h"
#include "nsIMimeConverter.h"
diff --git a/mailnews/imap/src/nsIMAPNamespace.cpp b/mailnews/imap/src/nsIMAPNamespace.cpp
index d46352373..2cba54016 100644
--- a/mailnews/imap/src/nsIMAPNamespace.cpp
+++ b/mailnews/imap/src/nsIMAPNamespace.cpp
@@ -12,6 +12,7 @@
#include "nsImapUrl.h"
#include "nsStringGlue.h"
#include "nsServiceManagerUtils.h"
+#include <algorithm>
//////////////////// nsIMAPNamespace /////////////////////////////////////////////////////////////
diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp
index 4ed12a026..df222cb85 100644
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -90,9 +90,7 @@
#include "nsMsgReadStateTxn.h"
#include "nsIStringEnumerator.h"
#include "nsIMsgStatusFeedback.h"
-#include "nsAlgorithm.h"
#include "nsMsgLineBuffer.h"
-#include <algorithm>
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
#include "nsStringStream.h"
diff --git a/mailnews/imap/src/nsImapOfflineSync.cpp b/mailnews/imap/src/nsImapOfflineSync.cpp
index df31bd299..2d86ce1b5 100644
--- a/mailnews/imap/src/nsImapOfflineSync.cpp
+++ b/mailnews/imap/src/nsImapOfflineSync.cpp
@@ -23,9 +23,7 @@
#include "nsMsgUtils.h"
#include "nsIMutableArray.h"
#include "nsIAutoSyncManager.h"
-#include "nsAlgorithm.h"
#include "nsArrayUtils.h"
-#include <algorithm>
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp
index b671574ac..9114a28f2 100644
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -38,7 +38,6 @@
#include "nsTextFormatter.h"
#include "nsIMsgHdr.h"
#include "nsMsgI18N.h"
-#include <algorithm>
// for the memory cache...
#include "nsICacheEntry.h"
#include "nsICacheStorage.h"
@@ -75,7 +74,6 @@ PRLogModuleInfo *IMAP;
#include "nsDebug.h"
#include "nsMsgCompressIStream.h"
#include "nsMsgCompressOStream.h"
-#include "nsAlgorithm.h"
#include "mozilla/Logging.h"
#include "mozilla/Attributes.h"
#include "nsIPrincipal.h"
diff --git a/mailnews/imap/src/nsImapUrl.cpp b/mailnews/imap/src/nsImapUrl.cpp
index d76437905..8fd9f2f65 100644
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -28,9 +28,7 @@
#include "nsMsgUtils.h"
#include "nsIMsgHdr.h"
#include "nsIProgressEventSink.h"
-#include "nsAlgorithm.h"
#include "nsServiceManagerUtils.h"
-#include <algorithm>
using namespace mozilla;
diff --git a/mailnews/import/outlook/src/MapiMessage.cpp b/mailnews/import/outlook/src/MapiMessage.cpp
index 52ec2e4c0..6b02db314 100644
--- a/mailnews/import/outlook/src/MapiMessage.cpp
+++ b/mailnews/import/outlook/src/MapiMessage.cpp
@@ -26,7 +26,6 @@
#include "MapiMimeTypes.h"
-#include <algorithm>
#include "nsMsgI18N.h"
#include "nsICharsetConverterManager.h"
#include "nsCRT.h"
diff --git a/mailnews/import/outlook/src/nsOutlookCompose.cpp b/mailnews/import/outlook/src/nsOutlookCompose.cpp
index eb47a29fd..96c0824aa 100644
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -43,7 +43,6 @@
#include "nsMsgMessageFlags.h"
#include "nsMsgLocalFolderHdrs.h"
-#include <algorithm>
static NS_DEFINE_CID(kMsgSendCID, NS_MSGSEND_CID);
static NS_DEFINE_CID(kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
diff --git a/mailnews/import/text/src/nsTextAddress.cpp b/mailnews/import/text/src/nsTextAddress.cpp
index 6b0b82ed1..8a22498d2 100644
--- a/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mailnews/import/text/src/nsTextAddress.cpp
@@ -21,7 +21,6 @@
#include "TextDebugLog.h"
#include "plstr.h"
#include "msgCore.h"
-#include <algorithm>
#ifndef MOZILLA_INTERNAL_API
#include "nsMsgI18N.h"
diff --git a/mailnews/intl/nsCharsetConverterManager.h b/mailnews/intl/nsCharsetConverterManager.h
index 3cc1f5830..9d00542b2 100644
--- a/mailnews/intl/nsCharsetConverterManager.h
+++ b/mailnews/intl/nsCharsetConverterManager.h
@@ -5,7 +5,6 @@
#ifndef nsCharsetConverterManager_h__
#define nsCharsetConverterManager_h__
-#include "nsISupports.h"
#include "nsICharsetConverterManager.h"
#define NS_DATA_BUNDLE_CATEGORY "uconv-charset-data"
diff --git a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
index 223eef433..3395ab1c1 100644
--- a/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
+++ b/mailnews/mime/emitters/nsMimeBaseEmitter.cpp
@@ -31,7 +31,6 @@
#include "nsMsgUtils.h"
#include "nsTextFormatter.h"
#include "mozilla/Services.h"
-#include <algorithm>
static PRLogModuleInfo * gMimeEmitterLogModule = nullptr;
diff --git a/mailnews/news/src/nsNNTPProtocol.cpp b/mailnews/news/src/nsNNTPProtocol.cpp
index c6b4c799b..7c6314d52 100644
--- a/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mailnews/news/src/nsNNTPProtocol.cpp
@@ -31,7 +31,6 @@
#include "mozilla/mailnews/MimeHeaderParser.h"
#include "prprf.h"
-#include <algorithm>
/* include event sink interfaces for news */