Backout changeset 310e29c26ea3 (bug 798564) for breaking Windows builds

This commit is contained in:
Ehsan Akhgari 2012-10-11 12:12:09 -04:00
parent 1d7769929b
commit 535efd138c
3 changed files with 11 additions and 6 deletions

View File

@ -8,6 +8,7 @@
#define MAR_H__ #define MAR_H__
/* We use NSPR here just to import the definition of uint32_t */ /* We use NSPR here just to import the definition of uint32_t */
#include "prtypes.h"
#include "mozilla/StandardInteger.h" #include "mozilla/StandardInteger.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -6,6 +6,7 @@
#define MAR_CMDLINE_H__ #define MAR_CMDLINE_H__
/* We use NSPR here just to import the definition of uint32_t */ /* We use NSPR here just to import the definition of uint32_t */
#include "prtypes.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -7,10 +7,15 @@
#ifndef MAR_PRIVATE_H__ #ifndef MAR_PRIVATE_H__
#define MAR_PRIVATE_H__ #define MAR_PRIVATE_H__
#include "prtypes.h"
#include "limits.h" #include "limits.h"
#include "mozilla/Assertions.h"
#include "mozilla/StandardInteger.h" #include "mozilla/StandardInteger.h"
/* Code in this module requires a guarantee that the size
of uint32_t and uint64_t are 4 and 8 bytes respectively. */
PR_STATIC_ASSERT(sizeof(uint32_t) == 4);
PR_STATIC_ASSERT(sizeof(uint64_t) == 8);
#define BLOCKSIZE 4096 #define BLOCKSIZE 4096
#define ROUND_UP(n, incr) (((n) / (incr) + 1) * (incr)) #define ROUND_UP(n, incr) (((n) / (incr) + 1) * (incr))
@ -31,14 +36,12 @@
/* Existing code makes assumptions that the file size is /* Existing code makes assumptions that the file size is
smaller than LONG_MAX. */ smaller than LONG_MAX. */
MOZ_STATIC_ASSERT(MAX_SIZE_OF_MAR_FILE < ((int64_t)LONG_MAX), PR_STATIC_ASSERT(MAX_SIZE_OF_MAR_FILE < ((int64_t)LONG_MAX));
"max mar file size is too big");
/* We store at most the size up to the signature block + 4 /* We store at most the size up to the signature block + 4
bytes per BLOCKSIZE bytes */ bytes per BLOCKSIZE bytes */
MOZ_STATIC_ASSERT(sizeof(BLOCKSIZE) < \ PR_STATIC_ASSERT(sizeof(BLOCKSIZE) < \
(SIGNATURE_BLOCK_OFFSET + sizeof(uint32_t)), (SIGNATURE_BLOCK_OFFSET + sizeof(uint32_t)));
"BLOCKSIZE is too big");
/* The maximum size of any signature supported by current and future /* The maximum size of any signature supported by current and future
implementations of the signmar program. */ implementations of the signmar program. */