Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
On Thu, May 26, 2011 at 05:35:20PM +0100, David Laight wrote:
> On Thu, May 26, 2011 at 11:32:51AM -0500, David Young wrote:
> > On Thu, May 26, 2011 at 06:10:42PM +0200, Lars Heidieker wrote:
> > > On 05/26/11 06:25, Masao Uebayashi wrote:
> ...
> > > with those changes I can't compile a kernel without USERCONF option set.
> > > The changes in x86_machdep.c should be with in if defs on that options
> > >
> > > Ok to commit the attached patch?
> >
> > Conditional compilation clutters the code up. What if instead you add
> > to kern_stub.c,
> >
> > #include <sys/userconf.h>
> > __weak_alias(userconf_bootinfo, voidop);
>
> I'd either:
> leave userconf_bootinfo() defined but with no body
> or:
> #define userconf_bootinfo()
> (or maybe both!)
If you do both, ISTM that the preprocessor will turn this:
void
userconf_bootinfo(void)
{
#ifdef USERCONF
#endif /* USERCONF */
}
to this:
void
{
#ifdef USERCONF
#endif /* USERCONF */
}
which won't compile.
Leaving userconf_bootinfo() undefined but with no body seems equivalent
to aliasing to voidop() *except* that there's an extra 'ret' instruction
in the kernel somewhere. :-) Also, it precludes linking with an object
containing a real userconf_bootinfo(), later. There's still the #ifdef
clutter of userconf_bootinfo(), albeit greatly reduced.
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 344-0444 x24
Home |
Main Index |
Thread Index |
Old Index