Bug 1189891: Only include STL wrapper requirements on the first include. r=glandium
authorBas Schouten <bschouten@mozilla.com>
Thu, 20 Aug 2015 20:03:44 +0000
changeset 258822 491c4ae1ea4ac22bcf9c80e6cce593d87254c490
parent 258821 6ae039c4a0b4a432f7b611a61f43dd75ca5aa437
child 258823 97207786c90858b12b221913588b9a01316bc32f
push id29263
push userryanvm@gmail.com
push dateSun, 23 Aug 2015 21:18:49 +0000
treeherdermozilla-central@4ccdd06e51d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1189891
milestone43.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 1189891: Only include STL wrapper requirements on the first include. r=glandium
config/msvc-stl-wrapper.template.h
--- a/config/msvc-stl-wrapper.template.h
+++ b/config/msvc-stl-wrapper.template.h
@@ -3,16 +3,19 @@
  */
 /* 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 mozilla_${HEADER}_h
 #define mozilla_${HEADER}_h
 
+#ifndef MOZ_HAVE_INCLUDED_ALLOC
+#define MOZ_HAVE_INCLUDED_ALLOC
+
 #if _HAS_EXCEPTIONS
 #  error "STL code can only be used with -fno-exceptions"
 #endif
 
 // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
 // CRT doesn't export std::_Throw().  So we define it.
 #ifndef mozilla_Throw_h
 #  include "mozilla/throw_msvc.h"
@@ -27,16 +30,17 @@
 // 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()"
 #endif
+#endif /* MOZ_HAVE_INCLUDED_ALLOC */
 
 #ifdef _DEBUG
 // From
 //   http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx
 // and
 //   http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx
 // there appear to be two types of STL container checking.  The
 // former is enabled by -D_DEBUG (which is implied by -MDd or -MTd), and