Bug 722370 - Remove obsolete Windows SDK target checks. f=sgautherie, r=dbienvenu
authorMurali SR <murali.sr92@yahoo.com>
Tue, 03 Apr 2012 19:29:13 -0400
changeset 11551 31da82521973b8c4ca4b1f3bfeda26282e9bc11b
parent 11550 8c3968ce25f95c3258a42a579dc0374e0995d172
child 11552 3f939b4ac06bc36f75598a1f784fdc775a0573a4
push idunknown
push userunknown
push dateunknown
reviewersdbienvenu
bugs722370
Bug 722370 - Remove obsolete Windows SDK target checks. f=sgautherie, r=dbienvenu
configure.in
mail/components/build/nsMailComps.cpp
mail/components/search/nsMailWinSearchHelper.cpp
mail/components/shell/nsMailWinIntegration.cpp
suite/shell/src/nsWindowsShellService.cpp
--- a/configure.in
+++ b/configure.in
@@ -784,18 +784,16 @@ EOF
         AC_MSG_RESULT("yes")
     else
         AC_MSG_RESULT("no")
         AC_MSG_ERROR([You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this.])
     fi
 
     AC_DEFINE_UNQUOTED(MOZ_WINSDK_TARGETVER,0x$MOZ_WINSDK_TARGETVER)
     # Definitions matching sdkddkver.h
-    AC_DEFINE_UNQUOTED(MOZ_NTDDI_WS03, 0x05020000)
-    AC_DEFINE_UNQUOTED(MOZ_NTDDI_LONGHORN, 0x06000000)
     AC_DEFINE_UNQUOTED(MOZ_NTDDI_WIN7, 0x06010000)
     ;;
 esac
 
 dnl Test breaks icc on OS/2 && MSVC
 if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; then
     AC_PROG_CC_C_O
     if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
--- a/mail/components/build/nsMailComps.cpp
+++ b/mail/components/build/nsMailComps.cpp
@@ -65,31 +65,29 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsEudoraP
 #include "nsMailGNOMEIntegration.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMailGNOMEIntegration, Init)
 #endif
 #ifdef XP_MACOSX
 #include "nsMailMacIntegration.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailMacIntegration)
 #endif
 
-#if defined(XP_WIN32) && (MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN)
+#if defined(XP_WIN32)
 #include "nsMailWinSearchHelper.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMailWinSearchHelper, Init)
 #endif
 
 NS_DEFINE_NAMED_CID(NS_THUNDERBIRD_PROFILEIMPORT_CID);
 NS_DEFINE_NAMED_CID(NS_SEAMONKEYPROFILEMIGRATOR_CID);
 
 #ifdef XP_WIN32
 NS_DEFINE_NAMED_CID(NS_OEXPRESSPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_OUTLOOKPROFILEMIGRATOR_CID);
 NS_DEFINE_NAMED_CID(NS_MAILWININTEGRATION_CID);
-#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
 NS_DEFINE_NAMED_CID(NS_MAILWINSEARCHHELPER_CID);
-#endif // MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
 #endif // !XP_WIN32
 
 #if defined (XP_WIN32) || defined (XP_MACOSX)
 NS_DEFINE_NAMED_CID(NS_EUDORAPROFILEMIGRATOR_CID);
 #endif
 
 #ifdef MOZ_WIDGET_GTK2
 NS_DEFINE_NAMED_CID(NS_MAILGNOMEINTEGRATION_CID);
@@ -101,19 +99,17 @@ NS_DEFINE_NAMED_CID(NS_MAILMACINTEGRATIO
 
 const mozilla::Module::CIDEntry kMailCIDs[] = {
   { &kNS_THUNDERBIRD_PROFILEIMPORT_CID, false, NULL, nsProfileMigratorConstructor },
   { &kNS_SEAMONKEYPROFILEMIGRATOR_CID, false, NULL, nsSeamonkeyProfileMigratorConstructor },
 #ifdef XP_WIN32
   { &kNS_OEXPRESSPROFILEMIGRATOR_CID, false, NULL, nsOEProfileMigratorConstructor },
   { &kNS_OUTLOOKPROFILEMIGRATOR_CID, false, NULL, nsOutlookProfileMigratorConstructor },
   { &kNS_MAILWININTEGRATION_CID, false, NULL, nsWindowsShellServiceConstructor },
-#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
   { &kNS_MAILWINSEARCHHELPER_CID, false, NULL, nsMailWinSearchHelperConstructor },
-#endif // MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
 #endif // !XP_WIN32
 #if defined (XP_WIN32) || defined (XP_MACOSX)
   { &kNS_EUDORAPROFILEMIGRATOR_CID, false, NULL, nsEudoraProfileMigratorConstructor },
 #endif
 #ifdef MOZ_WIDGET_GTK2
   { &kNS_MAILGNOMEINTEGRATION_CID, false, NULL, nsMailGNOMEIntegrationConstructor },
 #endif
 #ifdef XP_MACOSX
@@ -124,19 +120,17 @@ const mozilla::Module::CIDEntry kMailCID
 
 const mozilla::Module::ContractIDEntry kMailContracts[] = {
   { NS_PROFILEMIGRATOR_CONTRACTID, &kNS_THUNDERBIRD_PROFILEIMPORT_CID },
   { NS_MAILPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey", &kNS_SEAMONKEYPROFILEMIGRATOR_CID },
 #ifdef XP_WIN32
   { NS_MAILPROFILEMIGRATOR_CONTRACTID_PREFIX "oexpress", &kNS_OEXPRESSPROFILEMIGRATOR_CID },
   { NS_MAILPROFILEMIGRATOR_CONTRACTID_PREFIX "outlook", &kNS_OUTLOOKPROFILEMIGRATOR_CID },
   { "@mozilla.org/mail/shell-service;1", &kNS_MAILWININTEGRATION_CID },
-#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
   { "@mozilla.org/mail/windows-search-helper;1", &kNS_MAILWINSEARCHHELPER_CID },
-#endif // MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
 #endif // !XP_WIN32
 #if defined (XP_WIN32) || defined (XP_MACOSX)
   { NS_MAILPROFILEMIGRATOR_CONTRACTID_PREFIX "eudora", &kNS_EUDORAPROFILEMIGRATOR_CID },
 #endif
 #ifdef MOZ_WIDGET_GTK2
   { "@mozilla.org/mail/shell-service;1", &kNS_MAILGNOMEINTEGRATION_CID },
 #endif
 #ifdef XP_MACOSX
@@ -147,9 +141,8 @@ const mozilla::Module::ContractIDEntry k
 
 static const mozilla::Module kMailCompsModule = {
   mozilla::Module::kVersion,
   kMailCIDs,
   kMailContracts
 };
 
 NSMODULE_DEFN(nsMailCompsModule) = &kMailCompsModule;
-
--- a/mail/components/search/nsMailWinSearchHelper.cpp
+++ b/mail/components/search/nsMailWinSearchHelper.cpp
@@ -30,18 +30,16 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
-
 #include "nsMailWinSearchHelper.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsAutoPtr.h"
 #include "nsMemory.h"
 #include "nsStringGlue.h"
 #include "nsISimpleEnumerator.h"
 
 #ifdef _WIN32_WINNT
@@ -300,10 +298,8 @@ NS_IMETHODIMP nsMailWinSearchHelper::Run
       if (!GetExitCodeProcess(executeInfo.hProcess, &dwRet))
         dwRet = GetLastError();
   }
   else
     return NS_ERROR_ABORT;
 
   return SUCCEEDED(HRESULT_FROM_WIN32(dwRet)) ? NS_OK : NS_ERROR_FAILURE;
 }
-
-#endif // MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
--- a/mail/components/shell/nsMailWinIntegration.cpp
+++ b/mail/components/shell/nsMailWinIntegration.cpp
@@ -411,17 +411,16 @@ nsWindowsShellService::TestForDefault(SE
   }  // for each registry key we want to look at
 
   return isDefault;
 }
 
 bool
 nsWindowsShellService::IsDefaultClientVista(PRUint16 aApps, bool* aIsDefaultClient)
 {
-#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
   IApplicationAssociationRegistration* pAAR;
 
   HRESULT hr = CoCreateInstance (CLSID_ApplicationAssociationRegistration,
                                  NULL,
                                  CLSCTX_INPROC,
                                  IID_IApplicationAssociationRegistration,
                                  (void**)&pAAR);
 
@@ -434,11 +433,10 @@ nsWindowsShellService::IsDefaultClientVi
     if (aApps & nsIShellService::NEWS)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_NEWS, &isDefaultNews);
 
     *aIsDefaultClient = isDefaultNews && isDefaultMail;
 
     pAAR->Release();
     return true;
   }
-#endif
   return false;
 }
--- a/suite/shell/src/nsWindowsShellService.cpp
+++ b/suite/shell/src/nsWindowsShellService.cpp
@@ -510,17 +510,16 @@ nsresult nsWindowsShellService::Init()
   mAppShortPath = appPath;
 
   return NS_OK;
 }
 
 bool
 nsWindowsShellService::IsDefaultClientVista(PRUint16 aApps, bool* aIsDefaultClient)
 {
-#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
   IApplicationAssociationRegistration* pAAR;
 
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
                                 NULL,
                                 CLSCTX_INPROC,
                                 IID_IApplicationAssociationRegistration,
                                 (void**)&pAAR);
   
@@ -535,17 +534,16 @@ nsWindowsShellService::IsDefaultClientVi
     if (aApps & nsIShellService::NEWS)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_NEWS, &isDefaultNews);
 
     *aIsDefaultClient = isDefaultBrowser && isDefaultNews && isDefaultMail;
 
     pAAR->Release();
     return true;
   }
-#endif  
   return false;
 }
 
 NS_IMETHODIMP
 nsWindowsShellService::IsDefaultClient(bool aStartupCheck, PRUint16 aApps, bool *aIsDefaultClient)
 {
   // If this is the first application window, maintain internal state that we've
   // checked this session (so that subsequent window opens don't show the