X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fcppmagic%2F_info;fp=ccan%2Fcppmagic%2F_info;h=aad394b9bf34cb8dd5a62c9de9af43ebab33a988;hb=ff71198b4e75fcaaedad34a4e362a3982a936e3e;hp=0000000000000000000000000000000000000000;hpb=c43be6b888aa75d2a8d7fcc878534a9cad04176b;p=ccan diff --git a/ccan/cppmagic/_info b/ccan/cppmagic/_info new file mode 100644 index 00000000..aad394b9 --- /dev/null +++ b/ccan/cppmagic/_info @@ -0,0 +1,30 @@ +#include "config.h" +#include +#include + +/** + * cppmagic - Abuse of the C preprocessor + * + * This contains a bunch of fancy macro techniques such as + * preprocessor-time evaluated conditionals and (quasi) recursion and + * iteration. + * + * It's based on these articles: + * - http://jhnet.co.uk/articles/cpp_magic + * - https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,-tips,-and-idioms + * and code from the Boost C++ library. + * + * License: BSD-MIT + */ +int main(int argc, char *argv[]) +{ + /* Expect exactly one argument */ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { + return 0; + } + + return 1; +}