X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fautodata%2F_info;fp=ccan%2Fautodata%2F_info;h=b804bcdd329c2eba9a49a7b6a95837124b6e9f62;hb=446eaa5f66db385d89357ba43aa5886f8b906ff0;hp=0000000000000000000000000000000000000000;hpb=6a8d296f9383dd25ec381e2ab136a33823d140e5;p=ccan diff --git a/ccan/autodata/_info b/ccan/autodata/_info new file mode 100644 index 00000000..b804bcdd --- /dev/null +++ b/ccan/autodata/_info @@ -0,0 +1,27 @@ +#include +#include "config.h" + +/** + * autodata - stash pointers in your binary for automatic registration + * + * This code allows declarations in your source which you can gather + * together at runtime to form tables. This is often used in place of + * having to patch a registration function call out, or a central + * table. + * + * License: BSD-MIT + */ +int main(int argc, char *argv[]) +{ + /* Expect exactly one argument */ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { + printf("ccan/compiler\n"); + printf("ccan/ptr_valid\n"); + return 0; + } + + return 1; +}