From 544d8088c3dc794e227dd7384d7c4b15b6bf80d1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 10 Apr 2010 00:11:58 +0000 Subject: use MAX_PATH for PATH_MAX (Windows), et al.; from Javier Mugica git-svn-id: svn://tug.org/texlive/trunk@17781 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/ChangeLog | 8 ++++++++ Build/source/texk/kpathsea/c-pathmx.h | 13 ++++++++----- Build/source/texk/kpathsea/progname.c | 4 +--- Build/source/texk/kpathsea/win32lib.h | 4 ++++ 4 files changed, 21 insertions(+), 8 deletions(-) (limited to 'Build/source') 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 + + * 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 * 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 /* 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 #include #include +#include #include #include /* For kpse_reset_progname */ #include -#if defined (WIN32) || defined (__DJGPP__) -#include -#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 +#include +#include + #if !__STDC__ #if _MSC_VER>=1200 #pragma warning(push) -- cgit v1.2.3