Blame lib/glob.in.h

Packit 8f70b4
/* glob.h -- Find a path matching a pattern.
Packit 8f70b4
Packit 8f70b4
   Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
Packit 8f70b4
Packit 8f70b4
   Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
Packit 8f70b4
Packit 8f70b4
   This program is free software; you can redistribute it and/or modify
Packit 8f70b4
   it under the terms of the GNU General Public License as published by
Packit 8f70b4
   the Free Software Foundation; either version 3, or (at your option)
Packit 8f70b4
   any later version.
Packit 8f70b4
Packit 8f70b4
   This program is distributed in the hope that it will be useful,
Packit 8f70b4
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 8f70b4
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 8f70b4
   GNU General Public License for more details.
Packit 8f70b4
Packit 8f70b4
   You should have received a copy of the GNU General Public License
Packit 8f70b4
   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
Packit 8f70b4
Packit 8f70b4
#ifndef _@GUARD_PREFIX@_GLOB_H
Packit 8f70b4
Packit 8f70b4
#if __GNUC__ >= 3
Packit 8f70b4
@PRAGMA_SYSTEM_HEADER@
Packit 8f70b4
#endif
Packit 8f70b4
@PRAGMA_COLUMNS@
Packit 8f70b4
Packit 8f70b4
/* The include_next requires a split double-inclusion guard.  */
Packit 8f70b4
#if !@REPLACE_GLOB@
Packit 8f70b4
# @INCLUDE_NEXT@ @NEXT_GLOB_H@
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
#ifndef _@GUARD_PREFIX@_GLOB_H
Packit 8f70b4
#define _@GUARD_PREFIX@_GLOB_H
Packit 8f70b4
Packit 8f70b4
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit 8f70b4
Packit 8f70b4
/* GCC 2.95 and later have "__restrict"; C99 compilers have
Packit 8f70b4
   "restrict", and "configure" may have defined "restrict".
Packit 8f70b4
   Other compilers use __restrict, __restrict__, and _Restrict, and
Packit 8f70b4
   'configure' might #define 'restrict' to those words, so pick a
Packit 8f70b4
   different name.  */
Packit 8f70b4
#ifndef _Restrict_
Packit 8f70b4
# if 199901L <= __STDC_VERSION__
Packit 8f70b4
#  define _Restrict_ restrict
Packit 8f70b4
# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)
Packit 8f70b4
#  define _Restrict_ __restrict
Packit 8f70b4
# else
Packit 8f70b4
#  define _Restrict_
Packit 8f70b4
# endif
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
#ifdef __cplusplus
Packit 8f70b4
extern "C" {
Packit 8f70b4
#endif
Packit 8f70b4
typedef int (*_gl_glob_errfunc_fn) (const char *, int);
Packit 8f70b4
#ifdef __cplusplus
Packit 8f70b4
}
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
#if @REPLACE_GLOB@
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
/* Preparations for including the standard GNU C Library header.  */
Packit 8f70b4
Packit 8f70b4
# include <libc-config.h>
Packit 8f70b4
Packit 8f70b4
# include <stddef.h>
Packit 8f70b4
Packit 8f70b4
/* On some systems, such as AIX 5.1, <sys/stat.h> does a "#define stat stat64".
Packit 8f70b4
   Make sure this definition is seen before glob-libc.h defines types that
Packit 8f70b4
   rely on 'struct stat'.  */
Packit 8f70b4
# include <sys/stat.h>
Packit 8f70b4
Packit 8f70b4
# ifndef __USE_GNU
Packit 8f70b4
#  define __USE_GNU    1
Packit 8f70b4
# endif
Packit 8f70b4
Packit 8f70b4
# define glob rpl_glob
Packit 8f70b4
# define globfree rpl_globfree
Packit 8f70b4
# define glob_pattern_p rpl_glob_pattern_p
Packit 8f70b4
# define __glob_pattern_p glob_pattern_p
Packit 8f70b4
Packit 8f70b4
# define __GLOB_GNULIB 1
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
/* Now the standard GNU C Library header should work.  */
Packit 8f70b4
# include "glob-libc.h"
Packit 8f70b4
Packit 8f70b4
Packit 8f70b4
# if defined __cplusplus && defined GNULIB_NAMESPACE
Packit 8f70b4
#  undef glob
Packit 8f70b4
#  undef globfree
Packit 8f70b4
#  undef glob_pattern_p
Packit 8f70b4
_GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
Packit 8f70b4
                              _gl_glob_errfunc_fn __errfunc,
Packit 8f70b4
                              glob_t *_Restrict_ __pglob));
Packit 8f70b4
_GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
Packit 8f70b4
_GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
Packit 8f70b4
# endif
Packit 8f70b4
Packit 8f70b4
#else
Packit 8f70b4
Packit 8f70b4
_GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
Packit 8f70b4
                              _gl_glob_errfunc_fn __errfunc,
Packit 8f70b4
                              glob_t *_Restrict_ __pglob));
Packit 8f70b4
_GL_CXXALIAS_SYS (globfree, void, (glob_t *__pglob));
Packit 8f70b4
_GL_CXXALIAS_SYS (glob_pattern_p, int, (const char *__pattern, int __quote));
Packit 8f70b4
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
#if 0  /* The C function name is rpl_glob in some cases, not glob.  */
Packit 8f70b4
_GL_CXXALIASWARN (glob);
Packit 8f70b4
_GL_CXXALIASWARN (globfree);
Packit 8f70b4
_GL_CXXALIASWARN (glob_pattern_p);
Packit 8f70b4
#endif
Packit 8f70b4
Packit 8f70b4
#endif /* _@GUARD_PREFIX@_GLOB_H */
Packit 8f70b4
#endif /* _@GUARD_PREFIX@_GLOB_H */