From c2fddb8f07d8793afaddd097f3f2b47abb6494f6 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 1 Oct 2012 17:01:01 -0400 Subject: [PATCH] Bug 796119 - part 2: don't #include prtypes.h in xpcom/ unless absolutely necessary; r=ehsan "absolutely necessary" in this context means "needs PRUnichar", which is the reason that nsString.h now #includes prtypes.h. --- xpcom/base/nsStackWalk.h | 1 - xpcom/build/BinaryPath.h | 1 - xpcom/build/nsXULAppAPI.h | 1 - xpcom/ds/nsCRT.h | 1 - xpcom/ds/nsHashtable.h | 1 - xpcom/ds/nsStringEnumerator.cpp | 1 - xpcom/glue/nsDebug.h | 2 -- xpcom/glue/nsQuickSort.cpp | 1 - xpcom/glue/nsQuickSort.h | 1 - xpcom/glue/nsTArray.h | 1 - xpcom/glue/nsTHashtable.h | 1 - xpcom/io/nsLocalFileOS2.cpp | 1 - xpcom/io/nsLocalFileWin.cpp | 1 - xpcom/reflect/xptcall/public/xptcall.h | 1 - xpcom/reflect/xptinfo/public/xptinfo.h | 1 - xpcom/string/public/nsAlgorithm.h | 5 ----- xpcom/string/public/nsString.h | 3 +++ 17 files changed, 3 insertions(+), 21 deletions(-) diff --git a/xpcom/base/nsStackWalk.h b/xpcom/base/nsStackWalk.h index 5e4aefc52dda..4ae00bd7bdc9 100644 --- a/xpcom/base/nsStackWalk.h +++ b/xpcom/base/nsStackWalk.h @@ -12,7 +12,6 @@ #include "nscore.h" #include -#include "prtypes.h" #ifdef __cplusplus extern "C" { diff --git a/xpcom/build/BinaryPath.h b/xpcom/build/BinaryPath.h index 264caa80c058..033ff5575066 100644 --- a/xpcom/build/BinaryPath.h +++ b/xpcom/build/BinaryPath.h @@ -6,7 +6,6 @@ #define mozilla_BinaryPath_h #include "nsXPCOMPrivate.h" // for MAXPATHLEN -#include "prtypes.h" #ifdef XP_WIN #include #elif defined(XP_MACOSX) diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h index d7859a2b9c6e..92738f34dabf 100644 --- a/xpcom/build/nsXULAppAPI.h +++ b/xpcom/build/nsXULAppAPI.h @@ -6,7 +6,6 @@ #ifndef _nsXULAppAPI_h__ #define _nsXULAppAPI_h__ -#include "prtypes.h" #include "nsID.h" #include "xrecore.h" #include "nsXPCOM.h" diff --git a/xpcom/ds/nsCRT.h b/xpcom/ds/nsCRT.h index c9c40c374526..be121a21e31d 100644 --- a/xpcom/ds/nsCRT.h +++ b/xpcom/ds/nsCRT.h @@ -10,7 +10,6 @@ #include #include "plstr.h" #include "nscore.h" -#include "prtypes.h" #include "nsCppSharedAllocator.h" #include "nsCRTGlue.h" diff --git a/xpcom/ds/nsHashtable.h b/xpcom/ds/nsHashtable.h index cc90f3fceb59..1a10daa73f93 100644 --- a/xpcom/ds/nsHashtable.h +++ b/xpcom/ds/nsHashtable.h @@ -21,7 +21,6 @@ #ifndef nsHashtable_h__ #define nsHashtable_h__ -#include "prtypes.h" #include "pldhash.h" #include "prlock.h" #include "nscore.h" diff --git a/xpcom/ds/nsStringEnumerator.cpp b/xpcom/ds/nsStringEnumerator.cpp index e65f9c3a4947..e840de4a9ba2 100644 --- a/xpcom/ds/nsStringEnumerator.cpp +++ b/xpcom/ds/nsStringEnumerator.cpp @@ -5,7 +5,6 @@ #include "nsStringEnumerator.h" -#include "prtypes.h" #include "nsCRT.h" #include "nsString.h" #include "nsReadableUtils.h" diff --git a/xpcom/glue/nsDebug.h b/xpcom/glue/nsDebug.h index 94ca472a7364..6b45fcc386e0 100644 --- a/xpcom/glue/nsDebug.h +++ b/xpcom/glue/nsDebug.h @@ -21,8 +21,6 @@ #include "prprf.h" #endif -#include "prtypes.h" - #ifdef DEBUG /** diff --git a/xpcom/glue/nsQuickSort.cpp b/xpcom/glue/nsQuickSort.cpp index cb8eb25ec4fb..bcb1093139e7 100644 --- a/xpcom/glue/nsQuickSort.cpp +++ b/xpcom/glue/nsQuickSort.cpp @@ -34,7 +34,6 @@ */ #include -#include "prtypes.h" #include "nsAlgorithm.h" #include "nsQuickSort.h" diff --git a/xpcom/glue/nsQuickSort.h b/xpcom/glue/nsQuickSort.h index 3d90c227d6f3..c947e2668d72 100644 --- a/xpcom/glue/nsQuickSort.h +++ b/xpcom/glue/nsQuickSort.h @@ -11,7 +11,6 @@ #ifndef nsQuickSort_h___ #define nsQuickSort_h___ -#include "prtypes.h" #include "nscore.h" #ifdef __cplusplus diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h index 11bba63e56b0..3c8d455d52e9 100644 --- a/xpcom/glue/nsTArray.h +++ b/xpcom/glue/nsTArray.h @@ -12,7 +12,6 @@ #include -#include "prtypes.h" #include "nsAlgorithm.h" #include "nscore.h" #include "nsQuickSort.h" diff --git a/xpcom/glue/nsTHashtable.h b/xpcom/glue/nsTHashtable.h index 39adcdb9d607..72ffcde6cdc4 100644 --- a/xpcom/glue/nsTHashtable.h +++ b/xpcom/glue/nsTHashtable.h @@ -7,7 +7,6 @@ #define nsTHashtable_h__ #include "nscore.h" -#include "prtypes.h" #include "pldhash.h" #include "nsDebug.h" #include NEW_H diff --git a/xpcom/io/nsLocalFileOS2.cpp b/xpcom/io/nsLocalFileOS2.cpp index 20653c641581..5b481f1bcfea 100644 --- a/xpcom/io/nsLocalFileOS2.cpp +++ b/xpcom/io/nsLocalFileOS2.cpp @@ -15,7 +15,6 @@ #include "nsISimpleEnumerator.h" #include "nsIDirectoryEnumerator.h" #include "nsIComponentManager.h" -#include "prtypes.h" #include "prio.h" #include "nsReadableUtils.h" diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 6a10056f5e8b..1887f5de3261 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -15,7 +15,6 @@ #include "nsISimpleEnumerator.h" #include "nsIComponentManager.h" -#include "prtypes.h" #include "prio.h" #include "private/pprio.h" // To get PR_ImportFile #include "prprf.h" diff --git a/xpcom/reflect/xptcall/public/xptcall.h b/xpcom/reflect/xptcall/public/xptcall.h index e03e1ad2c787..3ddbc9d3aff6 100644 --- a/xpcom/reflect/xptcall/public/xptcall.h +++ b/xpcom/reflect/xptcall/public/xptcall.h @@ -14,7 +14,6 @@ # define NS_InvokeByIndex NS_InvokeByIndex_P #endif -#include "prtypes.h" #include "nscore.h" #include "nsISupports.h" #include "xpt_struct.h" diff --git a/xpcom/reflect/xptinfo/public/xptinfo.h b/xpcom/reflect/xptinfo/public/xptinfo.h index 8535452e3654..010c86e37226 100644 --- a/xpcom/reflect/xptinfo/public/xptinfo.h +++ b/xpcom/reflect/xptinfo/public/xptinfo.h @@ -8,7 +8,6 @@ #ifndef xptiinfo_h___ #define xptiinfo_h___ -#include "prtypes.h" #include "nscore.h" #include "xpt_struct.h" diff --git a/xpcom/string/public/nsAlgorithm.h b/xpcom/string/public/nsAlgorithm.h index 86b00cec58ad..3ca62b91fadf 100644 --- a/xpcom/string/public/nsAlgorithm.h +++ b/xpcom/string/public/nsAlgorithm.h @@ -11,11 +11,6 @@ // for |nsCharSourceTraits|, |nsCharSinkTraits| #endif -#ifndef prtypes_h___ -#include "prtypes.h" - // for |uint32_t|... -#endif - #ifndef nsDebug_h___ #include "nsDebug.h" // for NS_ASSERTION diff --git a/xpcom/string/public/nsString.h b/xpcom/string/public/nsString.h index 075f4a335297..ae27f9dec89d 100644 --- a/xpcom/string/public/nsString.h +++ b/xpcom/string/public/nsString.h @@ -21,6 +21,9 @@ #include "nsReadableUtils.h" #endif +// For PRUnichar +#include "prtypes.h" + #include NEW_H // enable support for the obsolete string API if not explicitly disabled