svn commit: r314780 - head/lib/libpam/modules/pam_exec

Ngie Cooper yaneurabeya at gmail.com
Sun Mar 12 23:54:43 UTC 2017


> On Mar 12, 2017, at 11:04, Ian Lepore <ian at freebsd.org> wrote:

...

> A quirk of C that's often forgotten is that a function-like macro is
> only expanded as a macro if the token following the macro name is an
> open paren.  So nitems() is a macro invokation and nitems = 0; is just
> a variable.
> 
> I'm not arguing against the replacement of variables named nitems, I
> actually think that should have been done as part of importing the
> function-like definition of nitems from netbsd.

Minor correction (as Pedro noted later):
- NetBSD uses __arraycount.
- OpenBSD uses nitems.
FreeBSD has standardized on nitems, probably because it came about in 8.x, whereas __arraycount came about later.
Cheers,
-Ngie


More information about the svn-src-head mailing list