summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-09-19 23:33:18 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-09-19 23:33:18 +0000
commit9daa51cc0a9ade45bb7b116b9aecbea0487074a6 (patch)
tree49870e7bd2c83eb2790bca12b2beab29fc8adf46 /Build
parentd14af0460bc03d1c741ddb6f01a14e8428a47664 (diff)
kpathsea/db.c: fix for DOSISH systems where _WIN32 is not defined
git-svn-id: svn://tug.org/texlive/trunk@45349 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog4
-rw-r--r--Build/source/texk/kpathsea/db.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 38df80eef04..d4cd2d5dbed 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,7 @@
+2017-09-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * db.c: Fix for DOSISH systems in which _WIN32 is not defined.
+
2017-05-03 Karl Berry <karl@tug.org>
* texmf.cnf (TEXMFAUXTREES): new variable (default value empty
diff --git a/Build/source/texk/kpathsea/db.c b/Build/source/texk/kpathsea/db.c
index 8a3cf08797b..2a4fff06208 100644
--- a/Build/source/texk/kpathsea/db.c
+++ b/Build/source/texk/kpathsea/db.c
@@ -93,9 +93,9 @@ db_build (kpathsea kpse, hash_table_type *table, const_string db_filename)
string top_dir = (string)xmalloc (len + 1);
string cur_dir = NULL; /* First thing in ls-R might be a filename. */
FILE *db_file = fopen (db_filename, FOPEN_R_MODE);
-#if defined(WIN32)
+#if defined(MONOCASE_FILENAMES)
string pp;
-#endif
+#endif /* MONOCASE_FILENAMES */
strncpy (top_dir, db_filename, len);
top_dir[len] = 0;
@@ -104,14 +104,16 @@ db_build (kpathsea kpse, hash_table_type *table, const_string db_filename)
while ((line = read_line (db_file)) != NULL) {
len = strlen (line);
-#if defined(WIN32)
+#if defined(MONOCASE_FILENAMES)
for (pp = line; *pp; pp++) {
+#if defined(_WIN32)
if (kpathsea_IS_KANJI(kpse, pp))
pp++;
else
+#endif /* _WIN32 */
*pp = TRANSFORM(*pp);
}
-#endif
+#endif /* MONOCASE_FILENAMES */
/* A line like `/foo:' = new dir foo. Allow both absolute (/...)
and explicitly relative (./...) names here. It's a kludge to