]> git.sur5r.net Git - openldap/blobdiff - include/queue-compat.h
added hasSubordinates to back-monitor
[openldap] / include / queue-compat.h
index e1915d862dc1b2b3a9d20dd768bdc1ff105ca05b..4a771c5a3e758924b7abc0d4abbaee303c0fc897 100644 (file)
@@ -9,6 +9,7 @@
  * top-level directory of the distribution.
  */
 /* stolen from FreeBSD for use in OpenLDAP */
+/* $OpenLDAP$ */
 /*
  * Copyright (c) 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -48,8 +49,6 @@
 #ifndef _SYS_QUEUE_H_
 #define        _SYS_QUEUE_H_
 
-#define __offsetof     offsetof
-
 /*
  * This file defines five types of data structures: singly-linked lists,
  * singly-linked tail queues, lists, tail queues, and circular queues.
  * _REMOVE             +       +       +       +       +
  *
  */
+/*
+ * see queue(3) for instructions on how to use
+ */
+
+/* The latest set of Windows headers defines SLIST_ENTRY in WINNT.H */
+#ifdef SLIST_ENTRY
+#undef SLIST_ENTRY
+#endif
 
 /*
  * Singly-linked List definitions.
@@ -212,7 +219,7 @@ struct {                                                            \
        (STAILQ_EMPTY(head) ?                                           \
                NULL :                                                  \
                ((struct type *)                                        \
-               ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
+               ((char *)((head)->stqh_last) - offsetof(struct type, field))))
 
 #define STAILQ_FOREACH(var, head, field)                               \
        for((var) = (head)->stqh_first; (var); (var) = (var)->field.stqe_next)