1 /* c-name_max.h: define NAME_MAX, the maximum length of a single
2 component in a pathname.
4 Copyright 1992 Karl Berry
5 Copyright 2007 TeX Users Group
6 Copyright 2014 Clerk Ma
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
30 #define NAME_MAX pathconf ("/", _PC_NAME_MAX)
32 #endif /* not _POSIX_VERSION */
34 /* Most likely the system will truncate filenames if it is not POSIX,
35 and so we can use the BSD value here. */
36 #ifndef _POSIX_NAME_MAX
37 #define _POSIX_NAME_MAX 255
41 #define NAME_MAX _POSIX_NAME_MAX
44 #endif /* not C_NAME_MAX_H */