1#ifndef __VSF_LINUX_DIRENT_H__
2#define __VSF_LINUX_DIRENT_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
16#if VSF_LINUX_CFG_WRAPPER == ENABLED
17#define opendir VSF_LINUX_WRAPPER(opendir)
18#define fdopendir VSF_LINUX_WRAPPER(fdopendir)
19#define readdir VSF_LINUX_WRAPPER(readdir)
20#define readdir64 VSF_LINUX_WRAPPER(readdir64)
21#define readdir_r VSF_LINUX_WRAPPER(readdir_r)
22#define readdir64_r VSF_LINUX_WRAPPER(readdir64_r)
23#define rewinddir VSF_LINUX_WRAPPER(rewinddir)
24#define telldir VSF_LINUX_WRAPPER(telldir)
25#define seekdir VSF_LINUX_WRAPPER(seekdir)
26#define closedir VSF_LINUX_WRAPPER(closedir)
27#define scandir VSF_LINUX_WRAPPER(scandir)
28#define alphasort VSF_LINUX_WRAPPER(alphasort)
29#define versionsort VSF_LINUX_WRAPPER(versionsort)
30#define scandir64 VSF_LINUX_WRAPPER(scandir64)
31#define alphasort64 VSF_LINUX_WRAPPER(alphasort64)
32#define versionsort64 VSF_LINUX_WRAPPER(versionsort64)
51#if VSF_LINUX_APPLET_USE_DIRENT == ENABLED
69# ifndef __VSF_APPLET__
74#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_DIRENT_LIB__))\
75 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_DIRENT == ENABLED
77#ifndef VSF_LINUX_APPLET_DIRENT_VPLT
78# if VSF_LINUX_USE_APPLET == ENABLED
79# define VSF_LINUX_APPLET_DIRENT_VPLT \
80 ((vsf_linux_dirent_vplt_t *)(VSF_LINUX_APPLET_VPLT->dirent_vplt))
82# define VSF_LINUX_APPLET_DIRENT_VPLT \
83 ((vsf_linux_dirent_vplt_t *)vsf_vplt((void *)0))
87#define VSF_LINUX_APPLET_DIRENT_ENTRY(__NAME) \
88 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_DIRENT_VPLT, __NAME)
89#define VSF_LINUX_APPLET_DIRENT_IMP(...) \
90 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_DIRENT_VPLT, __VA_ARGS__)
92VSF_LINUX_APPLET_DIRENT_IMP(
opendir,
DIR *,
const char *name) {
94 return VSF_LINUX_APPLET_DIRENT_ENTRY(
opendir)(name);
98 return VSF_LINUX_APPLET_DIRENT_ENTRY(
fdopendir)(fd);
102 return VSF_LINUX_APPLET_DIRENT_ENTRY(
readdir)(dir);
106 return VSF_LINUX_APPLET_DIRENT_ENTRY(
readdir64)(dir);
110 return VSF_LINUX_APPLET_DIRENT_ENTRY(
readdir_r)(dirp, entry, result);
114 return VSF_LINUX_APPLET_DIRENT_ENTRY(
readdir64_r)(dirp, entry, result);
118 VSF_LINUX_APPLET_DIRENT_ENTRY(
rewinddir)(dir);
120VSF_LINUX_APPLET_DIRENT_IMP(
telldir,
long,
DIR *dir) {
122 return VSF_LINUX_APPLET_DIRENT_ENTRY(
telldir)(dir);
124VSF_LINUX_APPLET_DIRENT_IMP(
seekdir,
void,
DIR *dir,
long loc) {
126 VSF_LINUX_APPLET_DIRENT_ENTRY(
seekdir)(dir, loc);
128VSF_LINUX_APPLET_DIRENT_IMP(
closedir,
int,
DIR *dir) {
130 return VSF_LINUX_APPLET_DIRENT_ENTRY(
closedir)(dir);
132VSF_LINUX_APPLET_DIRENT_IMP(
scandir,
int,
const char *dir,
struct dirent ***namelist,
int (*filter)(
const struct dirent *),
int (*compare)(
const struct dirent **,
const struct dirent **)) {
134 return VSF_LINUX_APPLET_DIRENT_ENTRY(
scandir)(dir, namelist, filter, compare);
138 return VSF_LINUX_APPLET_DIRENT_ENTRY(
alphasort)(a, b);
142 return VSF_LINUX_APPLET_DIRENT_ENTRY(
versionsort)(a, b);
158 int (*filter)(
const struct dirent *),
159 int (*compare)(
const struct dirent **,
const struct dirent **));
164 int (*filter)(
const struct dirent64 *),
Definition vsf_linux_fs.h:115
__VSF_VPLT_DECORATOR__ vsf_linux_dirent_vplt_t vsf_linux_dirent_vplt
Definition vsf_linux_fs.c:3623
#define rewinddir
Definition dirent.h:23
#define readdir64_r
Definition dirent.h:22
#define readdir
Definition dirent.h:19
#define scandir64
Definition dirent.h:30
#define readdir64
Definition dirent.h:20
#define alphasort64
Definition dirent.h:31
#define versionsort
Definition dirent.h:29
#define alphasort
Definition dirent.h:28
#define scandir
Definition dirent.h:27
#define readdir_r
Definition dirent.h:21
#define fdopendir
Definition dirent.h:18
#define seekdir
Definition dirent.h:25
#define versionsort64
Definition dirent.h:32
#define opendir
Definition dirent.h:17
#define telldir
Definition dirent.h:24
#define closedir
Definition dirent.h:26
unsigned long long ino64_t
Definition types.h:100
long long off64_t
Definition types.h:97
long off_t
Definition types.h:95
unsigned long ino_t
Definition types.h:99
char d_name[256]
Definition dirent.h:47
off64_t d_off
Definition dirent.h:44
unsigned char d_type
Definition dirent.h:46
unsigned short d_reclen
Definition dirent.h:45
ino64_t d_ino
Definition dirent.h:43
unsigned short d_reclen
Definition dirent.h:38
ino_t d_ino
Definition dirent.h:36
unsigned char d_type
Definition dirent.h:39
char d_name[256]
Definition dirent.h:40
off_t d_off
Definition dirent.h:37
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(scandir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(alphasort)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(versionsort)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fdopendir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(readdir64_r)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(readdir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(seekdir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(opendir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(closedir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(readdir_r)
vsf_vplt_info_t info
Definition dirent.h:53
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(rewinddir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(telldir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(readdir64)
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165