summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/win32
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-10-04 10:17:45 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-10-04 10:17:45 +0000
commitd9fb534f18ff3816d0d7152a10e56f5fcd3821f7 (patch)
tree1a4c53617f27b6e19665be707f7d1e126cba43e7 /Build/source/texk/kpathsea/win32
parent98e0dde44b1cc1668a98162cd1037770216bb41b (diff)
kpathsea/win32: Use stat in is_dir()
git-svn-id: svn://tug.org/texlive/trunk@27876 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/win32')
-rw-r--r--Build/source/texk/kpathsea/win32/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/win32/Makefile.am6
-rw-r--r--Build/source/texk/kpathsea/win32/Makefile.in5
-rw-r--r--Build/source/texk/kpathsea/win32/dirutil.c13
4 files changed, 13 insertions, 16 deletions
diff --git a/Build/source/texk/kpathsea/win32/ChangeLog b/Build/source/texk/kpathsea/win32/ChangeLog
index feac8b70271..235de44da59 100644
--- a/Build/source/texk/kpathsea/win32/ChangeLog
+++ b/Build/source/texk/kpathsea/win32/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dirutil.c: Use stat in int is_dir ().
+ * Makefile.am: Avoid use of deprecated INCLUDES.
+
2012-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Install texhash.exe as copy of mktexlsr.exe.
diff --git a/Build/source/texk/kpathsea/win32/Makefile.am b/Build/source/texk/kpathsea/win32/Makefile.am
index ddc8763fe19..4edf1d1a077 100644
--- a/Build/source/texk/kpathsea/win32/Makefile.am
+++ b/Build/source/texk/kpathsea/win32/Makefile.am
@@ -1,10 +1,10 @@
-## Makefile.am for the TeX Live subdirectory texk/dviljk/win32/
+## Makefile.am for the TeX Live subdirectory texk/kpathsea/win32/
##
## Copyright (C) 2011, 2012 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
-INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir)/..
-AM_CPPFLAGS = -DWEB2C_KPSE_VERSION='"Web2C-$(WEB2CVERSION) Kpathsea-$(KPSEVERSION)"'
+AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/..
+AM_CPPFLAGS += -DWEB2C_KPSE_VERSION='"Web2C-$(WEB2CVERSION) Kpathsea-$(KPSEVERSION)"'
AM_CFLAGS = $(WARNING_CFLAGS)
# Build WIN32 replacements for Unix shell scripts.
diff --git a/Build/source/texk/kpathsea/win32/Makefile.in b/Build/source/texk/kpathsea/win32/Makefile.in
index 6fadabf6324..4a62ea57c55 100644
--- a/Build/source/texk/kpathsea/win32/Makefile.in
+++ b/Build/source/texk/kpathsea/win32/Makefile.in
@@ -256,8 +256,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir)/..
-AM_CPPFLAGS = -DWEB2C_KPSE_VERSION='"Web2C-$(WEB2CVERSION) Kpathsea-$(KPSEVERSION)"'
+AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/.. \
+ -DWEB2C_KPSE_VERSION='"Web2C-$(WEB2CVERSION) \
+ Kpathsea-$(KPSEVERSION)"'
AM_CFLAGS = $(WARNING_CFLAGS)
fmtutil_SOURCES = \
dirutil.c \
diff --git a/Build/source/texk/kpathsea/win32/dirutil.c b/Build/source/texk/kpathsea/win32/dirutil.c
index fbedd4c9b8b..db0525f6529 100644
--- a/Build/source/texk/kpathsea/win32/dirutil.c
+++ b/Build/source/texk/kpathsea/win32/dirutil.c
@@ -7,18 +7,9 @@
int
is_dir (char *buff)
{
- HANDLE h;
- WIN32_FIND_DATA w32fd;
+ struct stat stats;
- if (((h = FindFirstFile (buff, &w32fd))
- != INVALID_HANDLE_VALUE) &&
- (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
- FindClose (h);
- return (1);
- } else {
- FindClose (h);
- return (0);
- }
+ return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode);
}
/* make a directory */