Bug 971087 - Remove OS/2 support from comm-central: mailnews. r=Standard8
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 25 Feb 2014 14:24:35 +0100
changeset 19560 c8431e115b2f89118b4c7108f7767d340d084ba2
parent 19559 34c4cb8687bbfd00e8edc6a4253779afb9233e82
child 19561 2e69c2fe84ae9120e5df921c84a39f3ef350431c
push id1133
push usermbanner@mozilla.com
push dateMon, 28 Apr 2014 19:42:02 +0000
treeherdercomm-beta@ca498fc736fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs971087
Bug 971087 - Remove OS/2 support from comm-central: mailnews. r=Standard8
mailnews/addrbook/src/nsDirPrefs.cpp
mailnews/base/public/msgCore.h
mailnews/base/src/moz.build
mailnews/base/src/nsMessengerOS2Integration.cpp
mailnews/base/src/nsMessengerOS2Integration.h
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/base/util/nsMsgUtils.cpp
mailnews/base/util/nsStopwatch.cpp
mailnews/build/nsMailModule.cpp
mailnews/import/eudora/src/nsEudoraFilters.cpp
mailnews/import/eudora/src/nsEudoraImport.cpp
mailnews/import/eudora/src/nsEudoraSettings.cpp
mailnews/local/src/nsLocalUtils.cpp
mailnews/mailnews.js
--- a/mailnews/addrbook/src/nsDirPrefs.cpp
+++ b/mailnews/addrbook/src/nsDirPrefs.cpp
@@ -870,17 +870,17 @@ static int32_t DIR_GetIntPref(const char
 }
 
 /* This will convert from the old preference that was a path and filename */
 /* to a just a filename */
 static void DIR_ConvertServerFileName(DIR_Server* pServer)
 {
   char* leafName = pServer->fileName;
   char* newLeafName = nullptr;
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   /* jefft -- bug 73349 This is to allow users share same address book.
    * It only works if the user specify a full path filename.
    */
 #ifdef XP_FileIsFullPath
   if (! XP_FileIsFullPath(leafName))
     newLeafName = XP_STRRCHR (leafName, '\\');
 #endif /* XP_FileIsFullPath */
 #else
--- a/mailnews/base/public/msgCore.h
+++ b/mailnews/base/public/msgCore.h
@@ -66,17 +66,17 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODUL
 /* these are shortcuts to generate simple errors with a zero value */
 #define NS_MSG_SUCCESS NS_MSG_GENERATE_SUCCESS(0)
 #define NS_MSG_FAILURE NS_MSG_GENERATE_FAILURE(0)
 
 #define IS_SPACE(VAL) \
   (((((PRIntn)(VAL)) & 0x7f) == ((PRIntn)(VAL))) && isspace((PRIntn)(VAL)))
 
 #define IS_DIGIT(i)   ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
 #define IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
 #else
 #define IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? (int) 0 : isalpha((int)(VAL)))
 #endif
 
 /* for retrieving information out of messenger nsresults */
 
 #define NS_IS_MSG_ERROR(err) \
@@ -165,17 +165,17 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODUL
    code space as other mailnews modules. To avoid any conflict, values between
    12500 and 12999 are reserved.
 */
 #define NS_MSGCOMP_ERROR_BEGIN 12500
 /* NS_ERROR_NNTP_NO_CROSS_POSTING lives here, and not in nsMsgComposeStringBundle.h, because it is used in news and compose. */
 #define NS_ERROR_NNTP_NO_CROSS_POSTING NS_MSG_GENERATE_FAILURE(12554)
 #define NS_MSGCOMP_ERROR_END 12999
 
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
 #define MSG_LINEBREAK "\015\012"
 #define MSG_LINEBREAK_LEN 2
 #else
 #define MSG_LINEBREAK "\012"
 #define MSG_LINEBREAK_LEN 1
 #endif
 
 #define NS_MSG_BASE
--- a/mailnews/base/src/moz.build
+++ b/mailnews/base/src/moz.build
@@ -53,18 +53,16 @@ SOURCES += [
     'nsSubscribeDataSource.cpp',
 ]
 
 if CONFIG['NS_PRINTING']:
     SOURCES += ['nsMsgPrintEngine.cpp']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     SOURCES += ['nsMessengerWinIntegration.cpp']
-elif CONFIG['OS_ARCH'] == 'OS2':
-    SOURCES += ['nsMessengerOS2Integration.cpp']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     SOURCES += ['nsMessengerUnixIntegration.cpp']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += ['nsMessengerOSXIntegration.mm']
 
 EXTRA_COMPONENTS += [
     'msgAsyncPrompter.js',
deleted file mode 100644
--- a/mailnews/base/src/nsMessengerOS2Integration.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#define INCL_DOSMEMMGR
-#define INCL_DOSERRORS
-#include <os2.h>
-
-#include "nsMessengerOS2Integration.h"
-#include "nsIMsgAccountManager.h"
-#include "nsMsgBaseCID.h"
-#include "nsMsgUtils.h"
-
-#define WARPCENTER_SHAREDMEM "\\sharemem\\inbox.mem"
-
-nsMessengerOS2Integration::nsMessengerOS2Integration()
-{
-  PVOID pvObject = NULL;
-  PULONG pUnreadState = NULL;
-  APIRET rc = DosGetNamedSharedMem((PVOID *)&pUnreadState, WARPCENTER_SHAREDMEM,
-                                   PAG_READ | PAG_WRITE);
-
-  if (rc != NO_ERROR) {
-#ifdef MOZ_OS2_HIGH_MEMORY
-    rc = DosAllocSharedMem(&pvObject, WARPCENTER_SHAREDMEM, sizeof(ULONG),
-                           PAG_COMMIT | PAG_WRITE | OBJ_ANY);
-    if (rc != NO_ERROR) { // Did the kernel handle OBJ_ANY?
-      // Try again without OBJ_ANY and if the first failure was not caused
-      // by OBJ_ANY then we will get the same failure, else we have taken
-      // care of pre-FP13 systems where the kernel couldn't handle it.
-      rc = DosAllocSharedMem(&pvObject, WARPCENTER_SHAREDMEM, sizeof(ULONG),
-                             PAG_COMMIT | PAG_WRITE);
-    }
-#else
-    rc = DosAllocSharedMem(&pvObject, WARPCENTER_SHAREDMEM, sizeof(ULONG),
-                           PAG_COMMIT | PAG_WRITE);
-#endif
-    pUnreadState = (PULONG)pvObject;
-  }
-  *pUnreadState = 0;
-
-  mBiffStateAtom = MsgGetAtom("BiffState");
-  mTotalUnreadMessagesAtom = MsgGetAtom("TotalUnreadMessages");
-}
-
-nsMessengerOS2Integration::~nsMessengerOS2Integration()
-{
-  PULONG pUnreadState = NULL;
-  APIRET rc = DosGetNamedSharedMem((PVOID *)&pUnreadState, WARPCENTER_SHAREDMEM,
-                                   PAG_READ | PAG_WRITE);
-
-  if (rc != NO_ERROR) {
-    rc = DosFreeMem(pUnreadState);
-  }
-}
-
-NS_IMPL_ISUPPORTS2(nsMessengerOS2Integration, nsIMessengerOSIntegration, nsIFolderListener)
-
-nsresult
-nsMessengerOS2Integration::Init()
-{
-  nsresult rv;
-
-  nsCOMPtr <nsIMsgAccountManager> accountManager = 
-    do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv,rv);
-
-  // because we care if the default server changes
-  rv = accountManager->AddRootFolderListener(this);
-  NS_ENSURE_SUCCESS(rv,rv);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemPropertyChanged(nsIMsgFolder *, nsIAtom *, char const *, char const *)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemUnicharPropertyChanged(nsIMsgFolder *, nsIAtom *, const char16_t *, const char16_t *)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemRemoved(nsIMsgFolder *, nsISupports *)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemPropertyFlagChanged(nsIMsgDBHdr *item, nsIAtom *property, uint32_t oldFlag, uint32_t newFlag)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemAdded(nsIMsgFolder *, nsISupports *)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemBoolPropertyChanged(nsIMsgFolder *aItem, nsIAtom *aProperty, bool aOldValue, bool aNewValue)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemEvent(nsIMsgFolder *, nsIAtom *)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsMessengerOS2Integration::OnItemIntPropertyChanged(nsIMsgFolder *aItem, nsIAtom *aProperty, int32_t aOldValue, int32_t aNewValue)
-{
-  PULONG pUnreadState = NULL;
-  APIRET rc = DosGetNamedSharedMem((PVOID *)&pUnreadState, WARPCENTER_SHAREDMEM,
-                                   PAG_READ | PAG_WRITE);
-  if (rc != NO_ERROR)
-    return NS_OK;
-
-  if (aProperty == mBiffStateAtom) {
-    if (aNewValue == nsIMsgFolder::nsMsgBiffState_NewMail) {
-      *pUnreadState = 1;
-    } else if (aNewValue == nsIMsgFolder::nsMsgBiffState_NoMail) {
-      *pUnreadState = 0;
-    } else {
-      // setting nothing, unknown state (nsIMsgFolder::nsMsgBiffState_Unknown)
-    }
-  } else if (aProperty == mTotalUnreadMessagesAtom) {
-    // do nothing for now
-    // (we just want to reflect the statusbar mail biff in the system)
-  }
-
-  return NS_OK;
-}
deleted file mode 100644
--- a/mailnews/base/src/nsMessengerOS2Integration.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#ifndef __nsMessengerOS2Integration_h
-#define __nsMessengerOS2Integration_h
-
-#include "nsIMessengerOSIntegration.h"
-#include "nsIFolderListener.h"
-
-#define NS_MESSENGEROS2INTEGRATION_CID \
-  {0xf62f3d3a, 0x1dd1, 0x11b2, \
-    {0xa5, 0x16, 0xef, 0xad, 0xb1, 0x31, 0x61, 0x5c}}
-
-class nsMessengerOS2Integration : public nsIMessengerOSIntegration,
-                                  public nsIFolderListener
-{
-public:
-  nsMessengerOS2Integration();
-  virtual ~nsMessengerOS2Integration();
-  virtual nsresult Init();
-
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIMESSENGEROSINTEGRATION
-  NS_DECL_NSIFOLDERLISTENER
-
-private:
-  nsCOMPtr<nsIAtom> mBiffStateAtom;
-  nsCOMPtr<nsIAtom> mTotalUnreadMessagesAtom;
-};
-
-#endif // __nsMessengerOS2Integration_h
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -3255,17 +3255,17 @@ nsMsgDBFolder::parseURI(bool needServer)
     if (NS_FAILED(rv)) return rv;
 
     if (!mPath && serverPath)
     {
       if (!newPath.IsEmpty())
       {
         // I hope this is temporary - Ultimately,
         // NS_MsgCreatePathStringFromFolderURI will need to be fixed.
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
         MsgReplaceChar(newPath, '/', '\\');
 #endif
         rv = serverPath->AppendRelativeNativePath(newPath);
         NS_ASSERTION(NS_SUCCEEDED(rv),"failed to append to the serverPath");
         if (NS_FAILED(rv))
         {
           mPath = nullptr;
           return rv;
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -362,18 +362,16 @@ static bool ConvertibleToNative(const ns
 #endif
     return str.Equals(roundTripped);
 }
 
 #if defined(XP_UNIX)
   const static uint32_t MAX_LEN = 55;
 #elif defined(XP_WIN32)
   const static uint32_t MAX_LEN = 55;
-#elif defined(XP_OS2)
-  const static uint32_t MAX_LEN = 55;
 #else
   #error need_to_define_your_max_filename_length
 #endif
 
 nsresult NS_MsgHashIfNecessary(nsAutoCString &name)
 {
   nsAutoCString str(name);
 
--- a/mailnews/base/util/nsStopwatch.cpp
+++ b/mailnews/base/util/nsStopwatch.cpp
@@ -1,17 +1,17 @@
 /* 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 "nsStopwatch.h"
 
 #include <stdio.h>
 #include <time.h>
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
 #include <unistd.h>
 #include <sys/times.h>
 #include <sys/time.h>
 #include <errno.h>
 #elif defined(XP_WIN)
 #include "windows.h"
 #endif // elif defined(XP_WIN)
 
@@ -25,17 +25,17 @@
  * that it will not be removed immediately from mozilla-central.)
  * 
  * Simplification and general clean-up has been performed and the fix for
  * bug 96669 has been integrated.
  */
 
 NS_IMPL_ISUPPORTS1(nsStopwatch, nsIStopwatch)
 
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
 /** the number of ticks per second */
 static double gTicks = 0;
 #define MICRO_SECONDS_TO_SECONDS_MULT static_cast<double>(1.0e-6)
 #elif defined(WIN32)
 #ifdef DEBUG
 #ifdef MOZILLA_INTERNAL_API
 #include "nsPrintfCString.h"
 #endif
@@ -46,17 +46,17 @@ static double gTicks = 0;
 #define UNIX_EPOCH_IN_FILE_TIME 116444736000000000L
 #endif // elif defined(WIN32)
 
 nsStopwatch::nsStopwatch()
  : fTotalRealTimeSecs(0.0)
  , fTotalCpuTimeSecs(0.0)
  , fRunning(false)
 {
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
   // idempotent in the event of a race under all coherency models
   if (!gTicks)
   {
     // we need to clear errno because sysconf's spec says it leaves it the same
     //  on success and only sets it on failure.
     errno = 0;
     gTicks = (clock_t)sysconf(_SC_CLK_TCK);
     // in event of failure, pick an arbitrary value so we don't divide by zero.
@@ -112,17 +112,17 @@ NS_IMETHODIMP nsStopwatch::GetRealTimeSe
 {
   NS_ENSURE_ARG_POINTER(result);
   *result = fTotalRealTimeSecs;
   return NS_OK;
 }
 
 double nsStopwatch::GetRealTime()
 {
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
   struct timeval t;
   gettimeofday(&t, NULL);
   return t.tv_sec + t.tv_usec * MICRO_SECONDS_TO_SECONDS_MULT;
 #elif defined(WIN32)
   union     {FILETIME ftFileTime;
              __int64  ftInt64;
             } ftRealTime; // time the process has spent in kernel mode
   SYSTEMTIME st;
@@ -131,17 +131,17 @@ double nsStopwatch::GetRealTime()
   return (ftRealTime.ftInt64 - UNIX_EPOCH_IN_FILE_TIME) * WIN32_TICK_RESOLUTION;
 #else
 #error "nsStopwatch not supported on this platform."
 #endif
 }
 
 double nsStopwatch::GetCPUTime()
 {
-#if defined(XP_UNIX) || defined(XP_OS2)
+#if defined(XP_UNIX)
   struct tms cpt;
   times(&cpt);
   return (double)(cpt.tms_utime+cpt.tms_stime) / gTicks;
 #elif defined(WIN32)
   FILETIME    ftCreate,       // when the process was created
               ftExit;         // when the process exited
 
   union     {FILETIME ftFileTime;
--- a/mailnews/build/nsMailModule.cpp
+++ b/mailnews/build/nsMailModule.cpp
@@ -97,19 +97,16 @@
 #include "nsMsgMaildirStore.h"
 #include "nsMsgTagService.h"
 #include "nsMsgFolderNotificationService.h"
 #include "nsMailDirProvider.h"
 
 #ifdef XP_WIN
 #include "nsMessengerWinIntegration.h"
 #endif
-#ifdef XP_OS2
-#include "nsMessengerOS2Integration.h"
-#endif
 #ifdef XP_MACOSX
 #include "nsMessengerOSXIntegration.h"
 #endif
 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
 #include "nsMessengerUnixIntegration.h"
 #endif
 #include "nsCURILoader.h"
 #include "nsMessengerContentHandler.h"
@@ -352,19 +349,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpamSet
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgTagService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFolderNotificationService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCidProtocolHandler)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailDirProvider)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgShutdownService)
 #ifdef XP_WIN
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerWinIntegration, Init)
 #endif
-#ifdef XP_OS2
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerOS2Integration, Init)
-#endif
 #ifdef XP_MACOSX
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerOSXIntegration, Init)
 #endif
 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessengerUnixIntegration, Init)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessengerContentHandler)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgContentPolicy, Init)
@@ -415,19 +409,16 @@ NS_DEFINE_NAMED_CID(NS_MSGOFFLINEMANAGER
 NS_DEFINE_NAMED_CID(NS_MSGPROGRESS_CID);
 NS_DEFINE_NAMED_CID(NS_SPAMSETTINGS_CID);
 NS_DEFINE_NAMED_CID(NS_CIDPROTOCOL_CID);
 NS_DEFINE_NAMED_CID(NS_MSGTAGSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_MSGNOTIFICATIONSERVICE_CID);
 #ifdef XP_WIN
 NS_DEFINE_NAMED_CID(NS_MESSENGERWININTEGRATION_CID);
 #endif
-#ifdef XP_OS2
-NS_DEFINE_NAMED_CID(NS_MESSENGEROS2INTEGRATION_CID);
-#endif
 #ifdef XP_MACOSX
 NS_DEFINE_NAMED_CID(NS_MESSENGEROSXINTEGRATION_CID);
 #endif
 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
 NS_DEFINE_NAMED_CID(NS_MESSENGERUNIXINTEGRATION_CID);
 #endif
 NS_DEFINE_NAMED_CID(NS_MESSENGERCONTENTHANDLER_CID);
 NS_DEFINE_NAMED_CID(NS_MSGCONTENTPOLICY_CID);
@@ -861,19 +852,16 @@ const mozilla::Module::CIDEntry kMailNew
   { &kNS_MSGPROGRESS_CID, false, NULL, nsMsgProgressConstructor},
   { &kNS_SPAMSETTINGS_CID, false, NULL, nsSpamSettingsConstructor},
   { &kNS_CIDPROTOCOL_CID, false, NULL, nsCidProtocolHandlerConstructor},
   { &kNS_MSGTAGSERVICE_CID, false, NULL, nsMsgTagServiceConstructor},
   { &kNS_MSGNOTIFICATIONSERVICE_CID, false, NULL, nsMsgFolderNotificationServiceConstructor},
 #ifdef XP_WIN
   { &kNS_MESSENGERWININTEGRATION_CID, false, NULL, nsMessengerWinIntegrationConstructor},
 #endif
-#ifdef XP_OS2
-  { &kNS_MESSENGEROS2INTEGRATION_CID, false, NULL, nsMessengerOS2IntegrationConstructor},
-#endif
 #ifdef XP_MACOSX
   { &kNS_MESSENGEROSXINTEGRATION_CID, false, NULL, nsMessengerOSXIntegrationConstructor},
 #endif
 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
   { &kNS_MESSENGERUNIXINTEGRATION_CID, false, NULL, nsMessengerUnixIntegrationConstructor},
 #endif
   { &kNS_MESSENGERCONTENTHANDLER_CID, false, NULL, nsMessengerContentHandlerConstructor},
   { &kNS_MSGCONTENTPOLICY_CID, false, NULL, nsMsgContentPolicyConstructor},
@@ -1066,19 +1054,16 @@ const mozilla::Module::ContractIDEntry k
   { NS_MSGPROGRESS_CONTRACTID, &kNS_MSGPROGRESS_CID },
   { NS_SPAMSETTINGS_CONTRACTID, &kNS_SPAMSETTINGS_CID },
   { NS_CIDPROTOCOLHANDLER_CONTRACTID, &kNS_CIDPROTOCOL_CID },
   { NS_MSGTAGSERVICE_CONTRACTID, &kNS_MSGTAGSERVICE_CID },
   { NS_MSGNOTIFICATIONSERVICE_CONTRACTID, &kNS_MSGNOTIFICATIONSERVICE_CID },
 #ifdef XP_WIN
   { NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGERWININTEGRATION_CID },
 #endif
-#ifdef XP_OS2
-  { NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGEROS2INTEGRATION_CID },
-#endif
 #ifdef XP_MACOSX
   { NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGEROSXINTEGRATION_CID },
 #endif
 #if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GTK2)
   { NS_MESSENGEROSINTEGRATION_CONTRACTID, &kNS_MESSENGERUNIXINTEGRATION_CID },
 #endif
   { NS_MESSENGERCONTENTHANDLER_CONTRACTID, &kNS_MESSENGERCONTENTHANDLER_CID },
   { NS_MSGCONTENTPOLICY_CONTRACTID, &kNS_MSGCONTENTPOLICY_CID },
--- a/mailnews/import/eudora/src/nsEudoraFilters.cpp
+++ b/mailnews/import/eudora/src/nsEudoraFilters.cpp
@@ -25,17 +25,17 @@
 #include "nsEudoraFilters.h"
 #include "nsEudoraStringBundle.h"
 #include "nsIArray.h"
 #include "nsArrayUtils.h"
 #include "nsNetUtil.h"
 #include "nsILineInputStream.h"
 #include "EudoraDebugLog.h"
 
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
 #include "nsEudoraWin32.h"
 #endif
 #ifdef XP_MACOSX
 #include "nsEudoraMac.h"
 #endif
 
 
 
@@ -69,17 +69,17 @@ NS_IMETHODIMP nsEudoraFilters::AutoLocat
   *_retval = false;
 
   nsresult rv;
   m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aDescription = nsEudoraStringBundle::GetStringByID(EUDORAIMPORT_NAME);
 
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   *_retval = nsEudoraWin32::FindFiltersFile(getter_AddRefs(m_pLocation));
 #endif
 #ifdef XP_MACOSX
   *_retval = nsEudoraMac::FindFiltersFile(getter_AddRefs(m_pLocation));
 #endif
 
   NS_IF_ADDREF(*aLocation = m_pLocation);
   return NS_OK;
@@ -101,17 +101,17 @@ NS_IMETHODIMP nsEudoraFilters::Import(ch
   *_retval = false;
   *aError = nullptr;
 
   // Get the settings file if it doesn't exist
   if (!m_pLocation)
   {
     m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
     if (!nsEudoraWin32::FindFiltersFile(getter_AddRefs(m_pLocation)))
       m_pLocation = nullptr;
 #endif
 #ifdef XP_MACOSX
     if (!nsEudoraMac::FindFiltersFile(getter_AddRefs(m_pLocation)))
       m_pLocation = nullptr;
 #endif
   }
@@ -166,17 +166,17 @@ bool nsEudoraFilters::RealImport()
 
   nsCString     line;
   bool          more = true;
   nsAutoCString header;
   nsAutoCString verb;
   nsAutoString  name;
 
   // Windows Eudora filters files have a version header as a first line - just skip it
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   rv = lineStream->ReadLine(line, &more);
 #endif
 
   while (more && NS_SUCCEEDED(rv))
   {
     rv = lineStream->ReadLine(line, &more);
     const char* pLine = line.get();
     if (NS_SUCCEEDED(rv))
@@ -279,17 +279,17 @@ bool nsEudoraFilters::RealImport()
 #endif
         if (status == 1)
           rv = AddAction(nsMsgFilterAction::MarkRead);
       }
       else if (!strncmp(pLine, "serverOpt ", 10))
       {
         // Win and Mac Eudora have the two bits swapped in the file
         uint32_t bits = atoi(pLine + 10);
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
         bool bFetch  = (bits & 1);
         bool bDelete = (bits & 2);
 #endif
 #ifdef XP_MACOSX
         bool bFetch  = (bits & 2);
         bool bDelete = (bits & 1);
 #endif
         rv = AddAction(bDelete? (nsMsgRuleActionType)nsMsgFilterAction::DeleteFromPop3Server : (nsMsgRuleActionType)nsMsgFilterAction::LeaveOnPop3Server);
@@ -548,17 +548,17 @@ nsresult nsEudoraFilters::EnableFilter(b
 
     filter->SetEnabled(enable);
   }
 
   return NS_OK;
 }
 
 // Different character sets on Windows and Mac put left and right double angle quotes in different spots
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
 #define LDAQ "\xAB"
 #define RDAQ "\xBB"
 #elif XP_MACOSX
 #define LDAQ "\xC7"
 #define RDAQ "\xC8"
 #endif
 
 static const char* gStandardHeaders[] =
@@ -856,17 +856,17 @@ nsresult nsEudoraFilters::AddAction(nsMs
   return rv;
 }
 
 
 nsresult nsEudoraFilters::AddMailboxAction(const char* pMailboxPath, bool isTransfer)
 {
   nsresult rv;
   nsCString nameHierarchy;
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   nsCString filePath;
   m_pLocation->GetNativePath(filePath);
   int32_t index = filePath.RFindChar('\\');
   if (index >= 0)
     filePath.SetLength(index);
   if (!nsEudoraWin32::GetMailboxNameHierarchy(filePath, pMailboxPath,
                                               nameHierarchy))
     return NS_ERROR_INVALID_ARG;
--- a/mailnews/import/eudora/src/nsEudoraImport.cpp
+++ b/mailnews/import/eudora/src/nsEudoraImport.cpp
@@ -43,17 +43,17 @@
 #include "nsEudoraCompose.h"
 #include "nsEudoraSettings.h"
 #include "nsEudoraFilters.h"
 #include "nsUnicharUtils.h"
 #include "nsIMsgTagService.h"
 #include "nsMsgBaseCID.h"
 
 
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
 #include "nsEudoraWin32.h"
 #endif
 #ifdef XP_MACOSX
 #include "nsEudoraMac.h"
 #endif
 
 #include "EudoraDebugLog.h"
 
@@ -94,17 +94,17 @@ public:
   static void  SetLogs(nsString& success, nsString& error, char16_t **pError, char16_t **pSuccess);
   static void ReportError(int32_t errorNum, nsString& name, nsString *pStream);
 
 
 private:
   static void  ReportSuccess(nsString& name, int32_t count, nsString *pStream);
 
 private:
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   nsEudoraWin32  m_eudora;
 #endif
 #ifdef XP_MACOSX
   nsEudoraMac    m_eudora;
 #endif
   uint32_t    m_bytes;
 };
 
@@ -149,17 +149,17 @@ public:
     { return NS_ERROR_FAILURE;}
 
   NS_IMETHOD SetSampleLocation(nsIFile *) { return NS_OK; }
 
 private:
   static void  ReportSuccess(nsString& name, nsString *pStream);
 
 private:
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   nsEudoraWin32  m_eudora;
 #endif
 #ifdef XP_MACOSX
   nsEudoraMac    m_eudora;
 #endif
   uint32_t    m_bytes;
 };
 
--- a/mailnews/import/eudora/src/nsEudoraSettings.cpp
+++ b/mailnews/import/eudora/src/nsEudoraSettings.cpp
@@ -10,17 +10,17 @@
 
 #include "nsCOMPtr.h"
 #include "nscore.h"
 #include "nsEudoraSettings.h"
 #include "nsEudoraStringBundle.h"
 #include "nsComponentManagerUtils.h"
 #include "EudoraDebugLog.h"
 
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
 #include "nsEudoraWin32.h"
 #endif
 #ifdef XP_MACOSX
 #include "nsEudoraMac.h"
 #endif
 
 
 ////////////////////////////////////////////////////////////////////////
@@ -59,17 +59,17 @@ NS_IMETHODIMP nsEudoraSettings::AutoLoca
   *description = nullptr;
   *_retval = false;
 
   nsresult  rv;
         m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
         NS_ENSURE_SUCCESS(rv, rv);
   *description = nsEudoraStringBundle::GetStringByID(EUDORAIMPORT_NAME);
 
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   *_retval = nsEudoraWin32::FindSettingsFile(getter_AddRefs(m_pLocation));
 #endif
 
   NS_IF_ADDREF(*location = m_pLocation);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsEudoraSettings::SetLocation(nsIFile *location)
@@ -81,17 +81,17 @@ NS_IMETHODIMP nsEudoraSettings::SetLocat
 NS_IMETHODIMP nsEudoraSettings::Import(nsIMsgAccount **localMailAccount, bool *_retval)
 {
   NS_PRECONDITION(_retval != nullptr, "null ptr");
 
   *_retval = false;
 
   // Get the settings file if it doesn't exist
   if (!m_pLocation) {
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
     nsresult  rv;
                 m_pLocation =  do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
     if (NS_SUCCEEDED(rv)) {
       if (!nsEudoraWin32::FindSettingsFile(getter_AddRefs(m_pLocation))) {
         m_pLocation = nullptr;
       }
     }
 #endif
@@ -101,17 +101,17 @@ NS_IMETHODIMP nsEudoraSettings::Import(n
   }
 
   if (!m_pLocation) {
     IMPORT_LOG0("*** Error, unable to locate settings file for import.\n");
     return NS_ERROR_FAILURE;
   }
 
   // do the settings import
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   *_retval = nsEudoraWin32::ImportSettings(m_pLocation, localMailAccount);
 #endif
 #ifdef XP_MACOSX
   *_retval = nsEudoraMac::ImportSettings(m_pLocation, localMailAccount);
 #endif
 
   if (*_retval) {
     IMPORT_LOG0("Successful import of eudora settings\n");
--- a/mailnews/local/src/nsLocalUtils.cpp
+++ b/mailnews/local/src/nsLocalUtils.cpp
@@ -234,13 +234,13 @@ nsresult nsCreateLocalBaseMessageURI(con
   baseMessageURI = kMailboxMessageRootURI;
   baseMessageURI += tailURI;
 
   return NS_OK;
 }
 
 void nsEscapeNativePath(nsCString& nativePath)
 {
-#if defined(XP_WIN) || defined(XP_OS2)
+#if defined(XP_WIN)
   nativePath.Insert('/', 0);
   MsgReplaceChar(nativePath, '\\', '/');
 #endif
 }
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -773,20 +773,16 @@ pref("dom.max_chrome_script_run_time", 0
 
 // gtk2 (*nix) lacks transparent/translucent drag support (bug 376238), so we
 // want to disable it so people can see where they are dragging things.
 // (Stock gtk drag icons will be used instead.)
 #ifdef MOZ_WIDGET_GTK2
 pref("nglayout.enable_drag_images", false);
 #endif
 
-#ifdef XP_OS2
-pref("mail.compose.max_recycled_windows", 0);
-#endif
-
 // For the Empty Junk/Trash confirmation dialogs.
 pref("mailnews.emptyJunk.dontAskAgain", false);
 pref("mailnews.emptyTrash.dontAskAgain", false);
 
 // where to fetch auto config information from.
 pref("mailnews.auto_config_url", "https://live.mozillamessaging.com/autoconfig/v1.1/");
 // Added in bug 551519. Remove when bug 545866 is fixed.
 pref("mailnews.mx_service_url", "https://live.mozillamessaging.com/dns/mx/");