Fix yet more portability bugs in integerset and its tests.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 22 Mar 2019 15:59:19 +0000 (17:59 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 22 Mar 2019 15:59:19 +0000 (17:59 +0200)
commitb5fd4972a3bc758c0b8e8c9cd4aa32bacdeb6605
treee487a493b2d3883bc4cbe15b0163400731944290
parent638db07814f389e739b2cfde01b592aa9150b1be
Fix yet more portability bugs in integerset and its tests.

There were more large constants that needed UINT64CONST. And one variable
was declared as "int", when it needed to be uint64. These bugs were only
visible on 32-bit systems; clearly I should've tested on one, given that
this code does a lot of work with 64-bit integers.

Also, in the test "huge distances" test, the code created some values with
random distances between them, but the test logic didn't take into account
the possibility that the random distance was exactly 1. That never actually
happens with the seed we're using, but let's be tidy.
src/backend/lib/integerset.c
src/test/modules/test_integerset/test_integerset.c