#ifndef _GLOB_H
#define _GLOB_H 1
#ifndef __GLOB_GNULIB
# include <sys/cdefs.h>
#endif
__BEGIN_DECLS
#ifndef __size_t
# if defined __GNUC__ && __GNUC__ >= 2
typedef __SIZE_TYPE__ __size_t;
# ifdef __USE_XOPEN
typedef __SIZE_TYPE__ size_t;
# endif
# else
# include <stddef.h>
# ifndef __size_t
# define __size_t size_t
# endif
# endif
#else
# undef __size_t
# define __size_t size_t
#endif
#define GLOB_ERR (1 << 0)
#define GLOB_MARK (1 << 1)
#define GLOB_NOSORT (1 << 2)
#define GLOB_DOOFFS (1 << 3)
#define GLOB_NOCHECK (1 << 4)
#define GLOB_APPEND (1 << 5)
#define GLOB_NOESCAPE (1 << 6)
#define GLOB_PERIOD (1 << 7)
#if !defined __USE_POSIX2 || defined __USE_BSD || defined __USE_GNU
# define GLOB_MAGCHAR (1 << 8)
# define GLOB_ALTDIRFUNC (1 << 9)
# define GLOB_BRACE (1 << 10)
# define GLOB_NOMAGIC (1 << 11)
# define GLOB_TILDE (1 << 12)
# define GLOB_ONLYDIR (1 << 13)
# define GLOB_TILDE_CHECK (1 << 14)
# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
#else
# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \
GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \
GLOB_PERIOD)
#endif
#define GLOB_NOSPACE 1
#define GLOB_ABORTED 2
#define GLOB_NOMATCH 3
#define GLOB_NOSYS 4
#ifdef __USE_GNU
# define GLOB_ABEND GLOB_ABORTED
#endif
#ifdef __USE_GNU
struct stat;
#endif
typedef struct
{
__size_t gl_pathc;
char **gl_pathv;
__size_t gl_offs;
int gl_flags;
void (*gl_closedir) (void *);
#ifdef __USE_GNU
struct dirent *(*gl_readdir) (void *);
#else
void *(*gl_readdir) (void *);
#endif
void *(*gl_opendir) (__const char *);
#ifdef __USE_GNU
int (*gl_lstat) (__const char *__restrict, struct stat *__restrict);
int (*gl_stat) (__const char *__restrict, struct stat *__restrict);
#else
int (*gl_lstat) (__const char *__restrict, void *__restrict);
int (*gl_stat) (__const char *__restrict, void *__restrict);
#endif
} glob_t;
#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB
# ifdef __USE_GNU
struct stat64;
# endif
typedef struct
{
__size_t gl_pathc;
char **gl_pathv;
__size_t gl_offs;
int gl_flags;
void (*gl_closedir) (void *);
# ifdef __USE_GNU
struct dirent64 *(*gl_readdir) (void *);
# else
void *(*gl_readdir) (void *);
# endif
void *(*gl_opendir) (__const char *);
# ifdef __USE_GNU
int (*gl_lstat) (__const char *__restrict, struct stat64 *__restrict);
int (*gl_stat) (__const char *__restrict, struct stat64 *__restrict);
# else
int (*gl_lstat) (__const char *__restrict, void *__restrict);
int (*gl_stat) (__const char *__restrict, void *__restrict);
# endif
} glob64_t;
#endif
#if __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
# define glob glob64
# define globfree globfree64
#endif
#if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2 || defined __GLOB_GNULIB
extern int glob (__const char *__restrict __pattern, int __flags,
int (*__errfunc) (__const char *, int),
glob_t *__restrict __pglob) __THROW;
extern void globfree (glob_t *__pglob) __THROW;
#else
extern int __REDIRECT_NTH (glob, (__const char *__restrict __pattern,
int __flags,
int (*__errfunc) (__const char *, int),
glob_t *__restrict __pglob), glob64);
extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
#endif
#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB
extern int glob64 (__const char *__restrict __pattern, int __flags,
int (*__errfunc) (__const char *, int),
glob64_t *__restrict __pglob) __THROW;
extern void globfree64 (glob64_t *__pglob) __THROW;
#endif
#ifdef __USE_GNU
extern int glob_pattern_p (__const char *__pattern, int __quote) __THROW;
#endif
__END_DECLS
#endif