From 8db10f90bc1848cd8050dfe0df9cc40671225d39 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Tue, 22 Nov 2016 22:44:31 +0100 Subject: main/libc-dev: Update sys/queue.h from NetBSD sources and bump ver. Apply recent changes done by Christos Zoulas . http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/queue.h?rev=1.70 * Revision 1.69, Mon Nov 2 14:49:07 2015 UTC by christos: Use existing macros to implement TAILQ_FOREACH_REVERSE, like TAILQ_FOREACH_REVERSE_SAFE does. * Revision 1.70, Mon Nov 2 15:21:23 2015 UTC by christos: Add missing paren. --- main/libc-dev/sys-queue.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main/libc-dev/sys-queue.h') diff --git a/main/libc-dev/sys-queue.h b/main/libc-dev/sys-queue.h index 99d01a55b1..a38499a267 100644 --- a/main/libc-dev/sys-queue.h +++ b/main/libc-dev/sys-queue.h @@ -1,4 +1,4 @@ -/* $NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $ */ +/* $NetBSD: queue.h,v 1.70 2015/11/02 15:21:23 christos Exp $ */ /* * Copyright (c) 1991, 1993 @@ -421,9 +421,9 @@ struct { \ #define TAILQ_END(head) (NULL) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) + (*(((struct headname *)(void *)((head)->tqh_last))->tqh_last)) #define TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) + (*(((struct headname *)(void *)((elm)->field.tqe_prev))->tqh_last)) #define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head)) @@ -438,9 +438,9 @@ struct { \ ((next) = TAILQ_NEXT(var, field), 1); (var) = (next)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\ + for ((var) = TAILQ_LAST((head), headname); \ (var) != TAILQ_END(head); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + (var) = TAILQ_PREV((var), headname, field)) #define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \ for ((var) = TAILQ_LAST((head), headname); \ -- cgit v1.2.3