From owner-cvs-all@FreeBSD.ORG Thu Jul 1 04:00:29 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB9BB16A4CF; Thu, 1 Jul 2004 04:00:29 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D6AB43D5A; Thu, 1 Jul 2004 04:00:29 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i6140I4u016560; Thu, 1 Jul 2004 14:00:18 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i6140Fnl001813; Thu, 1 Jul 2004 14:00:16 +1000 Date: Thu, 1 Jul 2004 14:00:14 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: David Schultz In-Reply-To: <20040630030248.GA26810@VARK.homeunix.com> Message-ID: <20040701135645.B3068@gamplex.bde.org> References: <200406281915.i5SJFeaV060231@repoman.freebsd.org> <20040628193858.GG5635@green.homeunix.org> <20040629114614.T2908@gamplex.bde.org> <20040630095111.U2619@gamplex.bde.org> <20040630030248.GA26810@VARK.homeunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Brian Fundakowski Feldman cc: src-committers@freebsd.org cc: Andrew Gallatin cc: cvs-all@freebsd.org cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/vm vm_map.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 04:00:29 -0000 On Tue, 29 Jun 2004, David Schultz wrote: > On Wed, Jun 30, 2004, Bruce Evans wrote: > > On Tue, 29 Jun 2004, Andrew Gallatin wrote: > > > > > Bruce Evans writes: > > > > MIN() and MAX() should not be used in the kernel. 4.4BSD removed them in > > > > the kernel, but FreeBSD broke this in rev.1.141 of sys/param.h. They > > > > remain removed in RELENG_4. > > > > > > OK. Then what's the correct fix? ulmin()? > > > > Fixing min() to handle all unsigned types is probably best. > > Hmm...but this means either > > a) slightly pessimizing 32-bit ports with a function on uintmax_t's, This was in my list of slightly incorrect fixes. > b) using a macro and introducing double-expansion problems, or This was removed in 4.4BSD. > c) using GCC extensions > > Option (c) seems best from a technical standpoint, except that > we'd be making it harder than it already is to compile the kernel > with compilers other than gcc and icc. (Do others have the > statement expr extension?) I tried not to use gcc extensions for this back in FreeBSD-2, but the kernel is now so full with gccisms that another one wouldn't matter. It needs __typeof() more than staement-expressions. Bruce