1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Substitute for and wrapper around <fnmatch.h>.
3    Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2018 Free
4    Software Foundation, Inc.
5 
6    This file is part of the GNU C Library.
7 
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 3, or (at your option)
11    any later version.
12 
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, see <https://www.gnu.org/licenses/>.  */
20 
21 #ifndef _GL_FNMATCH_H
22 
23 #if __GNUC__ >= 3
24 #pragma GCC system_header
25 #endif
26 
27 
28 /* The include_next requires a split double-inclusion guard.  */
29 #if 1 && !1
30 # include_next <fnmatch.h>
31 #endif
32 
33 #ifndef _GL_FNMATCH_H
34 #define _GL_FNMATCH_H
35 
36 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
37 /* C++ compatible function declaration macros.
38    Copyright (C) 2010-2018 Free Software Foundation, Inc.
39 
40    This program is free software: you can redistribute it and/or modify it
41    under the terms of the GNU General Public License as published
42    by the Free Software Foundation; either version 3 of the License, or
43    (at your option) any later version.
44 
45    This program is distributed in the hope that it will be useful,
46    but WITHOUT ANY WARRANTY; without even the implied warranty of
47    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
48    General Public License for more details.
49 
50    You should have received a copy of the GNU General Public License
51    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
52 
53 #ifndef _GL_CXXDEFS_H
54 #define _GL_CXXDEFS_H
55 
56 /* Begin/end the GNULIB_NAMESPACE namespace.  */
57 #if defined __cplusplus && defined GNULIB_NAMESPACE
58 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
59 # define _GL_END_NAMESPACE }
60 #else
61 # define _GL_BEGIN_NAMESPACE
62 # define _GL_END_NAMESPACE
63 #endif
64 
65 /* The three most frequent use cases of these macros are:
66 
67    * For providing a substitute for a function that is missing on some
68      platforms, but is declared and works fine on the platforms on which
69      it exists:
70 
71        #if @GNULIB_FOO@
72        # if !@HAVE_FOO@
73        _GL_FUNCDECL_SYS (foo, ...);
74        # endif
75        _GL_CXXALIAS_SYS (foo, ...);
76        _GL_CXXALIASWARN (foo);
77        #elif defined GNULIB_POSIXCHECK
78        ...
79        #endif
80 
81    * For providing a replacement for a function that exists on all platforms,
82      but is broken/insufficient and needs to be replaced on some platforms:
83 
84        #if @GNULIB_FOO@
85        # if @REPLACE_FOO@
86        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
87        #   undef foo
88        #   define foo rpl_foo
89        #  endif
90        _GL_FUNCDECL_RPL (foo, ...);
91        _GL_CXXALIAS_RPL (foo, ...);
92        # else
93        _GL_CXXALIAS_SYS (foo, ...);
94        # endif
95        _GL_CXXALIASWARN (foo);
96        #elif defined GNULIB_POSIXCHECK
97        ...
98        #endif
99 
100    * For providing a replacement for a function that exists on some platforms
101      but is broken/insufficient and needs to be replaced on some of them and
102      is additionally either missing or undeclared on some other platforms:
103 
104        #if @GNULIB_FOO@
105        # if @REPLACE_FOO@
106        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
107        #   undef foo
108        #   define foo rpl_foo
109        #  endif
110        _GL_FUNCDECL_RPL (foo, ...);
111        _GL_CXXALIAS_RPL (foo, ...);
112        # else
113        #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
114        _GL_FUNCDECL_SYS (foo, ...);
115        #  endif
116        _GL_CXXALIAS_SYS (foo, ...);
117        # endif
118        _GL_CXXALIASWARN (foo);
119        #elif defined GNULIB_POSIXCHECK
120        ...
121        #endif
122 */
123 
124 /* _GL_EXTERN_C declaration;
125    performs the declaration with C linkage.  */
126 #if defined __cplusplus
127 # define _GL_EXTERN_C extern "C"
128 #else
129 # define _GL_EXTERN_C extern
130 #endif
131 
132 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
133    declares a replacement function, named rpl_func, with the given prototype,
134    consisting of return type, parameters, and attributes.
135    Example:
136      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
137                                   _GL_ARG_NONNULL ((1)));
138  */
139 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
140   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
141 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
142   _GL_EXTERN_C rettype rpl_func parameters_and_attributes
143 
144 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
145    declares the system function, named func, with the given prototype,
146    consisting of return type, parameters, and attributes.
147    Example:
148      _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
149                                   _GL_ARG_NONNULL ((1)));
150  */
151 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
152   _GL_EXTERN_C rettype func parameters_and_attributes
153 
154 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
155    declares a C++ alias called GNULIB_NAMESPACE::func
156    that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
157    Example:
158      _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
159 
160    Wrapping rpl_func in an object with an inline conversion operator
161    avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
162    actually used in the program.  */
163 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
164   _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
165 #if defined __cplusplus && defined GNULIB_NAMESPACE
166 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
167     namespace GNULIB_NAMESPACE                                \
168     {                                                         \
169       static const struct _gl_ ## func ## _wrapper            \
170       {                                                       \
171         typedef rettype (*type) parameters;                   \
172                                                               \
173         inline operator type () const                         \
174         {                                                     \
175           return ::rpl_func;                                  \
176         }                                                     \
177       } func = {};                                            \
178     }                                                         \
179     _GL_EXTERN_C int _gl_cxxalias_dummy
180 #else
181 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
182     _GL_EXTERN_C int _gl_cxxalias_dummy
183 #endif
184 
185 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
186    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
187    except that the C function rpl_func may have a slightly different
188    declaration.  A cast is used to silence the "invalid conversion" error
189    that would otherwise occur.  */
190 #if defined __cplusplus && defined GNULIB_NAMESPACE
191 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
192     namespace GNULIB_NAMESPACE                                     \
193     {                                                              \
194       static const struct _gl_ ## func ## _wrapper                 \
195       {                                                            \
196         typedef rettype (*type) parameters;                        \
197                                                                    \
198         inline operator type () const                              \
199         {                                                          \
200           return reinterpret_cast<type>(::rpl_func);               \
201         }                                                          \
202       } func = {};                                                 \
203     }                                                              \
204     _GL_EXTERN_C int _gl_cxxalias_dummy
205 #else
206 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
207     _GL_EXTERN_C int _gl_cxxalias_dummy
208 #endif
209 
210 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
211    declares a C++ alias called GNULIB_NAMESPACE::func
212    that redirects to the system provided function func, if GNULIB_NAMESPACE
213    is defined.
214    Example:
215      _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
216 
217    Wrapping func in an object with an inline conversion operator
218    avoids a reference to func unless GNULIB_NAMESPACE::func is
219    actually used in the program.  */
220 #if defined __cplusplus && defined GNULIB_NAMESPACE
221 # define _GL_CXXALIAS_SYS(func,rettype,parameters)            \
222     namespace GNULIB_NAMESPACE                                \
223     {                                                         \
224       static const struct _gl_ ## func ## _wrapper            \
225       {                                                       \
226         typedef rettype (*type) parameters;                   \
227                                                               \
228         inline operator type () const                         \
229         {                                                     \
230           return ::func;                                      \
231         }                                                     \
232       } func = {};                                            \
233     }                                                         \
234     _GL_EXTERN_C int _gl_cxxalias_dummy
235 #else
236 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
237     _GL_EXTERN_C int _gl_cxxalias_dummy
238 #endif
239 
240 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
241    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
242    except that the C function func may have a slightly different declaration.
243    A cast is used to silence the "invalid conversion" error that would
244    otherwise occur.  */
245 #if defined __cplusplus && defined GNULIB_NAMESPACE
246 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
247     namespace GNULIB_NAMESPACE                          \
248     {                                                   \
249       static const struct _gl_ ## func ## _wrapper      \
250       {                                                 \
251         typedef rettype (*type) parameters;             \
252                                                         \
253         inline operator type () const                   \
254         {                                               \
255           return reinterpret_cast<type>(::func);        \
256         }                                               \
257       } func = {};                                      \
258     }                                                   \
259     _GL_EXTERN_C int _gl_cxxalias_dummy
260 #else
261 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
262     _GL_EXTERN_C int _gl_cxxalias_dummy
263 #endif
264 
265 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
266    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
267    except that the C function is picked among a set of overloaded functions,
268    namely the one with rettype2 and parameters2.  Two consecutive casts
269    are used to silence the "cannot find a match" and "invalid conversion"
270    errors that would otherwise occur.  */
271 #if defined __cplusplus && defined GNULIB_NAMESPACE
272   /* The outer cast must be a reinterpret_cast.
273      The inner cast: When the function is defined as a set of overloaded
274      functions, it works as a static_cast<>, choosing the designated variant.
275      When the function is defined as a single variant, it works as a
276      reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
277 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
278     namespace GNULIB_NAMESPACE                                                \
279     {                                                                         \
280       static const struct _gl_ ## func ## _wrapper                            \
281       {                                                                       \
282         typedef rettype (*type) parameters;                                   \
283                                                                               \
284         inline operator type () const                                         \
285         {                                                                     \
286           return reinterpret_cast<type>((rettype2 (*) parameters2)(::func));  \
287         }                                                                     \
288       } func = {};                                                            \
289     }                                                                         \
290     _GL_EXTERN_C int _gl_cxxalias_dummy
291 #else
292 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
293     _GL_EXTERN_C int _gl_cxxalias_dummy
294 #endif
295 
296 /* _GL_CXXALIASWARN (func);
297    causes a warning to be emitted when ::func is used but not when
298    GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
299    variants.  */
300 #if defined __cplusplus && defined GNULIB_NAMESPACE
301 # define _GL_CXXALIASWARN(func) \
302    _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
303 # define _GL_CXXALIASWARN_1(func,namespace) \
304    _GL_CXXALIASWARN_2 (func, namespace)
305 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
306    we enable the warning only when not optimizing.  */
307 # if !__OPTIMIZE__
308 #  define _GL_CXXALIASWARN_2(func,namespace) \
309     _GL_WARN_ON_USE (func, \
310                      "The symbol ::" #func " refers to the system function. " \
311                      "Use " #namespace "::" #func " instead.")
312 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
313 #  define _GL_CXXALIASWARN_2(func,namespace) \
314      extern __typeof__ (func) func
315 # else
316 #  define _GL_CXXALIASWARN_2(func,namespace) \
317      _GL_EXTERN_C int _gl_cxxalias_dummy
318 # endif
319 #else
320 # define _GL_CXXALIASWARN(func) \
321     _GL_EXTERN_C int _gl_cxxalias_dummy
322 #endif
323 
324 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
325    causes a warning to be emitted when the given overloaded variant of ::func
326    is used but not when GNULIB_NAMESPACE::func is used.  */
327 #if defined __cplusplus && defined GNULIB_NAMESPACE
328 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
329    _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
330                         GNULIB_NAMESPACE)
331 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
332    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
333 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
334    we enable the warning only when not optimizing.  */
335 # if !__OPTIMIZE__
336 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
337     _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
338                          "The symbol ::" #func " refers to the system function. " \
339                          "Use " #namespace "::" #func " instead.")
340 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
341 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
342      extern __typeof__ (func) func
343 # else
344 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
345      _GL_EXTERN_C int _gl_cxxalias_dummy
346 # endif
347 #else
348 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
349     _GL_EXTERN_C int _gl_cxxalias_dummy
350 #endif
351 
352 #endif /* _GL_CXXDEFS_H */
353 
354 /* The definition of _GL_ARG_NONNULL is copied here.  */
355 /* A C macro for declaring that specific arguments must not be NULL.
356    Copyright (C) 2009-2018 Free Software Foundation, Inc.
357 
358    This program is free software: you can redistribute it and/or modify it
359    under the terms of the GNU General Public License as published
360    by the Free Software Foundation; either version 3 of the License, or
361    (at your option) any later version.
362 
363    This program is distributed in the hope that it will be useful,
364    but WITHOUT ANY WARRANTY; without even the implied warranty of
365    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
366    General Public License for more details.
367 
368    You should have received a copy of the GNU General Public License
369    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
370 
371 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
372    that the values passed as arguments n, ..., m must be non-NULL pointers.
373    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
374 #ifndef _GL_ARG_NONNULL
375 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
376 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
377 # else
378 #  define _GL_ARG_NONNULL(params)
379 # endif
380 #endif
381 
382 /* The definition of _GL_WARN_ON_USE is copied here.  */
383 /* A C macro for emitting warnings if a function is used.
384    Copyright (C) 2010-2018 Free Software Foundation, Inc.
385 
386    This program is free software: you can redistribute it and/or modify it
387    under the terms of the GNU General Public License as published
388    by the Free Software Foundation; either version 3 of the License, or
389    (at your option) any later version.
390 
391    This program is distributed in the hope that it will be useful,
392    but WITHOUT ANY WARRANTY; without even the implied warranty of
393    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
394    General Public License for more details.
395 
396    You should have received a copy of the GNU General Public License
397    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
398 
399 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
400    for FUNCTION which will then trigger a compiler warning containing
401    the text of "literal string" anywhere that function is called, if
402    supported by the compiler.  If the compiler does not support this
403    feature, the macro expands to an unused extern declaration.
404 
405    _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
406    attribute used in _GL_WARN_ON_USE.  If the compiler does not support
407    this feature, it expands to empty.
408 
409    These macros are useful for marking a function as a potential
410    portability trap, with the intent that "literal string" include
411    instructions on the replacement function that should be used
412    instead.
413    _GL_WARN_ON_USE is for functions with 'extern' linkage.
414    _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
415    linkage.
416 
417    However, one of the reasons that a function is a portability trap is
418    if it has the wrong signature.  Declaring FUNCTION with a different
419    signature in C is a compilation error, so this macro must use the
420    same type as any existing declaration so that programs that avoid
421    the problematic FUNCTION do not fail to compile merely because they
422    included a header that poisoned the function.  But this implies that
423    _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
424    have a declaration.  Use of this macro implies that there must not
425    be any other macro hiding the declaration of FUNCTION; but
426    undefining FUNCTION first is part of the poisoning process anyway
427    (although for symbols that are provided only via a macro, the result
428    is a compilation error rather than a warning containing
429    "literal string").  Also note that in C++, it is only safe to use if
430    FUNCTION has no overloads.
431 
432    For an example, it is possible to poison 'getline' by:
433    - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
434      [getline]) in configure.ac, which potentially defines
435      HAVE_RAW_DECL_GETLINE
436    - adding this code to a header that wraps the system <stdio.h>:
437      #undef getline
438      #if HAVE_RAW_DECL_GETLINE
439      _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
440        "not universally present; use the gnulib module getline");
441      #endif
442 
443    It is not possible to directly poison global variables.  But it is
444    possible to write a wrapper accessor function, and poison that
445    (less common usage, like &environ, will cause a compilation error
446    rather than issue the nice warning, but the end result of informing
447    the developer about their portability problem is still achieved):
448      #if HAVE_RAW_DECL_ENVIRON
449      static char ***
450      rpl_environ (void) { return &environ; }
451      _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
452      # undef environ
453      # define environ (*rpl_environ ())
454      #endif
455    or better (avoiding contradictory use of 'static' and 'extern'):
456      #if HAVE_RAW_DECL_ENVIRON
457      static char ***
458      _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
459      rpl_environ (void) { return &environ; }
460      # undef environ
461      # define environ (*rpl_environ ())
462      #endif
463    */
464 #ifndef _GL_WARN_ON_USE
465 
466 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
467 /* A compiler attribute is available in gcc versions 4.3.0 and later.  */
468 #  define _GL_WARN_ON_USE(function, message) \
469 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
470 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
471   __attribute__ ((__warning__ (message)))
472 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
473 /* Verify the existence of the function.  */
474 #  define _GL_WARN_ON_USE(function, message) \
475 extern __typeof__ (function) function
476 #  define _GL_WARN_ON_USE_ATTRIBUTE(message)
477 # else /* Unsupported.  */
478 #  define _GL_WARN_ON_USE(function, message) \
479 _GL_WARN_EXTERN_C int _gl_warn_on_use
480 #  define _GL_WARN_ON_USE_ATTRIBUTE(message)
481 # endif
482 #endif
483 
484 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
485    is like _GL_WARN_ON_USE (function, "string"), except that the function is
486    declared with the given prototype, consisting of return type, parameters,
487    and attributes.
488    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
489    not work in this case.  */
490 #ifndef _GL_WARN_ON_USE_CXX
491 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
492 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
493 extern rettype function parameters_and_attributes \
494      __attribute__ ((__warning__ (msg)))
495 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
496 /* Verify the existence of the function.  */
497 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
498 extern rettype function parameters_and_attributes
499 # else /* Unsupported.  */
500 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
501 _GL_WARN_EXTERN_C int _gl_warn_on_use
502 # endif
503 #endif
504 
505 /* _GL_WARN_EXTERN_C declaration;
506    performs the declaration with C linkage.  */
507 #ifndef _GL_WARN_EXTERN_C
508 # if defined __cplusplus
509 #  define _GL_WARN_EXTERN_C extern "C"
510 # else
511 #  define _GL_WARN_EXTERN_C extern
512 # endif
513 #endif
514 
515 #if !1 || 1
516 
517 /* We #undef these before defining them because some losing systems
518    (HP-UX A.08.07 for example) define these in <unistd.h>.  */
519 #undef  FNM_PATHNAME
520 #undef  FNM_NOESCAPE
521 #undef  FNM_PERIOD
522 
523 /* Bits set in the FLAGS argument to 'fnmatch'.  */
524 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match '/'.  */
525 #define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
526 #define FNM_PERIOD      (1 << 2) /* Leading '.' is matched only explicitly.  */
527 
528 #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
529 # define FNM_FILE_NAME   FNM_PATHNAME   /* Preferred GNU name.  */
530 # define FNM_LEADING_DIR (1 << 3)       /* Ignore '/...' after a match.  */
531 # define FNM_CASEFOLD    (1 << 4)       /* Compare without regard to case.  */
532 # define FNM_EXTMATCH    (1 << 5)       /* Use ksh-like extended matching. */
533 #endif
534 
535 /* Value returned by 'fnmatch' if STRING does not match PATTERN.  */
536 #define FNM_NOMATCH     1
537 
538 /* This value is returned if the implementation does not support
539    'fnmatch'.  Since this is not the case here it will never be
540    returned but the conformance test suites still require the symbol
541    to be defined.  */
542 #ifdef _XOPEN_SOURCE
543 # define FNM_NOSYS      (-1)
544 #endif
545 
546 #endif
547 
548 
549 #if 1
550 /* Match NAME against the file name pattern PATTERN,
551    returning zero if it matches, FNM_NOMATCH if not.  */
552 # if 1
553 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
554 #   define fnmatch rpl_fnmatch
555 #  endif
556 _GL_FUNCDECL_RPL (fnmatch, int,
557                   (const char *pattern, const char *name, int flags)
558                   _GL_ARG_NONNULL ((1, 2)));
559 _GL_CXXALIAS_RPL (fnmatch, int,
560                   (const char *pattern, const char *name, int flags));
561 # else
562 #  if !1
563 _GL_FUNCDECL_SYS (fnmatch, int,
564                   (const char *pattern, const char *name, int flags)
565                   _GL_ARG_NONNULL ((1, 2)));
566 #  endif
567 _GL_CXXALIAS_SYS (fnmatch, int,
568                   (const char *pattern, const char *name, int flags));
569 # endif
570 # if !GNULIB_FNMATCH_GNU
571 _GL_CXXALIASWARN (fnmatch);
572 # endif
573 #elif defined GNULIB_POSIXCHECK
574 # undef fnmatch
575 # if HAVE_RAW_DECL_FNMATCH
576 _GL_WARN_ON_USE (fnmatch,
577                  "fnmatch does not portably work - "
578                  "use gnulib module fnmatch for portability or gnulib module fnmatch-gnu for a glibc compatible implementation");
579 # endif
580 #endif
581 
582 
583 #endif /* _GL_FNMATCH_H */
584 #endif /* _GL_FNMATCH_H */
585