| 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. |
| 6 |
|
| 7 |
Copyright 1992, 1993, 2008, 2010 Karl Berry. |
| 8 |
Copyright 2005 Olaf Weber. |
| 9 |
|
| 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. |
| 14 |
|
| 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. |
| 19 |
|
| 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/>. */ |
| 22 |
|
| 23 |
#ifndef KPATHSEA_C_PATH_MX_H |
| 24 |
#define KPATHSEA_C_PATH_MX_H |
| 25 |
|
| 26 |
#include <kpathsea/c-limits.h> |
| 27 |
|
| 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? */ |
| 30 |
|
| 31 |
#ifndef _POSIX_PATH_MAX |
| 32 |
#define _POSIX_PATH_MAX 255 |
| 33 |
#endif |
| 34 |
|
| 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 */ |
| 44 |
|
| 45 |
#endif /* not KPATHSEA_C_PATH_MAX_H */ |