X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/d17c8fc2b09292b1331578bddeb0c36f45460b85..e9a17296ccbb7bb4f9a0affffe58d2240768a7d4:/openssh/openbsd-compat/fake-queue.h diff --git a/openssh/openbsd-compat/fake-queue.h b/openssh/openbsd-compat/fake-queue.h index 269af41..c85bb24 100644 --- a/openssh/openbsd-compat/fake-queue.h +++ b/openssh/openbsd-compat/fake-queue.h @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.h,v 1.16 2000/09/07 19:47:59 art Exp $ */ +/* $OpenBSD: queue.h,v 1.22 2001/06/23 04:39:35 angelos Exp $ */ /* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ /* @@ -136,6 +136,19 @@ struct { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (0) +#define SLIST_REMOVE(head, elm, type, field) do { \ + if ((head)->slh_first == (elm)) { \ + SLIST_REMOVE_HEAD((head), field); \ + } \ + else { \ + struct type *curelm = (head)->slh_first; \ + while( curelm->field.sle_next != (elm) ) \ + curelm = curelm->field.sle_next; \ + curelm->field.sle_next = \ + curelm->field.sle_next->field.sle_next; \ + } \ +} while (0) + /* * List definitions. */