From: Kurt Zeilenga Date: Sun, 9 Dec 2001 19:27:05 +0000 (+0000) Subject: use offsetof directly X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~680 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5b485c699c2ef20cd30aba65576e895ed48e7dfb;p=openldap use offsetof directly --- diff --git a/include/queue-compat.h b/include/queue-compat.h index e1915d862d..41e06e462a 100644 --- a/include/queue-compat.h +++ b/include/queue-compat.h @@ -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. @@ -119,6 +118,9 @@ * _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)