Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/mtree Ugg...Turn LIST_FOREACH into a while loop aro...
details: https://anonhg.NetBSD.org/src/rev/03505a613829
branches: trunk
changeset: 517364:03505a613829
user: jmc <jmc%NetBSD.org@localhost>
date: Sun Nov 11 05:07:20 2001 +0000
description:
Ugg...Turn LIST_FOREACH into a while loop around LIST_NEXT...
The *_FOREACH macros got added post 1.5 and were pulled up into 1.5.2. This
makes it impossible to compile mtree local on a 1.5-release box as a cross
toolchain bit for bootstrapping to -current. (and why I never saw this problem
on my 1.5.2 machine)
This whole thing is solved via a compat lib for the tools for all netbsd bits
and/or trimming down a version of mtree to just the bits needed for building
the snapshots.
diffstat:
usr.sbin/mtree/excludes.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 1a7a376bdad7 -r 03505a613829 usr.sbin/mtree/excludes.c
--- a/usr.sbin/mtree/excludes.c Sun Nov 11 01:40:29 2001 +0000
+++ b/usr.sbin/mtree/excludes.c Sun Nov 11 05:07:20 2001 +0000
@@ -101,11 +101,13 @@
/* fnmatch(3) has a funny return value convention... */
#define MATCH(g, n) (fnmatch((g), (n), FNM_PATHNAME) == 0)
- LIST_FOREACH(e, &excludes, link) {
+ e = LIST_FIRST(&excludes);
+ while (e) {
if ((e->pathname && MATCH(e->glob, path))
|| MATCH(e->glob, fname)) {
return (1);
}
+ e = LIST_NEXT(e, link);
}
return (0);
}
Home |
Main Index |
Thread Index |
Old Index