Subject: Re: CVS commit: syssrc
To: Nathan J. Williams <nathanw@MIT.EDU>
From: Chuck Silvers <chuq@chuq.com>
List: source-changes
Date: 02/05/2001 10:11:09
the min() and max() in libkern are still there, but I can't use them.
those are functions which take arguments of type "u_int", and I need to
operate on values of type "off_t". the macro versions do the right thing
in this case whereas the inline functions don't.
now that I look, I see that there are several flavors of min() and max()
in libkern, which take different types of arguments. we could add more
flavors so that we have one for each possible integral type, but that
seems pretty silly when a single macro version will handle all types.
-Chuck
On Mon, Feb 05, 2001 at 12:50:07PM -0500, Nathan J. Williams wrote:
> Chuck Silvers <chs@netbsd.org> writes:
>
> > Log Message:
> > expose the definitions of MIN() and MAX() in sys/param.h to the kernel
> > and use those in favor of a dozen copies scattered around the source tree.
>
> We have had min() and max() and a few other flavors of this function
> in libkern.h for a while. I had thought that that was the canonical
> location. Having only two copies is better than having a dozen copies,
> but might we settle on just one?
>
> - Nathan