+
+int
+ftw(const char *path, int (*fn)(const char *, const struct stat *, int),
+ int nfds)
+{
+ /* The legacy implmentation didn't follow symlinks, but Unix03
+ does - this was likely a bug in the legacy implemtation; JKH
+ thinks we ought change the legacy behaviour, and I agree; anyone
+ who doesn't should replace FTW_PHYS with
+ __DARWIN_UNIX03 ? 0 : FTW_PHYS */
+ return both_ftw(path, fn, NULL, nfds, FTW_PHYS);
+}
+
+int
+nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
+ struct FTW *), int nfds, int ftwflags)
+{
+ return both_ftw(path, NULL, fn, nfds, ftwflags);
+}