- 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 GLOB_PREFIX && defined __USE_LARGEFILE64
-# ifdef __USE_GNU
-struct stat64;
-# endif
-typedef struct
- {
- __size_t gl_pathc;
- char **gl_pathv;
- __size_t gl_offs;
- int gl_flags;
-
- /* If the GLOB_ALTDIRFUNC flag is set, the following functions
- are used instead of the normal file access functions. */
- 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
-
-#ifdef GLOB_PREFIX
-# define __GLOB_CONCAT(x, y) x ## y
-# define __GLOB_XCONCAT(x, y) __GLOB_CONCAT (x, y)
-# define __GLOB_ID(y) __GLOB_XCONCAT (GLOB_PREFIX, y)
-# define glob __GLOB_ID (glob)
-# define globfree __GLOB_ID (globfree)
-# define glob_pattern_p __GLOB_ID (glob_pattern_p)
-#else
-# if __USE_FILE_OFFSET64 && __GNUC__ < 2
-# define glob glob64
-# define globfree globfree64
-# endif
-#endif
-
-/* Do glob searching for PATTERN, placing results in PGLOB.
- The bits defined above may be set in FLAGS.
- If a directory cannot be opened or read and ERRFUNC is not nil,
- it is called with the pathname that caused the error, and the
- `errno' value from the failing call; if it returns non-zero
- `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
- If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
- Otherwise, `glob' returns zero. */
-#if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2 || defined GLOB_PREFIX
-extern int glob (__const char *__restrict __pattern, int __flags,
- int (*__errfunc) (__const char *, int),
- glob_t *__restrict __pglob) __THROW;
-
-/* Free storage allocated in PGLOB by a previous `glob' call. */
-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 GLOB_PREFIX && defined __USE_LARGEFILE64
-extern int glob64 (__const char *__restrict __pattern, int __flags,
- int (*__errfunc) (__const char *, int),
- glob64_t *__restrict __pglob) __THROW;