From owner-cvs-all Mon Jan 7 17:56:15 2002 Delivered-To: cvs-all@freebsd.org Received: from patrocles.silby.com (d108.as6.nwbl0.wi.voyager.net [169.207.128.108]) by hub.freebsd.org (Postfix) with ESMTP id 463E237B402; Mon, 7 Jan 2002 17:56:08 -0800 (PST) Received: from localhost (silby@localhost) by patrocles.silby.com (8.11.6/8.11.6) with ESMTP id g07JwqI31611; Mon, 7 Jan 2002 19:58:54 GMT (envelope-from silby@silby.com) X-Authentication-Warning: patrocles.silby.com: silby owned process doing -bs Date: Mon, 7 Jan 2002 19:58:52 +0000 (GMT) From: Mike Silbersack To: Bruce Evans Cc: cvs-committers@FreeBSD.org, Subject: Re: cvs commit: src/sys/kern uipc_socket2.c In-Reply-To: <20020107160807.V376-100000@gamplex.bde.org> Message-ID: <20020107194722.G31122-100000@patrocles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 7 Jan 2002, Bruce Evans wrote: > On Sun, 6 Jan 2002, Mike Silbersack wrote: > > > As for the (?)min functions... why are they defined in libkern.h, rather > > than types.h. Isn't min a compiler builtin? > > Because they aren't types, and they aren't declared in a bogus place like > the corresponding userland function MIN() (MIN is not a parameter, but is > defined in param.h). min isn't a compiler builtin. > > Bruce Ah, that makes sense then. If we use the simple macro #define min(a,b) (((a)<(b))?(a):(b)) and a & b's types differ, does the compiler promote the lesser size to the greater size for the purpose of the comparison, or does the comparison occur only on the size of the lesser argument? Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message