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.
This commit is contained in:
jmc 2001-11-11 05:07:20 +00:00
parent db0f7ea415
commit adf8bd3435

View File

@ -101,11 +101,13 @@ check_excludes(const char *fname, const char *path)
/* 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);
}