[ping][PATCH 04/19] Use MODULE_NAME in stap-probe instead of IN_LIB
Roland McGrath
roland@hack.frob.com
Wed Nov 19 23:47:00 GMT 2014
> > Why is this better than just putting -DMODULE_NAME=... in CPPFLAGS
> > as with IN_MODULE? In fact, you could pass only -DMODULE_NAME=...
> > and then use PASTE(MODULE_,MODULE_NAME).
>
> I don't think that is possible. We cannot paste macro definitions.
> That is, I cannot do:
>
> #define MODULE_ ## libc 42
I'm not sure what you imagine I imagine that would do. What I'm talking
about is -DMODULE_NAME=libc instead of -DIN_MODULE=MODULE_libc and:
#define IN_MODULE PASTE(MODULE_, MODULE_NAME)
#define PASTE(a, b) PASTE_1(a, b)
#define PASTE_1(a, b) a##b
instead of generating #if IN_MODULE == ... #define MODULE_NAME ... #endif.
Of course the "#define MODULE_foo N" bit has to be generated.
More information about the Libc-alpha
mailing list