On Wed, 22 Jul 2009, Andrew Morton wrote: > > > Also, is there any way of avoiding this? > > > > > > +#define FE_SUPPORTED(fe) (defined(CONFIG_DVB_##fe) || \ > > > + (defined(CONFIG_DVB_##fe##_MODULE) && defined(MODULE))) > > > > > > That's just way too tricky. It expects all versions of the > > > preprocessor to be correctly implemented (unlikely) and there are other > > > tools like unifdef which want to parse kernel #defines. > > > > What's so tricky about it? A quick grep shows hundreds of uses of > > ## for concatenation. > > Not the concatenation, of course. > > The worrisomie thing is the macro which expands to preprocessor > statements. It requires that the preprocessor run itself multiple > times across the same line. Or something. I don't recall seeing that > trick used elsewhere in the kernel and I have vague memories of it > causing problems in the past. Well, there is this now: arch/powerpc/include/asm/cputable.h:#define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \ include/drm/drmP.h:#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) include/drm/drmP.h:#define __OS_HAS_MTRR (defined(CONFIG_MTRR)) Though I can't find any macros with arguments that use those arguments in preprocessor directives. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html