summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/gssapi/mech/mechqueue.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-01-31 15:59:06 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-02-02 15:19:03 +1100
commit2d9bcc861d6b2cd67d7c6439e90d9ac4a600f0f2 (patch)
treece681728eb91875b60b70d34247a0f07772ec411 /source4/heimdal/lib/gssapi/mech/mechqueue.h
parent3d4a9ddc244bd4937af9ff1c6e898ab45a7d28b5 (diff)
downloadsamba-2d9bcc861d6b2cd67d7c6439e90d9ac4a600f0f2.tar.gz
samba-2d9bcc861d6b2cd67d7c6439e90d9ac4a600f0f2.tar.bz2
samba-2d9bcc861d6b2cd67d7c6439e90d9ac4a600f0f2.zip
s4:heimdal: import lorikeet-heimdal-201101310455 (commit aa88eb1a05c4985cc23fb65fc1bad75bdce01c1f)
Diffstat (limited to 'source4/heimdal/lib/gssapi/mech/mechqueue.h')
-rw-r--r--source4/heimdal/lib/gssapi/mech/mechqueue.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/source4/heimdal/lib/gssapi/mech/mechqueue.h b/source4/heimdal/lib/gssapi/mech/mechqueue.h
index 7a05c94bf8..95941bab7e 100644
--- a/source4/heimdal/lib/gssapi/mech/mechqueue.h
+++ b/source4/heimdal/lib/gssapi/mech/mechqueue.h
@@ -34,20 +34,18 @@
#ifndef _MECHQUEUE_H_
#define _MECHQUEUE_H_
-#ifndef SLIST_HEAD
-
/*
* Singly-linked List definitions.
*/
-#define SLIST_HEAD(name, type) \
+#define HEIM_SLIST_HEAD(name, type) \
struct name { \
struct type *slh_first; /* first element */ \
}
-#define SLIST_HEAD_INITIALIZER(head) \
+#define HEIM_SLIST_HEAD_INITIALIZER(head) \
{ NULL }
-#define SLIST_ENTRY(type) \
+#define HEIM_SLIST_ENTRY(type) \
struct { \
struct type *sle_next; /* next element */ \
}
@@ -55,27 +53,27 @@ struct { \
/*
* Singly-linked List functions.
*/
-#define SLIST_INIT(head) do { \
+#define HEIM_SLIST_INIT(head) do { \
(head)->slh_first = NULL; \
} while (/*CONSTCOND*/0)
-#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+#define HEIM_SLIST_INSERT_AFTER(slistelm, elm, field) do { \
(elm)->field.sle_next = (slistelm)->field.sle_next; \
(slistelm)->field.sle_next = (elm); \
} while (/*CONSTCOND*/0)
-#define SLIST_INSERT_HEAD(head, elm, field) do { \
+#define HEIM_SLIST_INSERT_HEAD(head, elm, field) do { \
(elm)->field.sle_next = (head)->slh_first; \
(head)->slh_first = (elm); \
} while (/*CONSTCOND*/0)
-#define SLIST_REMOVE_HEAD(head, field) do { \
+#define HEIM_SLIST_REMOVE_HEAD(head, field) do { \
(head)->slh_first = (head)->slh_first->field.sle_next; \
} while (/*CONSTCOND*/0)
-#define SLIST_REMOVE(head, elm, type, field) do { \
+#define HEIM_SLIST_REMOVE(head, elm, type, field) do { \
if ((head)->slh_first == (elm)) { \
- SLIST_REMOVE_HEAD((head), field); \
+ HEIM_SLIST_REMOVE_HEAD((head), field); \
} \
else { \
struct type *curelm = (head)->slh_first; \
@@ -86,16 +84,14 @@ struct { \
} \
} while (/*CONSTCOND*/0)
-#define SLIST_FOREACH(var, head, field) \
+#define HEIM_SLIST_FOREACH(var, head, field) \
for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
/*
* Singly-linked List access methods.
*/
-#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
-#define SLIST_FIRST(head) ((head)->slh_first)
-#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
-
-#endif /* SLIST_HEAD */
+#define HEIM_SLIST_EMPTY(head) ((head)->slh_first == NULL)
+#define HEIM_SLIST_FIRST(head) ((head)->slh_first)
+#define HEIM_SLIST_NEXT(elm, field) ((elm)->field.sle_next)
#endif /* !_MECHQUEUE_H_ */