|
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 |
0ef264 |
{struct passwd*(*p)(const char*) = getpwnam;}
|
|
nsz |
0ef264 |
{int(*p)(const char*,struct passwd*,char*,size_t,struct passwd**) = getpwnam_r;}
|
|
nsz |
0ef264 |
{struct passwd*(*p)(uid_t) = getpwuid;}
|
|
nsz |
0ef264 |
{int(*p)(uid_t,struct passwd*,char*,size_t,struct passwd**) = getpwuid_r;}
|
|
nsz |
d7c151 |
#ifdef _XOPEN_SOURCE
|
|
nsz |
0ef264 |
{void(*p)(void) = endpwent;}
|
|
nsz |
0ef264 |
{struct passwd*(*p)(void) = getpwent;}
|
|
nsz |
0ef264 |
{void(*p)(void) = setpwent;}
|
|
nsz |
d7c151 |
#endif
|
|
nsz |
d7c151 |
}
|