diff options
author | trav90 <travawine@protonmail.ch> | 2016-07-23 19:20:13 -0500 |
---|---|---|
committer | trav90 <travawine@protonmail.ch> | 2016-07-23 19:20:13 -0500 |
commit | 54a7e576804820f929668bba37ee055500bb99fc (patch) | |
tree | 793897f15e2f8ea258270fe14d89cddec32e90da /config | |
parent | 64eac418a54f8db78ddda3250e2fa549f6611f0c (diff) | |
download | palemoon-gre-54a7e576804820f929668bba37ee055500bb99fc.tar.gz |
Don't include mozalloc.h from the cstdlib wrapper
Diffstat (limited to 'config')
-rw-r--r-- | config/gcc-stl-wrapper.template.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/config/gcc-stl-wrapper.template.h b/config/gcc-stl-wrapper.template.h index e0b6490d9..52017a188 100644 --- a/config/gcc-stl-wrapper.template.h +++ b/config/gcc-stl-wrapper.template.h @@ -22,6 +22,11 @@ #define NOMINMAX 1 #endif +// 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: // @@ -30,15 +35,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) |