pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat Provide TAILQ_FOREACH_SAFE if it ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f3afa184ae0
branches:  trunk
changeset: 555237:4f3afa184ae0
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Feb 26 16:14:18 2009 +0000

description:
Provide TAILQ_FOREACH_SAFE if it is missing.

diffstat:

 pkgtools/libnbcompat/Makefile               |  4 ++--
 pkgtools/libnbcompat/files/nbcompat/queue.h |  9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r 162e7ba600c5 -r 4f3afa184ae0 pkgtools/libnbcompat/Makefile
--- a/pkgtools/libnbcompat/Makefile     Thu Feb 26 16:10:29 2009 +0000
+++ b/pkgtools/libnbcompat/Makefile     Thu Feb 26 16:14:18 2009 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.67 2008/10/29 11:23:17 joerg Exp $
+# $NetBSD: Makefile,v 1.68 2009/02/26 16:14:18 joerg Exp $
 #
 # NOTE: If you update this package, it is *mandatory* that you update
 #      pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
 #      list of tested and supported platforms.
 #
 
-DISTNAME=              libnbcompat-20081029
+DISTNAME=              libnbcompat-20090226
 CATEGORIES=            pkgtools devel
 MASTER_SITES=          # empty
 DISTFILES=             # empty
diff -r 162e7ba600c5 -r 4f3afa184ae0 pkgtools/libnbcompat/files/nbcompat/queue.h
--- a/pkgtools/libnbcompat/files/nbcompat/queue.h       Thu Feb 26 16:10:29 2009 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/queue.h       Thu Feb 26 16:14:18 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: queue.h,v 1.6 2008/11/06 00:25:42 joerg Exp $  */
+/*     $NetBSD: queue.h,v 1.7 2009/02/26 16:14:18 joerg Exp $  */
 
 /*
  * Copyright (c) 1991, 1993
@@ -299,6 +299,13 @@
                (var) = ((var)->field.tqe_next))
 #endif
 
+#ifndef TAILQ_FOREACH_SAFE
+#define        TAILQ_FOREACH_SAFE(var, head, field, next)                      \
+       for ((var) = ((head)->tqh_first);                               \
+               (var) != NULL && ((next) = TAILQ_NEXT(var, field), 1);  \
+               (var) = (next))
+#endif
+
 #ifndef TAILQ_FOREACH_REVERSE
 #define        TAILQ_FOREACH_REVERSE(var, head, headname, field)               \
        for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));    \



Home | Main Index | Thread Index | Old Index