Get rid of gcc3's numerous warnings about using <new.h> instead of <new> by creating a new #define, NEW_H, which should be used instead of <new.h> or <new>. This is so we can continue to support a couple of braindead compilers that don't accept <new>. Bug 155852, r=cls.
git-svn-id: svn://10.0.0.236/trunk@127585 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -81,5 +81,6 @@
|
||||
#define _PR_NO_PREEMPT 1
|
||||
///#define HAVE_BOOLEAN 1 // used by JPEG lib
|
||||
#define CPP_THROW_NEW throw()
|
||||
#define NEW_H <new>
|
||||
|
||||
#endif /* DefinesMac_h_ */
|
||||
|
||||
@@ -959,6 +959,7 @@ case "$target" in
|
||||
AC_DEFINE_UNQUOTED(WINVER,0x400)
|
||||
AC_DEFINE(MSVC4)
|
||||
AC_DEFINE(STDC_HEADERS)
|
||||
AC_DEFINE(NEW_H, <new>)
|
||||
TARGET_MD_ARCH=win32
|
||||
_PLATFORM_DEFAULT_TOOLKIT='windows'
|
||||
BIN_SUFFIX='.exe'
|
||||
@@ -1615,6 +1616,14 @@ AC_CHECK_HEADERS(X11/XKBlib.h)
|
||||
dnl These are all the places some variant of statfs can be hiding.
|
||||
AC_CHECK_HEADERS(sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.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
|
||||
AC_CHECK_HEADER(new, [NEW_H=new])
|
||||
AC_DEFINE_UNQUOTED(NEW_H, <$NEW_H>)
|
||||
AC_LANG_C
|
||||
|
||||
case $target in
|
||||
*-aix4.3*|*-aix5*)
|
||||
;;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "nsFixedSizeAllocator.h"
|
||||
#include "nsResourceSet.h"
|
||||
#include "nsRuleNetwork.h"
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
|
||||
/**
|
||||
* A "match" is a fully instantiated rule; that is, a complete and
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <new.h> // for placement new
|
||||
#include NEW_H // for placement new
|
||||
#include "nscore.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIntervalSet.h"
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
|
||||
nsIntervalSet::nsIntervalSet(IntervalSetAlloc aAlloc, IntervalSetFree aFree,
|
||||
void* aAllocatorClosure)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIntervalSet.h"
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
|
||||
nsIntervalSet::nsIntervalSet(IntervalSetAlloc aAlloc, IntervalSetFree aFree,
|
||||
void* aAllocatorClosure)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
nsRecyclingAllocator *gZlibAllocator = NULL;
|
||||
|
||||
// For placement new used for arena allocations of zip file list
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
|
||||
#else /* STANDALONE */
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIEnumerator.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "nsStringTraits.h"
|
||||
#endif
|
||||
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
// for placement |new|
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "nsBufferHandleUtils.h"
|
||||
#endif
|
||||
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "nsMemory.h" // for |nsMemory|
|
||||
#include "nscore.h" // for |NS_XXX_CAST|
|
||||
#include <new.h> // to allow placement |new|
|
||||
#include NEW_H // to allow placement |new|
|
||||
|
||||
|
||||
// under Metrowerks (Mac), we don't have autoconf yet
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
Here is a typical usage pattern:
|
||||
|
||||
#include <new.h> // You'll need this!
|
||||
#include NEW_H // You'll need this!
|
||||
#include "nsFixedSizeAllocator.h"
|
||||
|
||||
// Say this is the object you want to allocate a ton of
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "nsStringTraits.h"
|
||||
#endif
|
||||
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
// for placement |new|
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "nsBufferHandleUtils.h"
|
||||
#endif
|
||||
|
||||
#include <new.h>
|
||||
#include NEW_H
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user