svn 16130

Rob Landley rob at landley.net
Mon Sep 18 21:18:41 UTC 2006


On Monday 18 September 2006 11:45 am, Rich Felker wrote:
> On Mon, Sep 18, 2006 at 09:24:48AM -0400, Rob Landley wrote:
> > Why this bit?
> > 
> >         if (opt_host) {
> > -               if (ENABLE_FEATURE_UTMP)
> > +               USE_FEATURE_UTMP(
> >                         safe_strncpy(utent.ut_host, opt_host, 
> > sizeof(utent.ut_host));
> > +               )
> > 
> > The if(ENABLE) clause should never cause a config-dependent build break.  
The 
> > USE() clause can.  It doesn't seem like it will in this instance, but in 
> > general it's good to use ENABLE where possible, instead of USE().  Why the 
> > switch from one to the other here?
> 
> Probably without ENABLE_FEATURE_UTMP it's allowed for the utmp headers
> not to exist..? Should that maybe he hidden in platform.h with dummy
> utmp struct and prototypes/macros?

Ah, I see.  The #include <utmp.h> isn't in the #ifdef, but the declaration of 
the variable is.

This is another reason I want to move all the global statics into a union of 
per-applet global structs.  That way you can always define 'em and just put 
the ones you only want conditionally used at the end of the struct.

> Rich

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list