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.