diff options
author | joerg <joerg@pkgsrc.org> | 2009-02-26 16:14:18 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-02-26 16:14:18 +0000 |
commit | f01efe1be702f90e8e9961fcaed70c8442bb2b7d (patch) | |
tree | 1f66b0640b752c75b3bf073ff394fc89a1476aca /pkgtools | |
parent | 1037fc9895e307e06e1fe74cdbb899172a2488f2 (diff) | |
download | pkgsrc-f01efe1be702f90e8e9961fcaed70c8442bb2b7d.tar.gz |
Provide TAILQ_FOREACH_SAFE if it is missing.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/libnbcompat/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat/queue.h | 9 |
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)); \ |