Bug 794510: Part 6 - Fixups needed to build on Windows and Android and Mac OS X debug, plus shorten comment to be less than 80 columns; r=ehsan

This commit is contained in:
Brian Smith 2012-10-18 15:55:48 -04:00
parent 9e41ce2fa0
commit 035e8b8432
21 changed files with 29 additions and 24 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -5,7 +5,7 @@
#include <limits.h>
#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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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];

View File

@ -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,

View File

@ -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

View File

@ -9,6 +9,7 @@
#ifndef NSTRACEMALLOCCALLBACKS_H
#define NSTRACEMALLOCCALLBACKS_H
#include "mozilla/StandardInteger.h"
#include <stdlib.h>
#ifdef __cplusplus

View File

@ -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)

View File

@ -17,6 +17,7 @@
/*
** Required includes.
*/
#include "mozilla/StandardInteger.h"
#include "nspr.h"
#include "prlock.h"
#include "prrwlock.h"

View File

@ -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);

View File

@ -6,6 +6,7 @@
#ifndef nsCocoaFeatures_h_
#define nsCocoaFeatures_h_
#include "mozilla/StandardInteger.h"
#include "prtypes.h"
class nsCocoaFeatures {

View File

@ -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

View File

@ -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<aBufLen;i++) {