I installed this into gnulib: 2006-07-03 Jim Meyering <[EMAIL PROTECTED]>
* cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this macro is used before the first cycle_check call. --- lib/cycle-check.h 3 Jul 2006 08:32:46 -0000 1.3 +++ lib/cycle-check.h 4 Jul 2006 05:58:07 -0000 @@ -45,6 +45,9 @@ bool cycle_check (struct cycle_check_sta # define CYCLE_CHECK_REFLECT_CHDIR_UP(State, SB_dir, SB_subdir) \ do \ { \ + /* You must call cycle_check at least once before using this macro. */ \ + if ((State)->chdir_counter == 0) \ + abort (); \ if (SAME_INODE ((State)->dev_ino, SB_subdir)) \ { \ (State)->dev_ino.st_dev = (SB_dir).st_dev; \