1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef _@GUARD_PREFIX@_GLOB_H
21
22 #if __GNUC__ >= 3
23 @PRAGMA_SYSTEM_HEADER@
24 #endif
25 @PRAGMA_COLUMNS@
26
27
28 #if @HAVE_GLOB_H@ && !@REPLACE_GLOB@
29 # @INCLUDE_NEXT@ @NEXT_GLOB_H@
30 #endif
31
32 #ifndef _@GUARD_PREFIX@_GLOB_H
33 #define _@GUARD_PREFIX@_GLOB_H
34
35
36
37
38
39
40
41
42
43
44
45
46
47 #ifndef _Restrict_
48 # if defined __restrict \
49 || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
50 || __clang_major__ >= 3
51 # define _Restrict_ __restrict
52 # elif 199901L <= __STDC_VERSION__ || defined restrict
53 # define _Restrict_ restrict
54 # else
55 # define _Restrict_
56 # endif
57 #endif
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 typedef int (*_gl_glob_errfunc_fn) (const char *, int);
63 #ifdef __cplusplus
64 }
65 #endif
66
67
68 #if !@HAVE_GLOB_H@ || @REPLACE_GLOB@
69
70
71
72
73 # include <stddef.h>
74
75
76
77
78 # include <sys/stat.h>
79
80 # if @REPLACE_GLOB@
81 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
82 # define glob rpl_glob
83 # define globfree rpl_globfree
84 # endif
85 # endif
86 # if @REPLACE_GLOB_PATTERN_P@
87 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
88 # define glob_pattern_p rpl_glob_pattern_p
89 # endif
90 # endif
91 # define __glob_pattern_p glob_pattern_p
92
93 # define __GLOB_GNULIB 1
94
95
96
97 # include "glob-libc.gl.h"
98
99
100 #endif
101
102
103 #if @GNULIB_GLOB@
104 # if @REPLACE_GLOB@
105 _GL_FUNCDECL_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
106 _gl_glob_errfunc_fn __errfunc,
107 glob_t *_Restrict_ __pglob)
108 _GL_ARG_NONNULL ((1)));
109 _GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
110 _gl_glob_errfunc_fn __errfunc,
111 glob_t *_Restrict_ __pglob));
112 # else
113 # if !@HAVE_GLOB@
114 _GL_FUNCDECL_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
115 _gl_glob_errfunc_fn __errfunc,
116 glob_t *_Restrict_ __pglob)
117 _GL_ARG_NONNULL ((1)));
118 # endif
119 _GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
120 _gl_glob_errfunc_fn __errfunc,
121 glob_t *_Restrict_ __pglob));
122 # endif
123 _GL_CXXALIASWARN (glob);
124 #elif defined GNULIB_POSIXCHECK
125 # undef glob
126 # if HAVE_RAW_DECL_GLOB
127 _GL_WARN_ON_USE (glob,
128 "glob is unportable - "
129 "use gnulib module glob for portability");
130 # endif
131 #endif
132
133 #if @GNULIB_GLOB@
134 # if @REPLACE_GLOB@
135 _GL_FUNCDECL_RPL (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1)));
136 _GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
137 # else
138 # if !@HAVE_GLOB@
139 _GL_FUNCDECL_SYS (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1)));
140 # endif
141 _GL_CXXALIAS_SYS (globfree, void, (glob_t *__pglob));
142 # endif
143 _GL_CXXALIASWARN (globfree);
144 #elif defined GNULIB_POSIXCHECK
145 # undef globfree
146 # if HAVE_RAW_DECL_GLOBFREE
147 _GL_WARN_ON_USE (globfree,
148 "globfree is unportable - "
149 "use gnulib module glob for portability");
150 # endif
151 #endif
152
153 #if @GNULIB_GLOB@
154 # if @REPLACE_GLOB_PATTERN_P@
155 _GL_FUNCDECL_RPL (glob_pattern_p, int, (const char *__pattern, int __quote)
156 _GL_ARG_NONNULL ((1)));
157 _GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
158 # else
159 # if !@HAVE_GLOB_PATTERN_P@
160 _GL_FUNCDECL_SYS (glob_pattern_p, int, (const char *__pattern, int __quote)
161 _GL_ARG_NONNULL ((1)));
162 # endif
163 _GL_CXXALIAS_SYS (glob_pattern_p, int, (const char *__pattern, int __quote));
164 # endif
165 _GL_CXXALIASWARN (glob_pattern_p);
166 #elif defined GNULIB_POSIXCHECK
167 # undef glob_pattern_p
168 # if HAVE_RAW_DECL_GLOB_PATTERN_P
169 _GL_WARN_ON_USE (glob_pattern_p,
170 "glob_pattern_p is unportable - "
171 "use gnulib module glob for portability");
172 # endif
173 #endif
174
175
176 #endif
177 #endif