|
nsz |
e19254 |
#include <dirent.h>
|
|
nsz |
e19254 |
#define T(t) (t*)0;
|
|
nsz |
e19254 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
e19254 |
#define C(n) switch(n){case n:;}
|
|
nsz |
e19254 |
static void f()
|
|
nsz |
e19254 |
{
|
|
nsz |
e19254 |
T(DIR)
|
|
nsz |
e19254 |
T(struct dirent)
|
|
nsz |
e19254 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
e19254 |
T(ino_t)
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
{
|
|
nsz |
e19254 |
struct dirent x;
|
|
nsz |
e19254 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
e19254 |
F(ino_t, d_ino)
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
F(char, d_name[0])
|
|
nsz |
e19254 |
}
|
|
nsz |
e19254 |
int(*p_alphasort)(const struct dirent**,const struct dirent**) = alphasort;
|
|
nsz |
e19254 |
int(*p_closedir)(DIR*) = closedir;
|
|
nsz |
e19254 |
int(*p_dirfd)(DIR*) = dirfd;
|
|
nsz |
e19254 |
DIR*(*p_fdopendir)(int) = fdopendir;
|
|
nsz |
e19254 |
DIR*(*p_opendir)(const char*) = opendir;
|
|
nsz |
e19254 |
struct dirent*(*p_readdir)(DIR*) = readdir;
|
|
nsz |
e19254 |
int(*p_readdir_r)(DIR*restrict,struct dirent*restrict,struct dirent**restrict) = readdir_r;
|
|
nsz |
e19254 |
void(*p_rewinddir)(DIR*) = rewinddir;
|
|
nsz |
e19254 |
int(*p_scandir)(const char*,struct dirent***,int(*)(const struct dirent*),int(*)(const struct dirent**,const struct dirent**)) = scandir;
|
|
nsz |
e19254 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
e19254 |
void(*p_seekdir)(DIR*,long) = seekdir;
|
|
nsz |
e19254 |
long(*p_telldir)(DIR*) = telldir;
|
|
nsz |
e19254 |
#endif
|
|
nsz |
e19254 |
}
|