mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 775428: add a long long template for OpenBSD/64bits, fixes build breakage after 745148. r=cjones
This commit is contained in:
parent
a14ed4669d
commit
cc75f7deee
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user