summaryrefslogtreecommitdiff
path: root/lib/ccan/tlist/test/run.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-03-21 00:58:14 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-03-22 01:57:37 +0100
commit675593221c25dbebaaf8e4ce9f4271a8fb0171d0 (patch)
treee1f57a9e3919adb163c0acf1072708aca912945a /lib/ccan/tlist/test/run.c
parenteafd83736918bc5953e4a91cf2d893e68f2da2a2 (diff)
downloadsamba-675593221c25dbebaaf8e4ce9f4271a8fb0171d0.tar.gz
samba-675593221c25dbebaaf8e4ce9f4271a8fb0171d0.tar.bz2
samba-675593221c25dbebaaf8e4ce9f4271a8fb0171d0.zip
lib/ccan: namespacize ccan/list to avoid conflict with OpenIndiana's sys/list.h
CCAN includes a little utility called "namespacize" which prepends ccan_ to all public methods of a module, and fixes up any dependencies it finds. It's a little primitive, but it works here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ccan/tlist/test/run.c')
-rw-r--r--lib/ccan/tlist/test/run.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ccan/tlist/test/run.c b/lib/ccan/tlist/test/run.c
index 95b02ebe21..fe75c49125 100644
--- a/lib/ccan/tlist/test/run.c
+++ b/lib/ccan/tlist/test/run.c
@@ -12,7 +12,7 @@ struct parent {
struct child {
const char *name;
- struct list_node list;
+ struct ccan_list_node list;
};
int main(int argc, char *argv[])
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
c1.name = "c1";
tlist_add(&parent.children, &c1, list);
- /* Test list_add and !list_empty. */
+ /* Test ccan_list_add and !ccan_list_empty. */
ok1(!tlist_empty(&parent.children));
ok1(c2.list.next == &parent.children.raw.n);
ok1(c2.list.prev == &c1.list);
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
c3.name = "c3";
tlist_add_tail(&parent.children, &c3, list);
- /* Test list_add_tail and !list_empty. */
+ /* Test ccan_list_add_tail and !ccan_list_empty. */
ok1(!tlist_empty(&parent.children));
ok1(parent.children.raw.n.next == &c1.list);
ok1(parent.children.raw.n.prev == &c3.list);
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
/* Test tlist_top */
ok1(tlist_top(&parent.children, list) == &c1);
- /* Test list_tail */
+ /* Test ccan_list_tail */
ok1(tlist_tail(&parent.children, list) == &c3);
/* Test tlist_for_each. */
@@ -140,7 +140,7 @@ int main(int argc, char *argv[])
ok1(i == 3);
ok1(tlist_empty(&parent.children));
- /* Test list_top/list_tail on empty list. */
+ /* Test ccan_list_top/ccan_list_tail on empty list. */
ok1(tlist_top(&parent.children, list) == (struct child *)NULL);
ok1(tlist_tail(&parent.children, list) == (struct child *)NULL);
return exit_status();