regex memory corruption regression test
[libc-test] / src / api / pwd.c
1 #include <pwd.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 static void f()
5 {
6 T(gid_t)
7 T(uid_t)
8 T(size_t)
9 {
10 struct passwd x;
11 F(char*,pw_name)
12 F(uid_t,pw_uid)
13 F(gid_t,pw_gid)
14 F(char*,pw_dir)
15 F(char*,pw_shell)
16 }
17 {struct passwd*(*p)(const char*) = getpwnam;}
18 {int(*p)(const char*,struct passwd*,char*,size_t,struct passwd**) = getpwnam_r;}
19 {struct passwd*(*p)(uid_t) = getpwuid;}
20 {int(*p)(uid_t,struct passwd*,char*,size_t,struct passwd**) = getpwuid_r;}
21 #ifdef _XOPEN_SOURCE
22 {void(*p)(void) = endpwent;}
23 {struct passwd*(*p)(void) = getpwent;}
24 {void(*p)(void) = setpwent;}
25 #endif
26 }