From owner-svn-src-all@FreeBSD.ORG Sat Sep 27 12:55:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D027AE5; Sat, 27 Sep 2014 12:55:32 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 049EFB1D; Sat, 27 Sep 2014 12:55:32 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 69DEEB93C; Sat, 27 Sep 2014 08:55:30 -0400 (EDT) From: John Baldwin To: Colin Percival Subject: Re: svn commit: r272207 - in head/games: factor primes Date: Sat, 27 Sep 2014 08:52:33 -0400 Message-ID: <1576403.4iOOFWFkUs@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) In-Reply-To: <201409270900.s8R90dWl029070@svn.freebsd.org> References: <201409270900.s8R90dWl029070@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 27 Sep 2014 08:55:30 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Sep 2014 12:55:32 -0000 On Saturday, September 27, 2014 09:00:39 AM Colin Percival wrote: > Author: cperciva > Date: Sat Sep 27 09:00:38 2014 > New Revision: 272207 > URL: http://svnweb.freebsd.org/changeset/base/272207 > > Log: > 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. > > Modified: > head/games/factor/factor.6 > head/games/primes/primes.c > head/games/primes/primes.h > > Modified: head/games/primes/primes.h > ============================================================================ > == --- head/games/primes/primes.h Sat Sep 27 08:59:43 2014 (r272206) > +++ head/games/primes/primes.h Sat Sep 27 09:00:38 2014 (r272207) > @@ -41,8 +41,10 @@ > * chongo /\oo/\ > */ > > +#include > + > /* 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 */ 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.) -- John Baldwin