[PATCH] PAM Support for Busybox Login

Rich Felker dalias at aerifal.cx
Sun Oct 1 17:32:33 UTC 2006


On Sun, Oct 01, 2006 at 05:50:04PM +0200, Bernhard Fischer wrote:
> On Sun, Oct 01, 2006 at 07:34:23AM -0700, Dave Hylands wrote:
> >Hi Denis,
> >
> >> +#ifdef CONFIG_PAM
> >>
> >> #ifdef does not detect typos in macro names. #if ENABLE_PAM is better.
> >
> >#if doesn't detect typos in macros either.  The C preprocessor treats
> >undefined macros as 0 (at least for the purposes of #if statements).
> >
> >There may be other reasons to prefer #if to #ifdef, but the particular
> >one you gave doesn't wash.
> 
> Long-term, we will not define _any_ CONFIG_* preprocessor stuff, but
> only the ENABLE_ to either 1 or 0, so
> #if ENABLE_this_or_that
> is the proper, modern way to go.

Not possible for PAM though -- you can't be calling PAM functions if
the PAM headers don't even exist... Or do you propose to declare dummy
macros and functions in platform.h when PAM is disabled?

Rich




More information about the busybox mailing list