changeset 11169:cc4b6d391fce

fts: add #if guards so that the fts_lgpl module still builds * lib/fts.c: Guard just-added hash-table-using parts with Reported by Simon Josefsson.
author Jim Meyering <meyering@redhat.com>
date Mon, 16 Feb 2009 15:49:08 +0100
parents 8efaede722cf
children 2d75ece3de5b
files ChangeLog lib/fts.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-16  Jim Meyering  <meyering@redhat.com>
+
+	fts: add #if guards so that the fts_lgpl module still builds
+	* lib/fts.c: Guard just-added hash-table-using parts with
+	#if GNULIB_FTS, so as not to break builds of the fts_lgpl module.
+	Reported by Simon Josefsson.
+
 2009-02-15  Bruno Haible  <bruno@clisp.org>
 
 	* modules/array-mergesort-tests: New file.
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -618,8 +618,10 @@
 
 	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,6 +719,7 @@
 static bool leaf_optimization_applies (int dir_fd) { 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
@@ -798,6 +801,7 @@
 
   return opt_ok;
 }
+#endif
 
 /*
  * Special case of "/" at the end of the file name so that slashes aren't