Subject: re: CVS commit: basesrc
To: matthew green <>
From: Bill Studenmund <>
List: tech-kern
Date: 07/12/1999 13:50:34
On Sat, 10 Jul 1999, matthew green wrote:

>    On Fri, Jul 09, 1999 at 11:22:24AM +1000, matthew green wrote:
>    > it seems that we need some new preprocessor symbol to deal with this,
>    > such as `_KERNEL_FROM_USERLAND' which basically means to not include
>    > opt_xxx.h files, and any userland code that wants to #define _KERNEL
>    > must also define this.  the above is a hack and should die.
>    > 
>    > 
>    > comments?

Please discuss on tech-kern or one of the normal conversation lists! :-)

>    Sure it would make a lot of things much simpler.
> so, i've done this but i called it _KERNEL_NO_OPT_H and i've also made
> define it as well as _KERNEL, and i've fixed all the header
> files to be just _KERNEL && !_KERNEL_NO_OPT_H (i'll get to the rest of
> the kernel sources before commiting).
> i'll probably commit this in a day or so unless there are objections,
> as well as removing the #define _LKM hack from both pstat and fstat.

I'd like to make a suggestion then. Rather than adding a long variable to
turn off the opt_foo.h inclusion, add a variable to turn it in.

So all the #if defined(_KERNEL) && !defined(_KERNEL_NO_OPT_H) stuff
becomes #ifdef _KERNEL_OPT_H

Much cleaner. :-)

Take care,