diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-03-21 00:58:14 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-03-22 01:57:37 +0100 |
commit | 675593221c25dbebaaf8e4ce9f4271a8fb0171d0 (patch) | |
tree | e1f57a9e3919adb163c0acf1072708aca912945a /lib/ccan/list/list.c | |
parent | eafd83736918bc5953e4a91cf2d893e68f2da2a2 (diff) | |
download | samba-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/list/list.c')
-rw-r--r-- | lib/ccan/list/list.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ccan/list/list.c b/lib/ccan/list/list.c index 29dc30ba19..380212ace7 100644 --- a/lib/ccan/list/list.c +++ b/lib/ccan/list/list.c @@ -4,8 +4,8 @@ #include "list.h" static void *corrupt(const char *abortstr, - const struct list_node *head, - const struct list_node *node, + const struct ccan_list_node *head, + const struct ccan_list_node *node, unsigned int count) { if (abortstr) { @@ -17,10 +17,10 @@ static void *corrupt(const char *abortstr, return NULL; } -struct list_node *list_check_node(const struct list_node *node, +struct ccan_list_node *ccan_list_check_node(const struct ccan_list_node *node, const char *abortstr) { - const struct list_node *p, *n; + const struct ccan_list_node *p, *n; int count = 0; for (p = node, n = node->next; n != node; p = n, n = n->next) { @@ -32,12 +32,12 @@ struct list_node *list_check_node(const struct list_node *node, if (node->prev != p) return corrupt(abortstr, node, node, 0); - return (struct list_node *)node; + return (struct ccan_list_node *)node; } -struct list_head *list_check(const struct list_head *h, const char *abortstr) +struct ccan_list_head *ccan_list_check(const struct ccan_list_head *h, const char *abortstr) { - if (!list_check_node(&h->n, abortstr)) + if (!ccan_list_check_node(&h->n, abortstr)) return NULL; - return (struct list_head *)h; + return (struct ccan_list_head *)h; } |