summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjoerg <joerg>2009-02-26 16:14:18 +0000
committerjoerg <joerg>2009-02-26 16:14:18 +0000
commita5a0ceb06b8cf6e5331248869079fbb060d6f6dd (patch)
tree1f66b0640b752c75b3bf073ff394fc89a1476aca /pkgtools
parent925a7fd6a3772c777a3d0404ec8d7eb2094e83db (diff)
downloadpkgsrc-a5a0ceb06b8cf6e5331248869079fbb060d6f6dd.tar.gz
Provide TAILQ_FOREACH_SAFE if it is missing.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/libnbcompat/Makefile4
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/queue.h9
2 files changed, 10 insertions, 3 deletions
diff --git a/pkgtools/libnbcompat/Makefile b/pkgtools/libnbcompat/Makefile
index 5d66a6a6fc3..37cf49c908c 100644
--- a/pkgtools/libnbcompat/Makefile
+++ b/pkgtools/libnbcompat/Makefile
@@ -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 --git a/pkgtools/libnbcompat/files/nbcompat/queue.h b/pkgtools/libnbcompat/files/nbcompat/queue.h
index ed400d81a95..9042d2cb801 100644
--- a/pkgtools/libnbcompat/files/nbcompat/queue.h
+++ b/pkgtools/libnbcompat/files/nbcompat/queue.h
@@ -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 @@ struct { \
(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)); \