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/* glob.h -- Find a path matching a pattern.
7
8   Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
9
10   Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
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_GLOB_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 <glob.h>
35#endif
36
37#ifndef _GL_GLOB_H
38#define _GL_GLOB_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) \
470extern __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) \
476extern __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) \
498extern 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) \
503extern 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/* For plain 'restrict', use glibc's __restrict if defined.
522   Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have
523   "restrict", and "configure" may have defined "restrict".
524   Other compilers use __restrict, __restrict__, and _Restrict, and
525   'configure' might #define 'restrict' to those words, so pick a
526   different name.  */
527#ifndef _Restrict_
528# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__)
529#  define _Restrict_ __restrict
530# elif 199901L <= __STDC_VERSION__ || defined restrict
531#  define _Restrict_ restrict
532# else
533#  define _Restrict_
534# endif
535#endif
536
537#ifdef __cplusplus
538extern "C" {
539#endif
540typedef int (*_gl_glob_errfunc_fn) (const char *, int);
541#ifdef __cplusplus
542}
543#endif
544
545
546#if !1 || 1
547
548
549/* Preparations for including the standard GNU C Library header.  */
550
551# include <libc-config.h>
552
553# include <stddef.h>
554
555/* On some systems, such as AIX 5.1, <sys/stat.h> does a "#define stat stat64".
556   Make sure this definition is seen before glob-libc.h defines types that
557   rely on 'struct stat'.  */
558# include <sys/stat.h>
559
560# ifndef __USE_GNU
561#  define __USE_GNU    1
562# endif
563
564# if 1
565#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
566#   define glob rpl_glob
567#   define globfree rpl_globfree
568#  endif
569# endif
570# if 1
571#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
572#   define glob_pattern_p rpl_glob_pattern_p
573#  endif
574# endif
575# define __glob_pattern_p glob_pattern_p
576
577# define __GLOB_GNULIB 1
578
579
580/* Now the standard GNU C Library header should work.  */
581# include "glob-libc.h"
582
583
584#endif
585
586
587#if 1
588# if 1
589_GL_FUNCDECL_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
590                              _gl_glob_errfunc_fn __errfunc,
591                              glob_t *_Restrict_ __pglob)
592                              _GL_ARG_NONNULL ((1)));
593_GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
594                              _gl_glob_errfunc_fn __errfunc,
595                              glob_t *_Restrict_ __pglob));
596# else
597#  if !1
598_GL_FUNCDECL_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
599                              _gl_glob_errfunc_fn __errfunc,
600                              glob_t *_Restrict_ __pglob)
601                              _GL_ARG_NONNULL ((1)));
602#  endif
603_GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
604                              _gl_glob_errfunc_fn __errfunc,
605                              glob_t *_Restrict_ __pglob));
606# endif
607_GL_CXXALIASWARN (glob);
608#elif defined GNULIB_POSIXCHECK
609# undef glob
610# if HAVE_RAW_DECL_GLOB
611_GL_WARN_ON_USE (glob,
612                 "glob is unportable - "
613                 "use gnulib module glob for portability");
614# endif
615#endif
616
617#if 1
618# if 1
619_GL_FUNCDECL_RPL (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1)));
620_GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
621# else
622#  if !1
623_GL_FUNCDECL_SYS (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1)));
624#  endif
625_GL_CXXALIAS_SYS (globfree, void, (glob_t *__pglob));
626# endif
627_GL_CXXALIASWARN (globfree);
628#elif defined GNULIB_POSIXCHECK
629# undef globfree
630# if HAVE_RAW_DECL_GLOBFREE
631_GL_WARN_ON_USE (globfree,
632                 "globfree is unportable - "
633                 "use gnulib module glob for portability");
634# endif
635#endif
636
637#if 1
638# if 1
639_GL_FUNCDECL_RPL (glob_pattern_p, int, (const char *__pattern, int __quote)
640                                       _GL_ARG_NONNULL ((1)));
641_GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
642# else
643#  if !1
644_GL_FUNCDECL_SYS (glob_pattern_p, int, (const char *__pattern, int __quote)
645                                       _GL_ARG_NONNULL ((1)));
646#  endif
647_GL_CXXALIAS_SYS (glob_pattern_p, int, (const char *__pattern, int __quote));
648# endif
649_GL_CXXALIASWARN (glob_pattern_p);
650#elif defined GNULIB_POSIXCHECK
651# undef glob_pattern_p
652# if HAVE_RAW_DECL_GLOB_PATTERN_P
653_GL_WARN_ON_USE (glob_pattern_p,
654                 "glob_pattern_p is unportable - "
655                 "use gnulib module glob for portability");
656# endif
657#endif
658
659
660#endif /* _GL_GLOB_H */
661#endif /* _GL_GLOB_H */
662