[MKISOFS]
[reactos.git] / reactos / sdk / tools / mkisofs / schilytools / include / schily / maxpath.h
1 /* @(#)maxpath.h 1.12 10/08/27 Copyright 1985, 1995, 1998, 2001-2010 J. Schilling */
2 /*
3 * Definitions for dealing with statically limitations on pathnames
4 *
5 * Copyright (c) 1985, 1995, 1998, 2001-2010 J. Schilling
6 */
7 /*
8 * The contents of this file are subject to the terms of the
9 * Common Development and Distribution License, Version 1.0 only
10 * (the "License"). You may not use this file except in compliance
11 * with the License.
12 *
13 * See the file CDDL.Schily.txt in this distribution for details.
14 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file CDDL.Schily.txt from this distribution.
17 */
18
19 #ifndef _SCHILY_MAXPATH_H
20 #define _SCHILY_MAXPATH_H
21
22 #ifndef _SCHILY_DIRENT_H
23 #include <schily/dirent.h> /* Includes mconfig.h if needed */
24 #endif
25
26 #ifdef JOS
27 #ifndef _SCHILY_JOS_MAXP_H
28 # include <schily/jos_maxp.h>
29 #endif
30 # ifndef FOUND_MAXPATHNAME
31 # define FOUND_MAXPATHNAME
32 # endif
33 # ifndef FOUND_MAXFILENAME
34 # define FOUND_MAXFILENAME
35 # endif
36 #endif /* JOS */
37
38 #if !defined(FOUND_MAXPATHNAME) && defined(MAXPATHLEN)
39 # define MAXPATHNAME MAXPATHLEN /* From sys/param.h */
40 # define FOUND_MAXPATHNAME
41 #endif
42
43 #if !defined(FOUND_MAXPATHNAME) && defined(PATH_MAX)
44 # define MAXPATHNAME PATH_MAX /* From limits.h */
45 # define FOUND_MAXPATHNAME
46 #endif
47
48 #if !defined(FOUND_MAXPATHNAME)
49 #include <schily/stdlib.h>
50 #endif
51 #if !defined(FOUND_MAXPATHNAME) && defined(_MAX_PATH)
52 # define MAXPATHNAME _MAX_PATH /* From MS stdlib.h */
53 # define FOUND_MAXPATHNAME
54 #endif
55
56 #if !defined(FOUND_MAXPATHNAME)
57 # define MAXPATHNAME 256 /* Is there a limit? */
58 #endif
59
60 #ifndef PATH_MAX
61 #define PATH_MAX MAXPATHNAME
62 #endif
63
64
65 /*
66 * Don't use defaults here to allow recognition of problems.
67 */
68 #if !defined(FOUND_MAXFILENAME) && defined(MAXNAMELEN)
69 # define MAXFILENAME MAXNAMELEN /* From sys/param.h */
70 # define FOUND_MAXFILENAME
71 #endif
72
73 #if !defined(FOUND_MAXFILENAME) && defined(MAXNAMLEN)
74 # define MAXFILENAME MAXNAMLEN /* From dirent.h */
75 # define FOUND_MAXFILENAME
76 #endif
77
78 #ifdef __never__
79 /*
80 * DIRSIZ(dp) is a parameterized macro, we cannot use it here.
81 */
82 #if !defined(FOUND_MAXFILENAME) && defined(DIRSIZ)
83 # define MAXFILENAME DIRSIZ /* From sys/dir.h */
84 # define FOUND_MAXFILENAME
85 #endif
86 #endif /* __never__ */
87
88 #if !defined(FOUND_MAXFILENAME) && defined(NAME_MAX)
89 # define MAXFILENAME NAME_MAX /* From limits.h */
90 # define FOUND_MAXFILENAME
91 #endif
92
93 #if !defined(FOUND_MAXFILENAME) && defined(FOUND_DIRSIZE)
94 # define MAXFILENAME DIRSIZE /* From schily/dirent.h */
95 # define FOUND_MAXFILENAME
96 #endif
97
98 #if !defined(FOUND_MAXPATHNAME)
99 #include <schily/stdlib.h>
100 #endif
101 #if !defined(FOUND_MAXFILENAME) && defined(_MAX_FNAME)
102 # define MAXFILENAME _MAX_FNAME /* From MS stdlib.h */
103 # define FOUND_MAXFILENAME
104 #endif
105
106 #ifndef NAME_MAX
107 #define NAME_MAX MAXFILENAME
108 #endif
109 #ifndef MAXNAMLEN
110 #define MAXNAMLEN MAXFILENAME
111 #endif
112
113 #endif /* _SCHILY_MAXPATH_H */