]> git.ozlabs.org Git - ccan/commitdiff
stringbuilder: fix ccan/str test dependency.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 30 Mar 2015 05:23:45 +0000 (15:53 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 30 Mar 2015 06:46:32 +0000 (17:16 +1030)
It's a test dependency, not a core one, so it belongs under "testdepends".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/stringbuilder/_info
ccan/stringbuilder/test/run.c

index 4c7825447b3ff5c49368dc00147486f07d66e8d7..802914c2bc509163c08da1e932a8228a67ea7f36 100644 (file)
@@ -48,10 +48,11 @@ int main(int argc, char *argv[])
                return 1;
 
        if (strcmp(argv[1], "depends") == 0) {
-               /*
-                * This triggers a circular dependency!
-                * printf("ccan/str\n");
-                */
+               return 0;
+       }
+
+       if (strcmp(argv[1], "testdepends") == 0) {
+               printf("ccan/str\n");
                return 0;
        }
 
index 2d119f25cdf1472047f8a9b886509f3769790f85..b59a0aab128db599e7ac63bfa1624e208c60547e 100644 (file)
@@ -1,15 +1,9 @@
 #include <ccan/stringbuilder/stringbuilder.h>
 #include <ccan/stringbuilder/stringbuilder.c>
+#include <ccan/str/str.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
-/*
- * This triggers a circular dependency
- * #include <ccan/str/str.h>
- *
- * We only want the following macro:
- */
-#define streq(s1,s2) (!strcmp(s1,s2))
 
 #include <ccan/tap/tap.h>