1#ifndef __VSF_LINUX_GLOB_H__
2#define __VSF_LINUX_GLOB_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED && VSF_LINUX_USE_SIMPLE_LIBC == ENABLED
7# include "../sys/stat.h"
18#if VSF_LINUX_CFG_WRAPPER == ENABLED
19#define glob VSF_LINUX_WRAPPER(glob)
20#define globfree VSF_LINUX_WRAPPER(globfree)
25#define GLOB_ERR (1 << 0)
26#define GLOB_MARK (1 << 1)
27#define GLOB_NOSORT (1 << 2)
28#define GLOB_DOOFFS (1 << 3)
29#define GLOB_NOCHECK (1 << 4)
30#define GLOB_APPEND (1 << 5)
31#define GLOB_NOESCAPE (1 << 6)
32#define GLOB_PERIOD (1 << 7)
33#define GLOB_MAGCHAR (1 << 8)
34#define GLOB_ALTDIRFUNC (1 << 9)
35#define GLOB_BRACE (1 << 10)
36#define GLOB_NOMAGIC (1 << 11)
37#define GLOB_TILDE (1 << 12)
38#define GLOB_ONLYDIR (1 << 13)
39#define GLOB_TILDE_CHECK (1 << 14)
54 void (*gl_closedir)(
void *);
55 struct dirent *(*gl_readdir)(
void *);
56 void *(*gl_opendir)(
const char *);
57 int (*gl_lstat)(
const char *,
struct stat *);
58 int (*gl_stat)(
const char *,
struct stat *);
61#if VSF_LINUX_APPLET_USE_GLOB == ENABLED
68# ifndef __VSF_APPLET__
73#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_GLOB_LIB__))\
74 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_GLOB == ENABLED
76#ifndef VSF_LINUX_APPLET_GLOB_VPLT
77# if VSF_LINUX_USE_APPLET == ENABLED
78# define VSF_LINUX_APPLET_GLOB_VPLT \
79 ((vsf_linux_glob_vplt_t *)(VSF_LINUX_APPLET_VPLT->glob_vplt))
81# define VSF_LINUX_APPLET_GLOB_VPLT \
82 ((vsf_linux_glob_vplt_t *)vsf_vplt((void *)0))
86#define VSF_LINUX_APPLET_GLOB_ENTRY(__NAME) \
87 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_GLOB_VPLT, __NAME)
88#define VSF_LINUX_APPLET_GLOB_IMP(...) \
89 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_GLOB_VPLT, __VA_ARGS__)
91VSF_LINUX_APPLET_GLOB_IMP(
glob,
int,
const char *path,
int flags,
int (*errfunc)(
const char *path,
int err),
glob_t *g) {
93 return VSF_LINUX_APPLET_GLOB_ENTRY(
glob)(path, flags, errfunc, g);
97 return VSF_LINUX_APPLET_GLOB_ENTRY(
globfree)(g);
102int glob(
const char *path,
int flags,
int (*errfunc)(
const char *path,
int err),
glob_t *g);
#define globfree
Definition glob.h:20
__VSF_VPLT_DECORATOR__ vsf_linux_glob_vplt_t vsf_linux_glob_vplt
Definition vsf_linux.c:5305
#define glob
Definition glob.h:19
int gl_flags
Definition glob.h:52
size_t gl_pathc
Definition glob.h:49
char ** gl_pathv
Definition glob.h:50
size_t gl_offs
Definition glob.h:51
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(globfree)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(glob)
vsf_vplt_info_t info
Definition glob.h:63
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165