summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog8
-rw-r--r--Build/source/texk/kpathsea/c-pathmx.h13
-rw-r--r--Build/source/texk/kpathsea/progname.c4
-rw-r--r--Build/source/texk/kpathsea/win32lib.h4
4 files changed, 21 insertions, 8 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 4656233039a..6d16f3eed23 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-10 Karl Berry <karl@tug.org>
+
+ * progname.c (c-pathmx.h): #include unconditionally.
+ * c-pathmx.h (PATH_MAX) [MAX_PATH]: #define PATH_MAX as MAX_PATH
+ for Windows.
+ * win32lib.h: include io.h, fcntl.h, direct.h.
+ From Javier Mugica, 9 Apr 2010 22:04:46.
+
2010-04-09 Karl Berry <karl@tug.org>
* types.h: doc fixes.
diff --git a/Build/source/texk/kpathsea/c-pathmx.h b/Build/source/texk/kpathsea/c-pathmx.h
index fb122d0ae55..8b63023db01 100644
--- a/Build/source/texk/kpathsea/c-pathmx.h
+++ b/Build/source/texk/kpathsea/c-pathmx.h
@@ -1,8 +1,10 @@
/* c-pathmx.h: define PATH_MAX, the maximum length of a filename.
- Since no such limit may exist, it's preferable to dynamically grow
- filenames as needed.
+ Since no such limit may exist (pace GNU Hurd), these constants should
+ not actually be used; filenames should be dynamically grown as
+ needed. Most of Kpathsea does this now, but not all, and not all
+ programs using it.
- Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 1992, 1993, 2008, 2010 Karl Berry.
Copyright 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -24,7 +26,7 @@
#include <kpathsea/c-limits.h>
/* Cheat and define this as a manifest constant no matter what, instead
- of using pathconf. I forget why we want to do this. */
+ of using pathconf. Maybe it is too big otherwise on Hurd? */
#ifndef _POSIX_PATH_MAX
#define _POSIX_PATH_MAX 255
@@ -33,10 +35,11 @@
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN
+#elif defined (MAX_PATH)
+#define PATH_MAX MAX_PATH
#else
#define PATH_MAX _POSIX_PATH_MAX
#endif
#endif /* not PATH_MAX */
-
#endif /* not KPATHSEA_C_PATH_MAX_H */
diff --git a/Build/source/texk/kpathsea/progname.c b/Build/source/texk/kpathsea/progname.c
index 7fe68742a09..0e19188a0b7 100644
--- a/Build/source/texk/kpathsea/progname.c
+++ b/Build/source/texk/kpathsea/progname.c
@@ -19,14 +19,12 @@
#include <kpathsea/config.h>
#include <kpathsea/absolute.h>
#include <kpathsea/c-pathch.h>
+#include <kpathsea/c-pathmx.h>
#include <kpathsea/c-stat.h>
#include <kpathsea/pathsearch.h>
/* For kpse_reset_progname */
#include <kpathsea/tex-file.h>
-#if defined (WIN32) || defined (__DJGPP__)
-#include <kpathsea/c-pathmx.h>
-#endif
#if defined(__i386_pc_gnu__)
#ifndef _S_ISUID
diff --git a/Build/source/texk/kpathsea/win32lib.h b/Build/source/texk/kpathsea/win32lib.h
index beaf9f8d5cd..8349577f60a 100644
--- a/Build/source/texk/kpathsea/win32lib.h
+++ b/Build/source/texk/kpathsea/win32lib.h
@@ -3,6 +3,10 @@
#ifndef _WIN32LIB_H_
#define _WIN32LIB_H_
+#include <io.h>
+#include <fcntl.h>
+#include <direct.h>
+
#if !__STDC__
#if _MSC_VER>=1200
#pragma warning(push)