]> git.sur5r.net Git - openldap/commitdiff
use offsetof directly
authorKurt Zeilenga <kurt@openldap.org>
Sun, 9 Dec 2001 19:27:05 +0000 (19:27 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 9 Dec 2001 19:27:05 +0000 (19:27 +0000)
include/queue-compat.h

index e1915d862dc1b2b3a9d20dd768bdc1ff105ca05b..41e06e462a5fc2a3b8a468a1a42ea26323ae26ed 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
+ */
 
 /*
  * Singly-linked List definitions.
@@ -212,7 +214,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)