1 /* maxpath.h - Find out what this system thinks PATH_MAX and NAME_MAX are. */
3 /* Copyright (C) 1993 Free Software Foundation, Inc.
5 This file is part of GNU Bush, the Bourne Again SHell.
7 Bush is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 Bush is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Bush. If not, see <http://www.gnu.org/licenses/>.
21 #if !defined (_MAXPATH_H_)
24 /* These values are supposed to be in <limits.h> or one of the files
26 #if defined (HAVE_LIMITS_H)
28 #endif /* !HAVE_LIMITS_H */
30 /* If PATH_MAX is not defined, look for MAXPATHLEN */
31 #if !defined (PATH_MAX)
32 # if defined (HAVE_SYS_PARAM_H)
33 # include <sys/param.h>
34 # define maxpath_param_h
36 # if defined (MAXPATHLEN) && !defined (PATH_MAX)
37 # define PATH_MAX MAXPATHLEN
38 # endif /* MAXPATHLEN && !PATH_MAX */
39 #endif /* !PATH_MAX */
41 /* If NAME_MAX is not defined, look for MAXNAMLEN */
42 #if !defined (NAME_MAX)
43 # if defined (HAVE_SYS_PARAM_H) && !defined (maxpath_param_h)
44 # include <sys/param.h>
46 # if defined (MAXNAMLEN) && !defined (NAME_MAX)
47 # define NAME_MAX MAXNAMLEN
48 # endif /* MAXNAMLEN && !NAME_MAX */
49 #endif /* !NAME_MAX */
51 /* Default POSIX values */
52 #if !defined (PATH_MAX) && defined (_POSIX_PATH_MAX)
53 # define PATH_MAX _POSIX_PATH_MAX
56 #if !defined (NAME_MAX) && defined (_POSIX_NAME_MAX)
57 # define NAME_MAX _POSIX_NAME_MAX
62 #if !defined (PATH_MAX)
63 # define PATH_MAX 1024
66 #if !defined (NAME_MAX)
72 # define PATH_MAX 1024
75 #endif /* _MAXPATH_H_ */