Use ULL prefix instead of LLU for unsigned long longs
MSVC only supports the former.
This commit is contained in:
parent
3a730dfd50
commit
a9df1ae622
@ -76,9 +76,9 @@ hash_fmix_64(uint64_t k)
|
|||||||
{
|
{
|
||||||
|
|
||||||
k ^= k >> 33;
|
k ^= k >> 33;
|
||||||
k *= QU(0xff51afd7ed558ccdLLU);
|
k *= QU(0xff51afd7ed558ccdULL);
|
||||||
k ^= k >> 33;
|
k ^= k >> 33;
|
||||||
k *= QU(0xc4ceb9fe1a85ec53LLU);
|
k *= QU(0xc4ceb9fe1a85ec53ULL);
|
||||||
k ^= k >> 33;
|
k ^= k >> 33;
|
||||||
|
|
||||||
return (k);
|
return (k);
|
||||||
@ -247,8 +247,8 @@ hash_x64_128(const void *key, const int len, const uint32_t seed,
|
|||||||
uint64_t h1 = seed;
|
uint64_t h1 = seed;
|
||||||
uint64_t h2 = seed;
|
uint64_t h2 = seed;
|
||||||
|
|
||||||
const uint64_t c1 = QU(0x87c37b91114253d5LLU);
|
const uint64_t c1 = QU(0x87c37b91114253d5ULL);
|
||||||
const uint64_t c2 = QU(0x4cf5ad432745937fLLU);
|
const uint64_t c2 = QU(0x4cf5ad432745937fULL);
|
||||||
|
|
||||||
/* body */
|
/* body */
|
||||||
{
|
{
|
||||||
|
@ -511,7 +511,7 @@ uint64_t gen_rand64(sfmt_t *ctx) {
|
|||||||
uint64_t gen_rand64_range(sfmt_t *ctx, uint64_t limit) {
|
uint64_t gen_rand64_range(sfmt_t *ctx, uint64_t limit) {
|
||||||
uint64_t ret, above;
|
uint64_t ret, above;
|
||||||
|
|
||||||
above = 0xffffffffffffffffLLU - (0xffffffffffffffffLLU % limit);
|
above = 0xffffffffffffffffULL - (0xffffffffffffffffULL % limit);
|
||||||
while (1) {
|
while (1) {
|
||||||
ret = gen_rand64(ctx);
|
ret = gen_rand64(ctx);
|
||||||
if (ret < above) {
|
if (ret < above) {
|
||||||
|
2000
test/unit/SFMT.c
2000
test/unit/SFMT.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user