]> Savannah Git Hosting - gnulib.git/commitdiff
glob: fix typo that broke platforms lacking d_ino
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Aug 2017 07:46:49 +0000 (00:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Aug 2017 07:47:57 +0000 (00:47 -0700)
This typo also hurt performance on GNU/Linux and similar hosts.
* lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
in previous change.

ChangeLog
lib/glob.c

index 4dddaae0b7cf8436ca4c8beb811cc87f2ff954df..6568ff01549eef083330bdd9229b7b1951127cfb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-08-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       glob: fix typo that broke platforms lacking d_ino
+       This typo also hurt performance on GNU/Linux and similar hosts.
+       * lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
+       in previous change.
+
 2017-08-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        glob: merge from glibc with Zanella glob changes
index a4aa3d8702f373580ff665531abc13675cc4a4b2..5a4e884be5065ebccc61b96669bfa631ba96e209 100644 (file)
@@ -141,12 +141,12 @@ readdir_result_might_be_dir (struct readdir_result d)
 
 #endif /* defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE */
 
-#if defined _LIBC || defined D_INO_IN_DIRENT
 /* Initializer for skip_entry.  POSIX does not require that the d_ino
    field be present, and some systems do not provide it. */
-# define D_INO_TO_RESULT(source) false,
-#else
+#if defined _LIBC || defined D_INO_IN_DIRENT
 # define D_INO_TO_RESULT(source) (source)->d_ino == 0,
+#else
+# define D_INO_TO_RESULT(source) false,
 #endif
 
 /* Construct an initializer for a struct readdir_result object from a