along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "cycle-check.h"
#include "hash.h"
static bool
setup_dir (FTS *fts)
{
- if (fts->fts_options & FTS_TIGHT_CYCLE_CHECK)
+ if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
{
enum { HT_INITIAL_SIZE = 31 };
fts->fts_cycle.ht = hash_initialize (HT_INITIAL_SIZE, NULL, AD_hash,
static bool
enter_dir (FTS *fts, FTSENT *ent)
{
- if (fts->fts_options & FTS_TIGHT_CYCLE_CHECK)
+ if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
{
struct stat const *st = ent->fts_statp;
struct Active_dir *ad = malloc (sizeof *ad);
static void
leave_dir (FTS *fts, FTSENT *ent)
{
- if (fts->fts_options & FTS_TIGHT_CYCLE_CHECK)
+ if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
{
struct stat const *st = ent->fts_statp;
struct Active_dir obj;
static void
free_dir (FTS *sp)
{
- if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK)
+ if (sp->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL))
{
if (sp->fts_cycle.ht)
hash_free (sp->fts_cycle.ht);