зеркало из 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;
|
||||
|
||||
#ifdef PR_ALIGN_OF_WORD
|
||||
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
|
||||
#else
|
||||
#define ALIGN_OF_WORD sizeof(void*)
|
||||
// PR_ALIGN_OF_WORD is only defined on some platforms. ALIGN_OF_WORD has
|
||||
// already been defined to PR_ALIGN_OF_WORD everywhere
|
||||
#ifndef PR_ALIGN_OF_WORD
|
||||
#define PR_ALIGN_OF_WORD sizeof(void*)
|
||||
#endif
|
||||
|
||||
// making PrefNameBuffer exactly 8k for nice allocation
|
||||
#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
|
||||
#if (ALIGN_OF_WORD & WORD_ALIGN_MASK) != 0
|
||||
#error "ALIGN_OF_WORD must be a power of 2!"
|
||||
#if (PR_ALIGN_OF_WORD & WORD_ALIGN_MASK) != 0
|
||||
#error "PR_ALIGN_OF_WORD must be a power of 2!"
|
||||
#endif
|
||||
|
||||
class PrefNameBuffer {
|
||||
|
|
Загрузка…
Ссылка в новой задаче