#include "xstrtol.h"
#include "xstrtol-error.h"
-extern bool fts_debug;
-
/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "du"
proper_name ("Paul Eggert"), \
proper_name ("Jim Meyering")
-#if DU_DEBUG
-# define FTS_CROSS_CHECK(Fts) fts_cross_check (Fts)
-#else
-# define FTS_CROSS_CHECK(Fts)
-#endif
-
/* A set of dev/ino pairs to help identify files and directories
whose sizes have already been counted. */
static struct di_set *di_files;
EXCLUDE_OPTION,
FILES0_FROM_OPTION,
HUMAN_SI_OPTION,
+#if GNULIB_FTS_DEBUG
FTS_DEBUG,
+#endif
TIME_OPTION,
TIME_STYLE_OPTION,
INODES_OPTION
{"block-size", required_argument, nullptr, 'B'},
{"bytes", no_argument, nullptr, 'b'},
{"count-links", no_argument, nullptr, 'l'},
- /* {"-debug", no_argument, nullptr, FTS_DEBUG}, */
+#if GNULIB_FTS_DEBUG
+ {"-debug", no_argument, nullptr, FTS_DEBUG},
+#endif
{"dereference", no_argument, nullptr, 'L'},
{"dereference-args", no_argument, nullptr, 'D'},
{"exclude", required_argument, nullptr, EXCLUDE_OPTION},
prev_level = 0;
break;
}
- FTS_CROSS_CHECK (fts);
+
+#if GNULIB_FTS_DEBUG
+ if (fts_debug)
+ fts_cross_check (fts);
+#endif
ok &= process_file (fts, ent);
}
switch (c)
{
-#if DU_DEBUG
+#if GNULIB_FTS_DEBUG
case FTS_DEBUG:
fts_debug = true;
break;