Blame src/api/dirent.c

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 0ef264
{int(*p)(const struct dirent**,const struct dirent**) = alphasort;}
nsz 0ef264
{int(*p)(DIR*) = closedir;}
nsz 0ef264
{int(*p)(DIR*) = dirfd;}
nsz edcdab
{DIR*(*p)(int) = fdopendir;}
nsz edcdab
{DIR*(*p)(const char*) = opendir;}
nsz 0ef264
{struct dirent*(*p)(DIR*) = readdir;}
nsz 0ef264
{int(*p)(DIR*restrict,struct dirent*restrict,struct dirent**restrict) = readdir_r;}
nsz 0ef264
{void(*p)(DIR*) = rewinddir;}
nsz 0ef264
{int(*p)(const char*,struct dirent***,int(*)(const struct dirent*),int(*)(const struct dirent**,const struct dirent**)) = scandir;}
nsz e19254
#ifdef _XOPEN_SOURCE
nsz 0ef264
{void(*p)(DIR*,long) = seekdir;}
nsz 0ef264
{long(*p)(DIR*) = telldir;}
nsz e19254
#endif
nsz e19254
}