X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Flikely%2F_info;h=b6885ef1fff346a0e0592b5265f57cad291d164d;hb=892f59bdc1830443f87ad3aaeddaab2eeefb5937;hp=5caed015d25d2bc92a6e69400bad6cf6b0ae7223;hpb=faace1758e31f87ee2032cc04c6bb41e3cf8f12e;p=ccan diff --git a/ccan/likely/_info b/ccan/likely/_info index 5caed015..b6885ef1 100644 --- a/ccan/likely/_info +++ b/ccan/likely/_info @@ -9,7 +9,10 @@ * help you annotate rare paths in your code for the convenience of the * compiler and the reader. * - * Licence: LGPL (2 or any later version) + * With CCAN_LIKELY_DEBUG defined, it provides statistics for each + * likely()/unlikely() call (but note that this requires LGPL dependencies). + * + * License: CC0 (Public domain) * Author: Rusty Russell * * Example: @@ -35,11 +38,20 @@ int main(int argc, char *argv[]) return 1; if (strcmp(argv[1], "depends") == 0) { +#ifdef CCAN_LIKELY_DEBUG printf("ccan/str\n"); - printf("ccan/hashtable\n"); + printf("ccan/htable\n"); printf("ccan/hash\n"); +#endif + return 0; + } + if (strcmp(argv[1], "testdepends") == 0) { +#ifndef CCAN_LIKELY_DEBUG + printf("ccan/str\n"); + printf("ccan/htable\n"); + printf("ccan/hash\n"); +#endif return 0; } - return 1; }