From owner-freebsd-hackers Mon May 11 15:23:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA04529 for freebsd-hackers-outgoing; Mon, 11 May 1998 15:23:07 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from iq.org (proff@polysynaptic.iq.org [203.4.184.222]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id PAA04414 for ; Mon, 11 May 1998 15:22:45 -0700 (PDT) (envelope-from proff@iq.org) Received: (qmail 2858 invoked by uid 110); 11 May 1998 22:22:31 -0000 Date: 11 May 1998 22:22:31 -0000 Message-ID: <19980511222231.2857.qmail@iq.org> From: Julian Assange To: gibbs@FreeBSD.ORG cc: hackers@FreeBSD.ORG cc: dyson@FreeBSD.ORG cc: mrg@eterna.com.au Subject: more queue.h brokenness Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I notice someone (gibbs?) has updated sys/queue.h Unfortunately, because of the manner in which tqe_prev, and tqh_last are calculated, TAILQ_LAST and TAILQ_PREV need to be redefined like so: #define TAILQ_LAST(head) ((*((head)->tqh_last))? (*((head)->tqh_last)): TAILQ_FIRST(head)) #define TAILQ_PREV(head, elm, field) (((elm) == TAILQ_FIRST(head))?NULL: *((elm)->field.tqe_prev)) this is a hack-like solution; the alternative is to do away with the double indirection of tqh_last and tqe_prev, which would be annoying. the other queue.h types (where defined) also have this problem. TAILQ_PREV is only used in vm/vm_object.c, which, presumably, is why no-one has noticed the problem before (and why I've cc'd dyson). Cheers, Julian. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message