зеркало из https://github.com/mozilla/gecko-dev.git
Bug 775428: add a long long template for OpenBSD/64bits, fixes build breakage after 745148. r=cjones
This commit is contained in:
Родитель
36a3916375
Коммит
87a30c06c6
|
@ -193,6 +193,29 @@ struct ParamTraits<unsigned long long> {
|
|||
l->append(StringPrintf(L"%ull", p));
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<long long> {
|
||||
typedef long long param_type;
|
||||
static void Write(Message* m, const param_type& p) {
|
||||
m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
|
||||
}
|
||||
static bool Read(const Message* m, void** iter, param_type* r) {
|
||||
const char *data;
|
||||
int data_size = 0;
|
||||
bool result = m->ReadData(iter, &data, &data_size);
|
||||
if (result && data_size == sizeof(param_type)) {
|
||||
memcpy(r, data, sizeof(param_type));
|
||||
} else {
|
||||
result = false;
|
||||
NOTREACHED();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
static void Log(const param_type& p, std::wstring* l) {
|
||||
l->append(StringPrintf(L"%ll", p));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
|
||||
|
|
Загрузка…
Ссылка в новой задаче