summary refs log tree commit diff
path: root/io/ftw.h
diff options
context:
space:
mode:
Diffstat (limited to 'io/ftw.h')
-rw-r--r--io/ftw.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/io/ftw.h b/io/ftw.h
index 4939297b34..03973ccbbf 100644
--- a/io/ftw.h
+++ b/io/ftw.h
@@ -74,7 +74,33 @@ enum
 # define FTW_CHDIR	FTW_CHDIR
   FTW_DEPTH = 8		/* Report files in directory before directory itself.*/
 # define FTW_DEPTH	FTW_DEPTH
+# ifdef __USE_GNU
+  ,
+  FTW_ACTIONRETVAL = 16	/* Assume callback to return FTW_* values instead of
+			   zero to continue and non-zero to terminate.  */
+#  define FTW_ACTIONRETVAL FTW_ACTIONRETVAL
+# endif
+};
+
+#ifdef __USE_GNU
+/* Return values from callback functions.  */
+enum
+{
+  FTW_CONTINUE = 0,	/* Continue with next sibling or for FTW_D with the
+			   first child.  */
+# define FTW_CONTINUE	FTW_CONTINUE
+  FTW_STOP = 1,		/* Return from `ftw' or `nftw' with FTW_STOP as return
+			   value.  */
+# define FTW_STOP	FTW_STOP
+  FTW_SKIP_SUBTREE = 2,	/* Only meaningful for FTW_D: Don't walk through the
+			   subtree, instead just continue with its next
+			   sibling. */
+# define FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE
+  FTW_SKIP_SIBLINGS = 3,/* Continue with FTW_DP callback for current directory
+			    (if FTW_DEPTH) and then its siblings.  */
+# define FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS
 };
+#endif
 
 /* Structure used for fourth argument to callback function for `nftw'.  */
 struct FTW