Bug 792379 - Don't include prtypes.h in base/basictypes.h; r=cjones
authorMs2ger <ms2ger@gmail.com>
Tue, 02 Oct 2012 10:24:12 +0200
changeset 108932 50fde7a256f154d3bfc47dbb0ca9bd5f8ee95042
parent 108931 111089855ef805f814a3eded6ec9961353d16313
child 108933 e95e75772da1bb934d3d09d4bf5e9db11ad8be7c
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewerscjones
bugs792379
milestone18.0a1
Bug 792379 - Don't include prtypes.h in base/basictypes.h; r=cjones
ipc/chromium/src/base/basictypes.h
xpcom/glue/nsTraceRefcnt.h
xpcom/glue/pldhash.h
--- a/ipc/chromium/src/base/basictypes.h
+++ b/ipc/chromium/src/base/basictypes.h
@@ -7,28 +7,16 @@
 
 // Chromium includes a prtypes.h also, but it has been modified to include
 // their build_config.h as well. We can therefore test for both to determine
 // if someone screws up the include order.
 #if defined(prtypes_h___) && !defined(BUILD_BUILD_CONFIG_H_)
 #error You_must_include_basictypes.h_before_prtypes.h!
 #endif
 
-#ifndef NO_NSPR_10_SUPPORT
-#define NO_NSPR_10_SUPPORT
-#define NO_NSPR_10_SUPPORT_SAVE
-#endif
-
-#include "prtypes.h"
-
-#ifdef NO_NSPR_10_SUPPORT_SAVE
-#undef NO_NSPR_10_SUPPORT_SAVE
-#undef NO_NSPR_10_SUPPORT
-#endif
-
 #include <limits.h>         // So we can set the bounds of our types
 #include <stddef.h>         // For size_t
 #include <string.h>         // for memcpy
 
 #include "base/port.h"    // Types that only need exist on certain systems
 
 #include "mozilla/StandardInteger.h"
 
--- a/xpcom/glue/nsTraceRefcnt.h
+++ b/xpcom/glue/nsTraceRefcnt.h
@@ -11,34 +11,34 @@
 
 #define NS_LOG_ADDREF(_p, _rc, _type, _size) \
   NS_LogAddRef((_p), (_rc), (_type), (uint32_t) (_size))
 
 #define NS_LOG_RELEASE(_p, _rc, _type) \
   NS_LogRelease((_p), (_rc), (_type))
 
 #define MOZ_COUNT_CTOR(_type)                                 \
-PR_BEGIN_MACRO                                                \
+do {                                                          \
   NS_LogCtor((void*)this, #_type, sizeof(*this));             \
-PR_END_MACRO
+} while (0)
 
 #define MOZ_COUNT_CTOR_INHERITED(_type, _base)                    \
-PR_BEGIN_MACRO                                                    \
+do {                                                              \
   NS_LogCtor((void*)this, #_type, sizeof(*this) - sizeof(_base)); \
-PR_END_MACRO
+} while (0)
 
 #define MOZ_COUNT_DTOR(_type)                                 \
-PR_BEGIN_MACRO                                                \
+do {                                                          \
   NS_LogDtor((void*)this, #_type, sizeof(*this));             \
-PR_END_MACRO
+} while (0)
 
 #define MOZ_COUNT_DTOR_INHERITED(_type, _base)                    \
-PR_BEGIN_MACRO                                                    \
+do {                                                              \
   NS_LogDtor((void*)this, #_type, sizeof(*this) - sizeof(_base)); \
-PR_END_MACRO
+} while (0)
 
 /* nsCOMPtr.h allows these macros to be defined by clients
  * These logging functions require dynamic_cast<void*>, so they don't
  * do anything useful if we don't have dynamic_cast<void*>. */
 #define NSCAP_LOG_ASSIGNMENT(_c, _p)                                \
   if (_p)                                                           \
     NS_LogCOMPtrAddRef((_c),static_cast<nsISupports*>(_p))
 
--- a/xpcom/glue/pldhash.h
+++ b/xpcom/glue/pldhash.h
@@ -5,16 +5,17 @@
 
 #ifndef pldhash_h___
 #define pldhash_h___
 /*
  * Double hashing, a la Knuth 6.
  *
  * Try to keep this file in sync with js/src/jsdhash.h.
  */
+#include "mozilla/Types.h"
 #include "nscore.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #if defined(__GNUC__) && defined(__i386__) && (__GNUC__ >= 3) && !defined(XP_OS2)
 #define PL_DHASH_FASTCALL __attribute__ ((regparm (3),stdcall))