Nice kconfig hack

Lauri Kasanen curaga at operamail.com
Thu Apr 26 13:03:07 UTC 2012


Hi

Linus asked for a better way to handle the kconfig values:
https://plus.google.com/102150693225130002912/posts/9gntjh57dXt

The solution is rather neat, maybe it could save generating a few
thousand included lines in busybox too:

#define is_set(macro) is_set_(macro)
#define macrotest_1 ,
#define is_set_(value) is_set__(macrotest_##value)
#define is_set__(comma) is_set___(comma 1, 0)
#define is_set___(_, v, ...) v

- Lauri

-- 
http://www.fastmail.fm - The professional email service

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test2.c
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20120426/46ffeafb/attachment.c>


More information about the busybox mailing list