Subject: Re: CVS commit: src/sys/lib/libkern
To: None <source-changes@netbsd.org>
From: David Young <dyoung@pobox.com>
List: source-changes
Date: 03/27/2006 15:47:08
On Mon, Mar 27, 2006 at 04:41:52PM -0500, Perry E. Metzger wrote:
> 
> David Young <dyoung@netbsd.org> writes:
> > Module Name:	src
> > Committed By:	dyoung
> > Date:		Mon Mar 27 21:18:33 UTC 2006
> >
> > Modified Files:
> > 	src/sys/lib/libkern: libkern.h
> >
> > Log Message:
> > Per discussion on source-changes@, add __arraycount(array) for
> > counting the number of elements in a static array, using the idiom,
> > sizeof(array)/sizeof(array[0]).
> 
> If it is only used in the kernel, why bother with the __? We don't
> need to be namespace clean.

I expect it to move from the kernel in the future, and the macro ought to
have the same name in both kernel & userland.  ISTR about three userland
header files were suggested, so I am avoiding that question until I can
gather more information in order to make a decision.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933