diff options
author | cperciva <cperciva@FreeBSD.org> | 2014-09-27 09:00:38 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2014-09-27 09:00:38 +0000 |
commit | a742fc39b4772b875eb540b6934da3350e9086e2 (patch) | |
tree | 8e2df76b0bdde221c9133d127b4506787e35922e /games/primes/primes.h | |
parent | 0d3437c89c0362a97db627be97564083305c763f (diff) | |
download | FreeBSD-src-a742fc39b4772b875eb540b6934da3350e9086e2.zip FreeBSD-src-a742fc39b4772b875eb540b6934da3350e9086e2.tar.gz |
Switch primes(6) from using unsigned long to using uint64_t. This fixes
'limited range of type' warnings about comparisons on 32-bit systems, and
allows 32-bit systems to compute the full range of primes.
Diffstat (limited to 'games/primes/primes.h')
-rw-r--r-- | games/primes/primes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/games/primes/primes.h b/games/primes/primes.h index 7dcef52..3a18fc7 100644 --- a/games/primes/primes.h +++ b/games/primes/primes.h @@ -41,8 +41,10 @@ * chongo <for a good prime call: 391581 * 2^216193 - 1> /\oo/\ */ +#include <stdint.h> + /* ubig is the type that holds a large unsigned value */ -typedef unsigned long ubig; /* must be >=32 bit unsigned value */ +typedef uint64_t ubig; /* must be >=32 bit unsigned value */ #define BIG ULONG_MAX /* largest value will sieve */ /* bytes in sieve table (must be > 3*5*7*11) */ |