Bug 1102815 - mingw builds assert in WindowsCrtPatch.h. r=glandium
authorJacek Caban <jacek@codeweavers.com>
Tue, 25 Nov 2014 12:43:05 +0100
changeset 217471 9dffe0f511c9366173592c09ebf5d1f432320d2f
parent 217470 89edc525856a6f98cee69a4fba2b9552bcd68f0f
child 217472 9d885b1029113b2d6486dff74949792e012efa8c
push id27882
push userryanvm@gmail.com
push dateTue, 25 Nov 2014 21:56:56 +0000
treeherdermozilla-central@ced1402861b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1102815
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1102815 - mingw builds assert in WindowsCrtPatch.h. r=glandium
toolkit/xre/nsWindowsWMain.cpp
--- a/toolkit/xre/nsWindowsWMain.cpp
+++ b/toolkit/xre/nsWindowsWMain.cpp
@@ -11,16 +11,20 @@
 #endif
 
 #include "nsUTF8Utils.h"
 
 #ifndef XRE_DONT_PROTECT_DLL_LOAD
 #include "nsSetDllDirectory.h"
 #endif
 
+#if defined(MOZ_METRO) || defined(__GNUC__)
+#define XRE_DONT_SUPPORT_XPSP2
+#endif
+
 #ifndef XRE_DONT_SUPPORT_XPSP2
 #include "WindowsCrtPatch.h"
 #endif
 
 #ifdef __MINGW32__
 
 /* MingW currently does not implement a wide version of the
    startup routines.  Workaround is to implement something like
@@ -75,17 +79,17 @@ FreeAllocStrings(int argc, char **argv)
     delete [] argv[argc];
   }
 
   delete [] argv;
 }
 
 int wmain(int argc, WCHAR **argv)
 {
-#if !defined(XRE_DONT_SUPPORT_XPSP2) && !defined(MOZ_METRO)
+#if !defined(XRE_DONT_SUPPORT_XPSP2)
   WindowsCrtPatch::Init();
 #endif
 
 #ifndef XRE_DONT_PROTECT_DLL_LOAD
   mozilla::SanitizeEnvironmentVariables();
   SetDllDirectoryW(L"");
 #endif