]> andersk Git - gssapi-openssh.git/blobdiff - openssh/openbsd-compat/fake-queue.h
Import of OpenSSH 3.1p1
[gssapi-openssh.git] / openssh / openbsd-compat / fake-queue.h
index 269af413c35195fc99ffe69d89148212a5ac632d..c85bb240c53dcfa1b8feb22373354b2d101d3265 100644 (file)
@@ -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.
  */
This page took 0.069624 seconds and 4 git commands to generate.