beta-0.89.2
[luatex.git] / source / texk / kpathsea / c-pathmx.h
blob8b63023db01a44480f20db4840b058a6b2ad4b1b
1 /* c-pathmx.h: define PATH_MAX, the maximum length of a filename.
2 Since no such limit may exist (pace GNU Hurd), these constants should
3 not actually be used; filenames should be dynamically grown as
4 needed. Most of Kpathsea does this now, but not all, and not all
5 programs using it.
7 Copyright 1992, 1993, 2008, 2010 Karl Berry.
8 Copyright 2005 Olaf Weber.
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with this library; if not, see <http://www.gnu.org/licenses/>. */
23 #ifndef KPATHSEA_C_PATH_MX_H
24 #define KPATHSEA_C_PATH_MX_H
26 #include <kpathsea/c-limits.h>
28 /* Cheat and define this as a manifest constant no matter what, instead
29 of using pathconf. Maybe it is too big otherwise on Hurd? */
31 #ifndef _POSIX_PATH_MAX
32 #define _POSIX_PATH_MAX 255
33 #endif
35 #ifndef PATH_MAX
36 #ifdef MAXPATHLEN
37 #define PATH_MAX MAXPATHLEN
38 #elif defined (MAX_PATH)
39 #define PATH_MAX MAX_PATH
40 #else
41 #define PATH_MAX _POSIX_PATH_MAX
42 #endif
43 #endif /* not PATH_MAX */
45 #endif /* not KPATHSEA_C_PATH_MAX_H */