summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-03-30 15:53:45 +1030
committerRusty Russell <rusty@rustcorp.com.au>2015-03-30 17:16:32 +1030
commitc1bace5e7359b63a6fe5beab5e8c8faf9de794b6 (patch)
treebdc507949119090456bb2fe2891e3f7950905b21
parent9eb1109954a99791ae6a930a4b7120b1c55ee1a7 (diff)
stringbuilder: fix ccan/str test dependency.
It's a test dependency, not a core one, so it belongs under "testdepends". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--ccan/stringbuilder/_info9
-rw-r--r--ccan/stringbuilder/test/run.c8
2 files changed, 6 insertions, 11 deletions
diff --git a/ccan/stringbuilder/_info b/ccan/stringbuilder/_info
index 4c782544..802914c2 100644
--- a/ccan/stringbuilder/_info
+++ b/ccan/stringbuilder/_info
@@ -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;
}
diff --git a/ccan/stringbuilder/test/run.c b/ccan/stringbuilder/test/run.c
index 2d119f25..b59a0aab 100644
--- a/ccan/stringbuilder/test/run.c
+++ b/ccan/stringbuilder/test/run.c
@@ -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>