Enable GLOB_ONLYDIR of the bundled glob() on platforms that support it
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Jun 2011 05:37:41 +0000 (08:37 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Jun 2011 05:37:41 +0000 (08:37 +0300)
configure.ac
misc/glob.c

index 64c5509..9e5d112 100644 (file)
@@ -340,7 +340,7 @@ AM_GNU_GETTEXT([external])
 dnl Checks for header files we can live without.
 AC_HEADER_STDC
 AC_HEADER_MAJOR
-AC_HEADER_DIRENT
+AC_STRUCT_DIRENT_D_TYPE
 
 AC_CHECK_HEADERS(limits.h)
 AC_CHECK_HEADERS(fcntl.h getopt.h)
index bf2dcb6..3bebe9e 100644 (file)
@@ -1056,7 +1056,7 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
                  if (! REAL_DIR_ENTRY (d))
                    continue;
 
-#ifdef HAVE_D_TYPE
+#ifdef HAVE_STRUCT_DIRENT_D_TYPE
                  /* If we shall match only directories use the information
                     provided by the dirent call if possible.  */
                  if ((flags & GLOB_ONLYDIR)