summaryrefslogtreecommitdiff
path: root/manualPorts/thunderbird/thunderbird-gcc6.patch
blob: c3444143068b354fc4e94e6e032a6bb150fb1a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -rupN thunderbird-45.1.1.orig/mozilla/config/gcc-stl-wrapper.template.h thunderbird-45.1.1/mozilla/config/gcc-stl-wrapper.template.h
--- thunderbird-45.1.1.orig/mozilla/config/gcc-stl-wrapper.template.h	2016-05-26 23:13:30.000000000 +0200
+++ thunderbird-45.1.1/mozilla/config/gcc-stl-wrapper.template.h	2016-06-07 20:18:28.039462493 +0200
@@ -17,6 +17,11 @@
 // Silence "warning: #include_next is a GCC extension"
 #pragma GCC system_header
 
+// Don't include mozalloc for cstdlib. See bug 1245076.
+#ifndef moz_dont_include_mozalloc_for_cstdlib
+#  define moz_dont_include_mozalloc_for_cstdlib
+#endif
+#ifndef moz_dont_include_mozalloc_for_${HEADER}
 // mozalloc.h wants <new>; break the cycle by always explicitly
 // including <new> here.  NB: this is a tad sneaky.  Sez the gcc docs:
 //
@@ -25,15 +30,17 @@
 //    same name as the current file. It simply looks for the file
 //    named, starting with the directory in the search path after the
 //    one where the current file was found.
-#include_next <new>
+#  include_next <new>
 
 // See if we're in code that can use mozalloc.  NB: this duplicates
 // code in nscore.h because nscore.h pulls in prtypes.h, and chromium
 // can't build with that being included before base/basictypes.h.
-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
-#  include "mozilla/mozalloc.h"
-#else
-#  error "STL code can only be used with infallible ::operator new()"
+#  if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
+#    include "mozilla/mozalloc.h"
+#  else
+#    error "STL code can only be used with infallible ::operator new()"
+#  endif
+
 #endif
 
 #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)