From owner-freebsd-hackers Tue Jan 21 21:19:50 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A71C637B401 for ; Tue, 21 Jan 2003 21:19:49 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BA9C43ED8 for ; Tue, 21 Jan 2003 21:19:49 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.6/8.12.6) with ESMTP id h0M5Jm0i000825; Tue, 21 Jan 2003 21:19:49 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.6/8.12.6/Submit) id h0M5JmhD000824; Tue, 21 Jan 2003 21:19:48 -0800 (PST) Date: Tue, 21 Jan 2003 21:19:48 -0800 (PST) From: Matthew Dillon Message-Id: <200301220519.h0M5JmhD000824@apollo.backplane.com> To: "Matthew N. Dodd" Cc: hackers@FreeBSD.ORG, Hiten Pandya Subject: Re: patch to remove random #define MIN/MAX implementations from around the kernel References: <20030121235501.N59276-100000@sasami.jurai.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :I'd like to see all of these changed to the inlines in sys/libkern.h since :the compiler will do type checking for us. : :This is a little more work which is why I didn't do it myself when I dealt :with the abs() stuff. : :Consider this my objection. : :I don't think that it really stands in the way of the cleanup of all the :definitions of min/max etc. : :-- :| Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | This might be useful follow-up work. i.e. the idea of getting rid of the use of the MIN and MAX macros in the kernel altogether. Though I'm not sure I like the fact that 'min' and 'max' in sys/libkern.h refer to unsigned ints (it really should be umin and umax or uimin and uimax). That's a real problem. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message