fix api tests (add some obsolete symbols fix wchar tests)
[libc-test] / src / api / sys_resource.c
1 #include <sys/resource.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
6 {
7 T(rlim_t)
8 T(id_t)
9 T(struct timeval)
10 C(PRIO_PROCESS)
11 C(PRIO_PGRP)
12 C(PRIO_USER)
13 C(RLIM_INFINITY)
14 C(RLIM_SAVED_MAX)
15 C(RLIM_SAVED_CUR)
16 C(RUSAGE_SELF)
17 C(RUSAGE_CHILDREN)
18 {
19 struct rlimit x;
20 F(rlim_t, rlim_cur)
21 F(rlim_t, rlim_max)
22 }
23 {
24 struct rusage x;
25 F(struct timeval, ru_utime)
26 F(struct timeval, ru_stime)
27 }
28 C(RLIMIT_CORE)
29 C(RLIMIT_CPU)
30 C(RLIMIT_DATA)
31 C(RLIMIT_FSIZE)
32 C(RLIMIT_NOFILE)
33 C(RLIMIT_STACK)
34 C(RLIMIT_AS)
35 {int(*p)(int,id_t) = getpriority;}
36 {int(*p)(int,struct rlimit*) = getrlimit;}
37 {int(*p)(int,struct rusage*) = getrusage;}
38 {int(*p)(int,id_t,int) = setpriority;}
39 {int(*p)(int,const struct rlimit*) = setrlimit;}
40 }