Blame src/api/pwd.c

nsz d7c151
#include <pwd.h>
nsz d7c151
#define T(t) (t*)0;
nsz d7c151
#define F(t,n) {t *y = &x.;;}
nsz d7c151
static void f()
nsz d7c151
{
nsz d7c151
T(gid_t)
nsz d7c151
T(uid_t)
nsz d7c151
T(size_t)
nsz d7c151
{
nsz d7c151
struct passwd x;
nsz d7c151
F(char*,pw_name)
nsz d7c151
F(uid_t,pw_uid)
nsz d7c151
F(gid_t,pw_gid)
nsz d7c151
F(char*,pw_dir)
nsz d7c151
F(char*,pw_shell)
nsz d7c151
}
nsz d7c151
struct passwd*(*p_getpwnam)(const char*) = getpwnam;
nsz d7c151
int(*p_getpwnam_r)(const char*,struct passwd*,char*,size_t,struct passwd**) = getpwnam_r;
nsz d7c151
struct passwd*(*p_getpwuid)(uid_t) = getpwuid;
nsz d7c151
int(*p_getpwuid_r)(uid_t,struct passwd*,char*,size_t,struct passwd**) = getpwuid_r;
nsz d7c151
#ifdef _XOPEN_SOURCE
nsz d7c151
void(*p_endpwent)(void) = endpwent;
nsz d7c151
struct passwd*(*p_getpwent)(void) = getpwent;
nsz d7c151
void(*p_setpwent)(void) = setpwent;
nsz d7c151
#endif
nsz d7c151
}