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