diff --git a/extensions/gio/nsGIOProtocolHandler.cpp b/extensions/gio/nsGIOProtocolHandler.cpp index 27de8570005..f2484c025ec 100644 --- a/extensions/gio/nsGIOProtocolHandler.cpp +++ b/extensions/gio/nsGIOProtocolHandler.cpp @@ -7,7 +7,7 @@ * This code is based on original Mozilla gnome-vfs extension. It implements * input stream provided by GVFS/GIO. */ -#include "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "mozilla/ModuleUtils.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" diff --git a/modules/libjar/nsJARInputStream.cpp b/modules/libjar/nsJARInputStream.cpp index 8e360631929..989af488973 100644 --- a/modules/libjar/nsJARInputStream.cpp +++ b/modules/libjar/nsJARInputStream.cpp @@ -5,7 +5,7 @@ * 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 "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsJARInputStream.h" #include "zipstruct.h" // defines ZIP compression codes #include "nsZipArchive.h" diff --git a/netwerk/base/src/nsDirectoryIndexStream.cpp b/netwerk/base/src/nsDirectoryIndexStream.cpp index 94c2e6aa658..2cc9dbada63 100644 --- a/netwerk/base/src/nsDirectoryIndexStream.cpp +++ b/netwerk/base/src/nsDirectoryIndexStream.cpp @@ -14,7 +14,7 @@ */ -#include "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsEscape.h" #include "nsDirectoryIndexStream.h" #include "nsXPIDLString.h" diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index ceedf2a9c85..8aed1db5e77 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -10,7 +10,7 @@ #define FORCE_PR_LOG // Allow logging in the release build #endif -#include "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "mozilla/net/CookieServiceChild.h" #include "mozilla/net/NeckoCommon.h" diff --git a/netwerk/protocol/about/nsAboutBloat.cpp b/netwerk/protocol/about/nsAboutBloat.cpp index 7e75271b6d2..a55fe99aad1 100644 --- a/netwerk/protocol/about/nsAboutBloat.cpp +++ b/netwerk/protocol/about/nsAboutBloat.cpp @@ -3,7 +3,7 @@ * 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 "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsTraceRefcntImpl.h" // if NS_BUILD_REFCNT_LOGGING isn't defined, don't try to build diff --git a/netwerk/protocol/about/nsAboutCache.cpp b/netwerk/protocol/about/nsAboutCache.cpp index 5558d6d220b..784b624239a 100644 --- a/netwerk/protocol/about/nsAboutCache.cpp +++ b/netwerk/protocol/about/nsAboutCache.cpp @@ -3,7 +3,7 @@ * 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 "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsAboutCache.h" #include "nsIIOService.h" #include "nsIServiceManager.h" diff --git a/netwerk/protocol/about/nsAboutCacheEntry.cpp b/netwerk/protocol/about/nsAboutCacheEntry.cpp index 7b294df2f46..7f87b3f142d 100644 --- a/netwerk/protocol/about/nsAboutCacheEntry.cpp +++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp @@ -5,7 +5,7 @@ #include -#include "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsAboutCacheEntry.h" #include "nsICacheService.h" #include "nsICacheSession.h" diff --git a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp index a861d24b5a6..98fca4cd5be 100644 --- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp +++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp @@ -3,7 +3,7 @@ * 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 "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsFTPDirListingConv.h" #include "nsMemory.h" #include "plstr.h" diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index afe019ee2a4..9b2ca4b32bd 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -12,7 +12,7 @@ -Gagan Saksena 04/29/99 */ -#include "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "TestCommon.h" #define FORCE_PR_LOG diff --git a/rdf/base/src/rdfutil.cpp b/rdf/base/src/rdfutil.cpp index 71a3bf7be4d..d7c58d3d228 100644 --- a/rdf/base/src/rdfutil.cpp +++ b/rdf/base/src/rdfutil.cpp @@ -19,7 +19,7 @@ */ -#include "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsCOMPtr.h" #include "nsIRDFDataSource.h" #include "nsIRDFNode.h" diff --git a/security/manager/ssl/src/nsCertTree.cpp b/security/manager/ssl/src/nsCertTree.cpp index b79657802b2..b979645bfba 100644 --- a/security/manager/ssl/src/nsCertTree.cpp +++ b/security/manager/ssl/src/nsCertTree.cpp @@ -2,7 +2,7 @@ * 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 "NSPRFormatTime.h" // must include before any headers that include prtime.h +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsNSSComponent.h" // for PIPNSS string bundle calls. #include "nsCertTree.h" #include "nsITreeColumns.h" diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp index c89c89bbdce..e70b890fbf4 100644 --- a/toolkit/profile/nsToolkitProfileService.cpp +++ b/toolkit/profile/nsToolkitProfileService.cpp @@ -609,7 +609,7 @@ static void SaltProfileName(nsACString& aName) double fpTime = double(PR_Now()); // use 1e-6, granularity of PR_Now() on the mac is seconds - srand((uint)(fpTime * 1e-6 + 0.5)); + srand((unsigned int)(fpTime * 1e-6 + 0.5)); char salt[9]; diff --git a/tools/trace-malloc/lib/nsDebugHelpWin32.cpp b/tools/trace-malloc/lib/nsDebugHelpWin32.cpp index 422f49685f2..c9b701cbb42 100644 --- a/tools/trace-malloc/lib/nsDebugHelpWin32.cpp +++ b/tools/trace-malloc/lib/nsDebugHelpWin32.cpp @@ -224,7 +224,7 @@ DHWImportHooker::PatchOneModule(HMODULE aModule, const char* name) // do the fun stuff... PIMAGE_IMPORT_DESCRIPTOR desc; - uint32_t size; + ULONG size; desc = (PIMAGE_IMPORT_DESCRIPTOR) dhwImageDirectoryEntryToData(aModule, true, diff --git a/tools/trace-malloc/lib/nsTraceMalloc.c b/tools/trace-malloc/lib/nsTraceMalloc.c index 30440244de9..481881f8b45 100644 --- a/tools/trace-malloc/lib/nsTraceMalloc.c +++ b/tools/trace-malloc/lib/nsTraceMalloc.c @@ -96,8 +96,8 @@ struct logfile { char *buf; int bufsize; int pos; - uint32_t size; - uint32_t simsize; + uint32_t size; + uint32_t simsize; logfile *next; logfile **prevp; }; @@ -268,7 +268,7 @@ tm_get_thread(void) } /* We don't want more than 32 logfiles open at once, ok? */ -typedef uint32_t lfd_set; +typedef uint32_t lfd_set; #define LFD_SET_STATIC_INITIALIZER 0 #define LFD_SET_SIZE 32 diff --git a/tools/trace-malloc/lib/nsTraceMallocCallbacks.h b/tools/trace-malloc/lib/nsTraceMallocCallbacks.h index 17d7c41314d..924e30c6409 100644 --- a/tools/trace-malloc/lib/nsTraceMallocCallbacks.h +++ b/tools/trace-malloc/lib/nsTraceMallocCallbacks.h @@ -9,6 +9,7 @@ #ifndef NSTRACEMALLOCCALLBACKS_H #define NSTRACEMALLOCCALLBACKS_H +#include "mozilla/StandardInteger.h" #include #ifdef __cplusplus diff --git a/tools/trace-malloc/spacetrace.c b/tools/trace-malloc/spacetrace.c index 2269fa36efe..1e86f53e98e 100644 --- a/tools/trace-malloc/spacetrace.c +++ b/tools/trace-malloc/spacetrace.c @@ -119,7 +119,7 @@ ticks2xsec(tmreader * aReader, uint32_t aTicks, uint32_t aResolution) bigone *= tmp64; LL_UI2L(tmp64, aReader->ticksPerSec); bigone /= tmp64; - return (uint32)bigone; + return (uint32_t)bigone; } #define ticks2msec(reader, ticks) ticks2xsec((reader), (ticks), 1000) diff --git a/tools/trace-malloc/spacetrace.h b/tools/trace-malloc/spacetrace.h index 4fd2c0589cd..6431737f95d 100644 --- a/tools/trace-malloc/spacetrace.h +++ b/tools/trace-malloc/spacetrace.h @@ -17,6 +17,7 @@ /* ** Required includes. */ +#include "mozilla/StandardInteger.h" #include "nspr.h" #include "prlock.h" #include "prrwlock.h" diff --git a/tools/trace-malloc/tmreader.h b/tools/trace-malloc/tmreader.h index 3c9687d4ceb..6e4dc757f60 100644 --- a/tools/trace-malloc/tmreader.h +++ b/tools/trace-malloc/tmreader.h @@ -6,7 +6,6 @@ #ifndef tmreader_h___ #define tmreader_h___ -#include "prtypes.h" #include "plhash.h" #include "nsTraceMalloc.h" #include "plarena.h" @@ -27,7 +26,7 @@ typedef struct tmmethodnode tmmethodnode; struct tmevent { char type; - uint32_t serial; + uint32_t serial; union { char *libname; char *srcname; @@ -35,7 +34,7 @@ struct tmevent { uint32_t library; uint32_t filename; uint32_t linenumber; - char *name; + char *name; } method; struct { uint32_t parent; @@ -86,7 +85,7 @@ struct tmgraphnode { struct tmmethodnode { tmgraphnode graphnode; char *sourcefile; - uint32_t linenumber; + uint32_t linenumber; }; #define tmgraphnode_name(node) ((char*) (node)->entry.value) @@ -126,7 +125,7 @@ struct tmcallsite { tmcallsite *siblings; /* other sites reached from parent */ tmcallsite *kids; /* sites reached from here */ tmmethodnode *method; /* method node in tmr->methods graph */ - uint32_t offset; /* pc offset from start of method */ + uint32_t offset; /* pc offset from start of method */ tmallcounts allocs; tmallcounts frees; void *data; /* tmreader clients can stick arbitrary @@ -144,7 +143,7 @@ struct tmreader { PLHashTable *callsites; PLArenaPool arena; tmcallsite calltree_root; - uint32_t ticksPerSec; + uint32_t ticksPerSec; }; typedef void (*tmeventhandler)(tmreader *tmr, tmevent *event); diff --git a/widget/cocoa/nsCocoaFeatures.h b/widget/cocoa/nsCocoaFeatures.h index 63655cba575..f37de67ddbc 100644 --- a/widget/cocoa/nsCocoaFeatures.h +++ b/widget/cocoa/nsCocoaFeatures.h @@ -6,6 +6,7 @@ #ifndef nsCocoaFeatures_h_ #define nsCocoaFeatures_h_ +#include "mozilla/StandardInteger.h" #include "prtypes.h" class nsCocoaFeatures { diff --git a/xpcom/base/NSPRFormatTime.h b/xpcom/base/NSPRFormatTime.h index 8e3d26f1fa7..004370ff1cc 100644 --- a/xpcom/base/NSPRFormatTime.h +++ b/xpcom/base/NSPRFormatTime.h @@ -4,6 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Temporarily undefine to build successfully with NO_NSPR_10_SUPPORT +#ifdef prtime_h___ +#error NSPRFormatTime.h must be included before any header that includes prtime.h +#endif #undef NO_NSPR_10_SUPPORT #include "prtime.h" #define NO_NSPR_10_SUPPORT diff --git a/xpcom/glue/nsCRTGlue.cpp b/xpcom/glue/nsCRTGlue.cpp index 1935765dbec..59246304d43 100644 --- a/xpcom/glue/nsCRTGlue.cpp +++ b/xpcom/glue/nsCRTGlue.cpp @@ -252,7 +252,7 @@ void NS_MakeRandomString(char *aBuf, int32_t aBufLen) // turn PR_Now() into milliseconds since epoch // and salt rand with that. double fpTime = double(PR_Now()); - srand((uint)(fpTime * 1e-6 + 0.5)); // use 1e-6, granularity of PR_Now() on the mac is seconds + srand((unsigned int)(fpTime * 1e-6 + 0.5)); // use 1e-6, granularity of PR_Now() on the mac is seconds int32_t i; for (i=0;i