On Saturday, September 27, 2014 06:00:28 AM Colin Percival wrote: > On 09/27/14 05:52, John Baldwin wrote: > > On Saturday, September 27, 2014 09:00:39 AM Colin Percival wrote: > >> #define BIG ULONG_MAX /* largest value will sieve */ > > > > Should this be UINT64_MAX (or however that is spelled) instead of > > ULONG_MAX > > now? (or is it even still used? I know your change removed its use in at > > least one place.) > > It's not used any more. I was resisting the urge to spend time going > through and removing ancient history (which is why I kept ubig instead of > changing it to uint64_t everywhere).
It's kind of misleading though as the value is wrong and the comment for it no longer applies. How about this: Index: primes.c =================================================================== --- primes.c (revision 272281) +++ primes.c (working copy) @@ -169,7 +169,7 @@ /* * read_num_buf -- - * This routine returns a number n, where 0 <= n && n <= BIG. + * This routine returns a non-negative number n */ static ubig read_num_buf(void) @@ -214,7 +214,7 @@ /* * A number of systems can not convert double values into unsigned * longs when the values are larger than the largest signed value. - * We don't have this problem, so we can go all the way to BIG. + * We don't have this problem, so we can go all the way. */ if (start < 3) { start = (ubig)2; Index: primes.h =================================================================== --- primes.h (revision 272281) +++ primes.h (working copy) @@ -45,7 +45,6 @@ /* ubig is the type that holds a large 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) */ #define TABSIZE 256*1024 -- John Baldwin _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"