X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcrcsync%2F_info;h=7516f447480603c7722b61020953b9716980af50;hp=de60af4b9657f8809ac1470f6e2cbfd399cfc4cd;hb=HEAD;hpb=8fc7a90a8db345c4276419d11f8731afc63f65f5 diff --git a/ccan/crcsync/_info b/ccan/crcsync/_info index de60af4b..7516f447 100644 --- a/ccan/crcsync/_info +++ b/ccan/crcsync/_info @@ -1,6 +1,6 @@ +#include "config.h" #include #include -#include "config.h" /** * crcsync - routines to use crc for an rsync-like protocol. @@ -12,7 +12,8 @@ * // Calculate checksums of file (3-arg mode) * // Or print differences between file and checksums (4+ arg mode) * #include - * #include + * #include + * #include * #include * #include * #include @@ -37,10 +38,11 @@ * errx(1, "Usage: %s ...\n" * "OR: %s ", argv[0], argv[0]); * - * file = grab_file(NULL, argv[2], &len); + * file = grab_file(NULL, argv[2]); * if (!file) * err(1, "Opening file %s", argv[2]); - * + * len = tal_count(file) - 1; + * * if (argc == 3) { * // Short form prints CRCs of file for use in long form. * used = (len + blocksize - 1) / blocksize; @@ -77,9 +79,17 @@ int main(int argc, char *argv[]) if (strcmp(argv[1], "depends") == 0) { printf("ccan/crc\n"); + return 0; + } + if (strcmp(argv[1], "testdepends") == 0) { printf("ccan/array_size\n"); return 0; } + if (strcmp(argv[1], "ccanlint") == 0) { + /* We actually depend on the GPL crc routines, so not really LGPL :( */ + printf("license_depends_compat FAIL\n"); + return 0; + } return 1; }