summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-12-13 17:16:32 +0000
committerKarl Berry <karl@freefriends.org>2008-12-13 17:16:32 +0000
commit835a7fedd0e16750e278f59887521123bb9163f4 (patch)
tree6ff6ecc3769e6090fc735f7ba8c8168b63fd8d85 /Build
parent2960fb3a5767258bbea70848c41e31f3e2d15d4d (diff)
only do the st_nlink trick if the link count is exactly; tlbuild from Ken Brown, 12 Dec 2008 13:42:19
git-svn-id: svn://tug.org/texlive/trunk@11605 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog9
-rw-r--r--Build/source/texk/kpathsea/elt-dirs.c15
-rw-r--r--Build/source/texk/kpathsea/kpathsea.texi4
3 files changed, 18 insertions, 10 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 5fa11ed1c7e..b965ce72b28 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-13 Karl Berry <karl@tug.org>
+
+ * elt-dirs.c (do_subdir): only do the st_nlink trick if st_nlink
+ is exactly 2; Cygwin sets st_nlink to 1 now. Remove special case
+ for the Amiga.
+ * kpathsea.texi (Subdirectory expansion): correct preprocessor
+ name to ST_NLINK_TRIC.
+ Report from Ken Brown, tlbuild mail 12 Dec 2008 13:42:19.
+
2008-11-10 Karl Berry <karl@tug.org>
* kpsewhich.c (USAGE): mention need for -engine when looking up
diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c
index 820ccce87f2..9c223b37845 100644
--- a/Build/source/texk/kpathsea/elt-dirs.c
+++ b/Build/source/texk/kpathsea/elt-dirs.c
@@ -280,14 +280,13 @@ do_subdir P4C(str_llist_type *, str_list_ptr, const_string, elt,
some such, we can still find subdirectories, even if it
is much slower. */
#ifdef ST_NLINK_TRICK
-#ifdef AMIGA
- /* With SAS/C++ 6.55 on the Amiga, `stat' sets the `st_nlink'
- field to -1 for a file, or to 1 for a directory. */
- if (links == 1)
-#else
- if (links > 2)
-#endif /* not AMIGA */
-#endif /* not ST_NLINK_TRICK */
+ /* With SAS/C++ 6.55 on the Amiga, stat sets the st_nlink
+ field to -1 for a file, or to 1 for a directory.
+ Cygwin 1.7 also leaves st_nlink as 1:
+ http://cygwin.com/ml/cygwin-developers/2008-04/msg00110.html
+ */
+ if (links != 2)
+#endif /* ST_NLINK_TRICK */
/* All criteria are met; find subdirectories. */
do_subdir (str_list_ptr, FN_STRING (name),
potential_len, post);
diff --git a/Build/source/texk/kpathsea/kpathsea.texi b/Build/source/texk/kpathsea/kpathsea.texi
index 9275ff219d2..c7c550a9b7c 100644
--- a/Build/source/texk/kpathsea/kpathsea.texi
+++ b/Build/source/texk/kpathsea/kpathsea.texi
@@ -814,8 +814,8 @@ But if you have a directory that contains a single subdirectory and 500
regular files, @code{st_nlink} will be 3, and Kpathsea has to stat every
one of those 501 entries. Therein lies slowness.
-@vindex UNIX_ST_LINK
-You can disable the trick by undefining @code{UNIX_ST_LINK} in
+@vindex ST_NLINK_TRICK
+You can disable the trick by undefining @code{ST_NLINK_TRICK} in
@file{kpathsea/config.h}. (It is undefined by default except under Unix.)
@flindex elt-dirs.c