bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] glob: fix typo that broke platforms lacking d_ino


From: Paul Eggert
Subject: [PATCH] glob: fix typo that broke platforms lacking d_ino
Date: Thu, 24 Aug 2017 00:50:44 -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  | 7 +++++++
 lib/glob.c | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4dddaae..6568ff0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-08-24  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        glob: merge from glibc with Zanella glob changes
diff --git a/lib/glob.c b/lib/glob.c
index a4aa3d8..5a4e884 100644
--- a/lib/glob.c
+++ b/lib/glob.c
@@ -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
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]