* From: David Woodhouse
* Date: Thu, 24 May 2007 11:32:45 -0400
>
> On Wed, 2007-05-23 at 13:29 +0100, Jonathan Underwood wrote:
>> Dear Kernel list,
>> 
>> I've noticed in the past that unifdef is used in kernel package
>> building. I wonder if you're aware of a maintained and more
>> featureful program, Sunifdef, which has evolved from unifdef (which
>> seems mostly unmaintained). It's packaged for Fedora, and has a
>> website here.
>
> The kernel no longer uses an external unifdef -- it has its own in
> scripts/unifdef.c. If you want to work with the upstream kernel to
> change that to sunifdef, go ahead.
>
> Can 'sunifdef -U__KERNEL__' fix up stuff like...
>
> #if defined(__KERNEL__) && defined(__FOO__)
>  and
> #if defined(__KERNEL__) || defined(__BAR__)
>
> ... by treating them as '#if 0' (and eliding completely) and by
> rewriting to just #ifdef __BAR__, respectively? If so, changing the
> upstream kernel seems like it would be useful.

If, what you've wrote would be policy (with watchdog script in the git),
i think, simple (sed) scripts can be written to unifdef __KERNEL__ for
userspace headers, with further sed'ing them(compiler.h), without any
need of external or internal *programs*.

Linux coding standards got rid of many C obfustications, happily.

-*-
[EMAIL PROTECTED]:/tmp$ grep -e __KERNEL /usr/include/linux/soundcard.h | grep 
'!'
#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && 
!defined(_KERNEL)) || defined(USE_SEQ_MACROS)
[EMAIL PROTECTED]:/tmp$
-*-
Even this one is simple regex, but anyway, policy would be good.

> -- 
> dwmw2
____

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to