]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 8 Jan 2009 21:12:46 +0000 (21:12 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 8 Jan 2009 21:12:46 +0000 (21:12 +0000)
(fts_ufslinks): Fix using wrong structure member in Cygwin-specific
code.

winsup/cygwin/ChangeLog
winsup/cygwin/libc/fts.c

index 6753d2a0e5ae37c36859c5c1b1349824d9cbf9c0..46eddfacf0173a277187d1b36eea320f89002de3 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-08  Corinna Vinschen  <corinna@vinschen.de>
+
+       * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
+       (fts_ufslinks): Fix using wrong structure member in Cygwin-specific
+       code.
+
 2009-01-07  Corinna Vinschen  <corinna@vinschen.de>
 
        * ntdll.h: Reorder NT status flags.  Fix a case difference. Add
index d0e77892da2590ebbdabafc94e7e132bb1f5d540..c49d1e5fa33e84eec3fe9cf1ed0ca9c8718fd7d9 100644 (file)
@@ -823,7 +823,7 @@ mem1:                               saved_errno = errno;
                                p->fts_info = FTS_NSOK;
                        p->fts_accpath = cur->fts_accpath;
                } else if (nlinks == 0
-#if defined(DT_DIR) && !defined(__CYGWIN__)
+#if defined(DT_DIR)
                    || (nostat &&
                    dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
 #endif
@@ -1232,9 +1232,10 @@ fts_ufslinks(FTS *sp, const FTSENT *ent)
 #ifdef __CYGWIN__
                        /* The link count is reliable in Cygwin's directory
                           stat structures, unless the link count is 1.
-                          This indicates a remote filesystem on which Cygwin
+                          This indicates a filesystem on which Cygwin
                           refuses to count the directory links for speed. */
-                       priv->ftsp_linksreliable = (ent->fts_dev == 1) ? 0 : 1;
+                       priv->ftsp_linksreliable = (ent->fts_nlink == 1)
+                                                  ? 0 : 1;
 #else
                        priv->ftsp_linksreliable = 0;
                        for (cpp = ufslike_filesystems; *cpp; cpp++) {
This page took 0.034305 seconds and 5 git commands to generate.