зеркало из https://github.com/mozilla/pjs.git
Fix bustage (really?) since NSPR defines ALIGN_OF_WORD to PR_ALIGN_OF_WORD even when PR_ALIGN_OF_WORD isn't defined.
This commit is contained in:
Родитель
f1c5888a43
Коммит
23446adef4
|
@ -180,20 +180,20 @@ static PLDHashTableOps pref_HashTableOps = {
|
||||||
|
|
||||||
class PrefNameBuffer;
|
class PrefNameBuffer;
|
||||||
|
|
||||||
#ifdef PR_ALIGN_OF_WORD
|
// PR_ALIGN_OF_WORD is only defined on some platforms. ALIGN_OF_WORD has
|
||||||
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
|
// already been defined to PR_ALIGN_OF_WORD everywhere
|
||||||
#else
|
#ifndef PR_ALIGN_OF_WORD
|
||||||
#define ALIGN_OF_WORD sizeof(void*)
|
#define PR_ALIGN_OF_WORD sizeof(void*)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// making PrefNameBuffer exactly 8k for nice allocation
|
// making PrefNameBuffer exactly 8k for nice allocation
|
||||||
#define PREFNAME_BUFFER_LEN (8192 - (sizeof(PrefNameBuffer*) + sizeof(char*)))
|
#define PREFNAME_BUFFER_LEN (8192 - (sizeof(PrefNameBuffer*) + sizeof(char*)))
|
||||||
|
|
||||||
#define WORD_ALIGN_MASK (ALIGN_OF_WORD - 1)
|
#define WORD_ALIGN_MASK (PR_ALIGN_OF_WORD - 1)
|
||||||
|
|
||||||
// sanity checking
|
// sanity checking
|
||||||
#if (ALIGN_OF_WORD & WORD_ALIGN_MASK) != 0
|
#if (PR_ALIGN_OF_WORD & WORD_ALIGN_MASK) != 0
|
||||||
#error "ALIGN_OF_WORD must be a power of 2!"
|
#error "PR_ALIGN_OF_WORD must be a power of 2!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class PrefNameBuffer {
|
class PrefNameBuffer {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче