[PATCH] PAM Support for Busybox Login

Bernhard Fischer rep.nop at aon.at
Sun Oct 1 10:18:01 PDT 2006


On Sun, Oct 01, 2006 at 01:32:33PM -0400, Rich Felker wrote:
>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?

huh?
#if ENABLE_PAM
!=
if (ENABLE_PAM).

That's exactly the thing the preprocessor is supposed to be used for, i
don't think adding dummies for possibly used helper libs of the kind of
pam is a sensible thing to do..



More information about the busybox mailing list