Bug 892401 - Remove NEW_H. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 12 Jul 2013 09:16:41 +0900
changeset 138259 f4a2508ab57c55b512e05a94462f46dfa63e1b35
parent 138258 140e6137b5a07de4932813c0fc7bf9619aca57fc
child 138260 b48e4436f854a44088e474faebf0fc363a040f2e
push id24949
push userryanvm@gmail.com
push dateFri, 12 Jul 2013 17:29:41 +0000
treeherdermozilla-central@f2d3b5149d3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs892401
milestone25.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 892401 - Remove NEW_H. r=ted
configure.in
content/events/src/nsEventDispatcher.cpp
embedding/components/commandhandler/src/nsCommandParams.cpp
js/src/configure.in
layout/generic/nsIntervalSet.cpp
modules/libjar/nsZipArchive.cpp
xpcom/components/nsComponentManager.cpp
xpcom/ds/nsCppSharedAllocator.h
xpcom/glue/nsHashKeys.h
xpcom/glue/nsIClassInfoImpl.h
xpcom/glue/nsTArray.h
xpcom/glue/nsTHashtable.h
xpcom/reflect/xptinfo/src/xptiprivate.h
xpcom/string/public/nsString.h
xpcom/xpcom-config.h.in
--- a/configure.in
+++ b/configure.in
@@ -2178,17 +2178,16 @@ ia64*-hpux*)
     fi
     AC_DEFINE(HAVE_SNPRINTF)
     AC_DEFINE(_WINDOWS)
     AC_DEFINE(WIN32)
     AC_DEFINE(XP_WIN)
     AC_DEFINE(XP_WIN32)
     AC_DEFINE(HW_THREADS)
     AC_DEFINE(STDC_HEADERS)
-    AC_DEFINE(NEW_H, <new>)
     AC_DEFINE(WIN32_LEAN_AND_MEAN)
     TARGET_MD_ARCH=win32
     _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
     BIN_SUFFIX='.exe'
     MOZ_USER_DIR="Mozilla"
 
     dnl Hardcode to win95 for now - cls
     TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
@@ -3064,24 +3063,16 @@ AC_CACHE_CHECK(for sockaddr.sa_len,
                                 void *foo = (void*) &x.sa_len;],
                                [],
                                [ac_cv_sockaddr_sa_len=true],
                                [ac_cv_sockaddr_sa_len=false])])
 if test "$ac_cv_sockaddr_sa_len" = true ; then
   AC_DEFINE(HAVE_SA_LEN)
 fi
 
-dnl Check whether the compiler supports the new-style C++ standard
-dnl library headers (i.e. <new>) or needs the old "new.h"
-AC_LANG_CPLUSPLUS
-NEW_H=new.h
-MOZ_CHECK_HEADER(new, [NEW_H=new])
-AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>)
-AC_LANG_C
-
 AC_ARG_ENABLE(dtrace,
               [  --enable-dtrace         build with dtrace support if available (default=no)],
               [enable_dtrace="yes"],)
 if test "x$enable_dtrace" = "xyes"; then
   MOZ_CHECK_HEADER(sys/sdt.h, HAVE_DTRACE=1)
   if test -n "$HAVE_DTRACE"; then
       AC_DEFINE(INCLUDE_MOZILLA_DTRACE)
   else
@@ -9126,17 +9117,16 @@ dnl The following defines are used by xp
 CPP_THROW_NEW
 HAVE_CPP_2BYTE_WCHAR_T
 HAVE_CPP_AMBIGUITY_RESOLVING_USING
 HAVE_CPP_CHAR16_T
 HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
 HAVE_CPP_PARTIAL_SPECIALIZATION
 HAVE_CPP_TROUBLE_COMPARING_TO_ZERO
 NEED_CPP_UNUSED_IMPLEMENTATIONS
-NEW_H
 HAVE_GETPAGESIZE
 HAVE_ICONV
 HAVE_ICONV_WITH_CONST_INPUT
 HAVE_MBRTOWC
 HAVE_WCRTOMB
 HAVE_STATVFS64
 HAVE_STATVFS
 HAVE_STATFS64
--- a/content/events/src/nsEventDispatcher.cpp
+++ b/content/events/src/nsEventDispatcher.cpp
@@ -7,17 +7,17 @@
 #include "nsEventDispatcher.h"
 #include "nsDOMEvent.h"
 #include "nsPresContext.h"
 #include "nsEventListenerManager.h"
 #include "nsContentUtils.h"
 #include "nsCxPusher.h"
 #include "nsError.h"
 #include "nsMutationEvent.h"
-#include NEW_H
+#include <new>
 #include "nsINode.h"
 #include "nsPIDOMWindow.h"
 #include "nsFrameLoader.h"
 #include "nsDOMTouchEvent.h"
 #include "GeckoProfiler.h"
 #include "GeneratedEvents.h"
 #include "mozilla/dom/EventTarget.h"
 
--- a/embedding/components/commandhandler/src/nsCommandParams.cpp
+++ b/embedding/components/commandhandler/src/nsCommandParams.cpp
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "xpcom-config.h"
-#include NEW_H    // for placement new
+#include <new>    // for placement new
 #include "nscore.h"
 #include "nsCRT.h"
 
 #include "nsCommandParams.h"
 #include "mozilla/HashFunctions.h"
 
 using namespace mozilla;
 
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1735,17 +1735,16 @@ ia64*-hpux*)
     fi
     AC_DEFINE(HAVE_SNPRINTF)
     AC_DEFINE(_WINDOWS)
     AC_DEFINE(WIN32)
     AC_DEFINE(XP_WIN)
     AC_DEFINE(XP_WIN32)
     AC_DEFINE(HW_THREADS)
     AC_DEFINE(STDC_HEADERS)
-    AC_DEFINE(NEW_H, <new>)
     AC_DEFINE(WIN32_LEAN_AND_MEAN)
     TARGET_MD_ARCH=win32
     _PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
     BIN_SUFFIX='.exe'
     MOZ_USER_DIR="Mozilla"
 
     dnl Hardcode to win95 for now - cls
     TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
@@ -2536,24 +2535,16 @@ MOZ_CHECK_COMMON_HEADERS
 
 dnl These are all the places some variant of statfs can be hiding.
 MOZ_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h)
 
 dnl Quota support
 MOZ_CHECK_HEADERS(sys/quota.h)
 MOZ_CHECK_HEADERS(linux/quota.h)
 
-dnl Check whether the compiler supports the new-style C++ standard
-dnl library headers (i.e. <new>) or needs the old "new.h"
-AC_LANG_CPLUSPLUS
-NEW_H=new.h
-MOZ_CHECK_HEADER(new, [NEW_H=new])
-AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>)
-AC_LANG_C
-
 AC_ARG_ENABLE(dtrace,
               [  --enable-dtrace         build with dtrace support if available (default=no)],
               [enable_dtrace="yes"],)
 if test "x$enable_dtrace" = "xyes"; then
   MOZ_CHECK_HEADER(sys/sdt.h, HAVE_DTRACE=1)
   if test -n "$HAVE_DTRACE"; then
       AC_DEFINE(INCLUDE_MOZILLA_DTRACE)
   else
--- a/layout/generic/nsIntervalSet.cpp
+++ b/layout/generic/nsIntervalSet.cpp
@@ -3,17 +3,17 @@
 /* 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/. */
 
 /* a set of ranges on a number-line */
 
 #include "nsIntervalSet.h"
 #include "nsAlgorithm.h"
-#include NEW_H
+#include <new>
 #include <algorithm>
 
 nsIntervalSet::nsIntervalSet(IntervalSetAlloc aAlloc, IntervalSetFree aFree,
                              void* aAllocatorClosure)
     : mList(nullptr),
       mAlloc(aAlloc),
       mFree(aFree),
       mAllocatorClosure(aAllocatorClosure)
--- a/modules/libjar/nsZipArchive.cpp
+++ b/modules/libjar/nsZipArchive.cpp
@@ -21,17 +21,17 @@
 #include "nsZipArchive.h"
 #include "nsString.h"
 #include "prenv.h"
 #if defined(XP_WIN)
 #include <windows.h>
 #endif
 
 // For placement new used for arena allocations of zip file list
-#include NEW_H
+#include <new>
 #define ZIP_ARENABLOCKSIZE (1*1024)
 
 #ifdef XP_UNIX
     #include <sys/mman.h>
     #include <sys/types.h>
     #include <sys/stat.h>
     #include <limits.h>
     #include <unistd.h>
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -63,17 +63,17 @@
 
 #include "nsManifestLineReader.h"
 #include "mozilla/GenericFactory.h"
 #include "nsSupportsPrimitives.h"
 #include "nsArrayEnumerator.h"
 #include "nsStringEnumerator.h"
 #include "mozilla/FileUtils.h"
 
-#include NEW_H     // for placement new
+#include <new>     // for placement new
 
 #include "mozilla/Omnijar.h"
 
 #include "prlog.h"
 
 using namespace mozilla;
 
 PRLogModuleInfo* nsComponentManagerLog = nullptr;
--- a/xpcom/ds/nsCppSharedAllocator.h
+++ b/xpcom/ds/nsCppSharedAllocator.h
@@ -1,17 +1,17 @@
 /* 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 nsCppSharedAllocator_h__
 #define nsCppSharedAllocator_h__
 
 #include "nsMemory.h"     // for |nsMemory|
-#include NEW_H					// to allow placement |new|
+#include <new>					// to allow placement |new|
 
 
   // under MSVC shut off copious warnings about unused in-lines
 #ifdef _MSC_VER
   #pragma warning( disable: 4514 )
 #endif
 
 #include <limits.h>
--- a/xpcom/glue/nsHashKeys.h
+++ b/xpcom/glue/nsHashKeys.h
@@ -7,17 +7,17 @@
 #define nsTHashKeys_h__
 
 #include "nsID.h"
 #include "nsISupports.h"
 #include "nsIHashable.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "pldhash.h"
-#include NEW_H
+#include <new>
 
 #include "nsStringGlue.h"
 #include "nsCRTGlue.h"
 #include "nsUnicharUtils.h"
 
 #include <stdlib.h>
 #include <string.h>
 
--- a/xpcom/glue/nsIClassInfoImpl.h
+++ b/xpcom/glue/nsIClassInfoImpl.h
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsIClassInfoImpl_h__
 #define nsIClassInfoImpl_h__
 
 #include "nsIClassInfo.h"
 #include "nsISupportsImpl.h"
 
-#include NEW_H
+#include <new>
 
 /**
  * This header file provides macros which help you make your class implement
  * nsIClassInfo.  Implementing nsIClassInfo is particularly helpful if you have
  * a C++ class which implements multiple interfaces and which you access from
  * JavaScript.  If that class implements nsIClassInfo, the JavaScript code
  * won't have to call QueryInterface on instances of the class; all methods
  * from all interfaces returned by GetInterfaces() will be available
--- a/xpcom/glue/nsTArray.h
+++ b/xpcom/glue/nsTArray.h
@@ -16,17 +16,17 @@
 #include <string.h>
 
 #include "nsCycleCollectionNoteChild.h"
 #include "nsAlgorithm.h"
 #include "nscore.h"
 #include "nsQuickSort.h"
 #include "nsDebug.h"
 #include "nsTraceRefcnt.h"
-#include NEW_H
+#include <new>
 
 namespace JS {
 template <class T>
 class Heap;
 } /* namespace JS */
 
 //
 // nsTArray is a resizable array class, like std::vector.
--- a/xpcom/glue/nsTHashtable.h
+++ b/xpcom/glue/nsTHashtable.h
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsTHashtable_h__
 #define nsTHashtable_h__
 
 #include "nscore.h"
 #include "pldhash.h"
 #include "nsDebug.h"
-#include NEW_H
+#include <new>
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/fallible.h"
 
 // helper function for nsTHashtable::Clear()
 NS_COM_GLUE PLDHashOperator
 PL_DHashStubEnumRemove(PLDHashTable    *table,
                        PLDHashEntryHdr *entry,
                        uint32_t         ordinal,
--- a/xpcom/reflect/xptinfo/src/xptiprivate.h
+++ b/xpcom/reflect/xptinfo/src/xptiprivate.h
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Library-private header for Interface Info system. */
 
 #ifndef xptiprivate_h___
 #define xptiprivate_h___
 
 #include "nscore.h"
-#include NEW_H
+#include <new>
 #include "nsISupports.h"
 
 // this after nsISupports, to pick up IID
 // so that xpt stuff doesn't try to define it itself...
 #include "xpt_struct.h"
 #include "xpt_xdr.h"
 
 #include "nsIInterfaceInfo.h"
--- a/xpcom/string/public/nsString.h
+++ b/xpcom/string/public/nsString.h
@@ -16,17 +16,17 @@
 #ifndef nsDependentSubstring_h___
 #include "nsDependentSubstring.h"
 #endif
 
 #ifndef nsReadableUtils_h___
 #include "nsReadableUtils.h"
 #endif
 
-#include NEW_H
+#include <new>
 
   // enable support for the obsolete string API if not explicitly disabled
 #ifndef MOZ_STRING_WITH_OBSOLETE_API
 #define MOZ_STRING_WITH_OBSOLETE_API 1
 #endif
 
 #if MOZ_STRING_WITH_OBSOLETE_API
   // radix values for ToInteger/AppendInt
--- a/xpcom/xpcom-config.h.in
+++ b/xpcom/xpcom-config.h.in
@@ -29,18 +29,15 @@
  */
 #undef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO
 
 /* Define if the c++ compiler requires implementations of 
  * unused virtual methods
  */
 #undef NEED_CPP_UNUSED_IMPLEMENTATIONS
 
-/* Define to either <new> or <new.h> */
-#undef NEW_H
-
 /* Define to either __attribute__((malloc)) or nothing */
 #undef NS_ATTR_MALLOC
 
 /* Define to either __attribute__((warn_unused_result)) or nothing */
 #undef NS_WARN_UNUSED_RESULT
 
 #endif /* _XPCOM_CONFIG_H_ */