Remove vestiges of fts-lgpl module.
authorBruno Haible <bruno@clisp.org>
Mon, 29 Mar 2010 08:41:20 +0000 (10:41 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 29 Mar 2010 08:41:20 +0000 (10:41 +0200)
ChangeLog
lib/fts.c
lib/fts_.h
modules/fts

index baec7e7..b863db0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-03-29  Bruno Haible  <bruno@clisp.org>
+
+       Remove vestiges of fts-lgpl module.
+       * lib/fts_.h: Assume GNULIB_FTS is 1.
+       * lib/fts.c: Likewise.
+       * modules/fts (configure.ac): Remove gl_MODULE_INDICATOR invocation.
+
 2010-03-28  Bruno Haible  <bruno@clisp.org>
 
        Fix definition of tests witness macro.
index 374c58a..e4351f8 100644 (file)
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -205,14 +205,7 @@ static unsigned short int fts_stat (FTS *, FTSENT *, bool) internal_function;
 static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *)
      internal_function;
 
-#if GNULIB_FTS
-# include "fts-cycle.c"
-#else
-static bool enter_dir (FTS *fts, FTSENT *ent) { return true; }
-static void leave_dir (FTS *fts, FTSENT *ent) {}
-static bool setup_dir (FTS *fts) { return true; }
-static void free_dir (FTS *fts) {}
-#endif
+#include "fts-cycle.c"
 
 #ifndef MAX
 # define MAX(a,b) ((a) > (b) ? (a) : (b))
@@ -614,10 +607,8 @@ fts_close (FTS *sp)
 
         fd_ring_clear (&sp->fts_fd_ring);
 
-#if GNULIB_FTS
         if (sp->fts_leaf_optimization_works_ht)
           hash_free (sp->fts_leaf_optimization_works_ht);
-#endif
 
         free_dir (sp);
 
@@ -717,7 +708,6 @@ static bool
 leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; }
 #endif
 
-#if GNULIB_FTS
 /* link-count-optimization entry:
    map an stat.st_dev number to a boolean: leaf_optimization_works */
 struct LCO_ent
@@ -799,7 +789,6 @@ link_count_optimize_ok (FTSENT const *p)
 
   return opt_ok;
 }
-#endif
 
 /*
  * Special case of "/" at the end of the file name so that slashes aren't
@@ -1731,27 +1720,6 @@ err:            memset(sbp, 0, sizeof(struct stat));
                         return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT);
                 }
 
-#if !GNULIB_FTS
-                {
-                  /*
-                   * Cycle detection is done by brute force when the directory
-                   * is first encountered.  If the tree gets deep enough or the
-                   * number of symbolic links to directories is high enough,
-                   * something faster might be worthwhile.
-                   */
-                  FTSENT *t;
-
-                  for (t = p->fts_parent;
-                       t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
-                    if (sbp->st_ino == t->fts_statp->st_ino
-                        && sbp->st_dev == t->fts_statp->st_dev)
-                      {
-                        p->fts_cycle = t;
-                        return (FTS_DC);
-                      }
-                }
-#endif
-
                 return (FTS_D);
         }
         if (S_ISLNK(sbp->st_mode))
index e1a8196..75324d4 100644 (file)
@@ -143,7 +143,6 @@ typedef struct {
 # define FTS_STOP       0x2000          /* (private) unrecoverable error */
         int fts_options;                /* fts_open options, global flags */
 
-# if GNULIB_FTS
         /* Map a directory's device number to a boolean.  The boolean is
            true if for that file system (type determined by a single fstatfs
            call per FS) st_nlink can be used to calculate the number of
@@ -175,7 +174,6 @@ typedef struct {
                 struct cycle_check_state *state;
         } fts_cycle;
 
-# endif
         /* A stack of the file descriptors corresponding to the
            most-recently traversed parent directories.
            Currently used only in FTS_CWDFD mode.  */
index 9509557..ba8cd57 100644 (file)
@@ -27,7 +27,6 @@ unistd-safer
 
 configure.ac:
 gl_FUNC_FTS
-gl_MODULE_INDICATOR([fts])
 
 Makefile.am: