Module Name: src Committed By: christos Date: Tue Nov 26 01:31:43 UTC 2013
Modified Files: src/external/bsd/openldap/dist/include: ldap_queue.h Log Message: Kill CIRCLEQ, nothing uses it and it will not work with gcc-4.8, so avoid future accidents. To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/bsd/openldap/dist/include/ldap_queue.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/openldap/dist/include/ldap_queue.h diff -u src/external/bsd/openldap/dist/include/ldap_queue.h:1.1.1.3 src/external/bsd/openldap/dist/include/ldap_queue.h:1.2 --- src/external/bsd/openldap/dist/include/ldap_queue.h:1.1.1.3 Sun Dec 12 10:21:24 2010 +++ src/external/bsd/openldap/dist/include/ldap_queue.h Mon Nov 25 20:31:43 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ldap_queue.h,v 1.1.1.3 2010/12/12 15:21:24 adam Exp $ */ +/* $NetBSD: ldap_queue.h,v 1.2 2013/11/26 01:31:43 christos Exp $ */ /* ldap_queue.h -- queue macros */ /* OpenLDAP: pkg/ldap/include/ldap_queue.h,v 1.13.2.5 2010/04/13 20:22:48 kurt Exp */ @@ -109,24 +109,24 @@ * For details on the use of these macros, see the queue(3) manual page. * All macros are prefixed with LDAP_. * - * SLIST_ LIST_ STAILQ_ TAILQ_ CIRCLEQ_ - * _HEAD + + + + + - * _ENTRY + + + + + - * _INIT + + + + + - * _ENTRY_INIT + + + + + - * _EMPTY + + + + + - * _FIRST + + + + + - * _NEXT + + + + + - * _PREV - - - + + - * _LAST - - + + + - * _FOREACH + + + + + - * _FOREACH_REVERSE - - - + + - * _INSERT_HEAD + + + + + - * _INSERT_BEFORE - + - + + - * _INSERT_AFTER + + + + + - * _INSERT_TAIL - - + + + - * _REMOVE_HEAD + - + - - - * _REMOVE + + + + + + * SLIST_ LIST_ STAILQ_ TAILQ_ + * _HEAD + + + + + * _ENTRY + + + + + * _INIT + + + + + * _ENTRY_INIT + + + + + * _EMPTY + + + + + * _FIRST + + + + + * _NEXT + + + + + * _PREV - - - + + * _LAST - - + + + * _FOREACH + + + + + * _FOREACH_REVERSE - - - + + * _INSERT_HEAD + + + + + * _INSERT_BEFORE - + - + + * _INSERT_AFTER + + + + + * _INSERT_TAIL - - + + + * _REMOVE_HEAD + - + - + * _REMOVE + + + + * */ @@ -460,105 +460,4 @@ struct { \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } while (0) -/* - * Circular queue definitions. - */ -#define LDAP_CIRCLEQ_HEAD(name, type) \ -struct name { \ - struct type *cqh_first; /* first element */ \ - struct type *cqh_last; /* last element */ \ -} - -#define LDAP_CIRCLEQ_ENTRY(type) \ -struct { \ - struct type *cqe_next; /* next element */ \ - struct type *cqe_prev; /* previous element */ \ -} - -/* - * Circular queue functions. - */ -#define LDAP_CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) - -#define LDAP_CIRCLEQ_FIRST(head) ((head)->cqh_first) - -#define LDAP_CIRCLEQ_FOREACH(var, head, field) \ - for((var) = (head)->cqh_first; \ - (var) != (void *)(head); \ - (var) = (var)->field.cqe_next) - -#define LDAP_CIRCLEQ_FOREACH_REVERSE(var, head, field) \ - for((var) = (head)->cqh_last; \ - (var) != (void *)(head); \ - (var) = (var)->field.cqe_prev) - -#define LDAP_CIRCLEQ_INIT(head) do { \ - (head)->cqh_first = (void *)(head); \ - (head)->cqh_last = (void *)(head); \ -} while (0) - -#define LDAP_CIRCLEQ_ENTRY_INIT(var, field) do { \ - (var)->field.cqe_next = NULL; \ - (var)->field.cqe_prev = NULL; \ -} while (0) - -#define LDAP_CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm)->field.cqe_next; \ - (elm)->field.cqe_prev = (listelm); \ - if ((listelm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (listelm)->field.cqe_next->field.cqe_prev = (elm); \ - (listelm)->field.cqe_next = (elm); \ -} while (0) - -#define LDAP_CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm); \ - (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ - if ((listelm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (listelm)->field.cqe_prev->field.cqe_next = (elm); \ - (listelm)->field.cqe_prev = (elm); \ -} while (0) - -#define LDAP_CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.cqe_next = (head)->cqh_first; \ - (elm)->field.cqe_prev = (void *)(head); \ - if ((head)->cqh_last == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (head)->cqh_first->field.cqe_prev = (elm); \ - (head)->cqh_first = (elm); \ -} while (0) - -#define LDAP_CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.cqe_next = (void *)(head); \ - (elm)->field.cqe_prev = (head)->cqh_last; \ - if ((head)->cqh_first == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (head)->cqh_last->field.cqe_next = (elm); \ - (head)->cqh_last = (elm); \ -} while (0) - -#define LDAP_CIRCLEQ_LAST(head) ((head)->cqh_last) - -#define LDAP_CIRCLEQ_NEXT(elm,field) ((elm)->field.cqe_next) - -#define LDAP_CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev) - -#define LDAP_CIRCLEQ_REMOVE(head, elm, field) do { \ - if ((elm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm)->field.cqe_prev; \ - else \ - (elm)->field.cqe_next->field.cqe_prev = \ - (elm)->field.cqe_prev; \ - if ((elm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm)->field.cqe_next; \ - else \ - (elm)->field.cqe_prev->field.cqe_next = \ - (elm)->field.cqe_next; \ -} while (0) - #endif /* !_LDAP_QUEUE_H_ */