1f90e74c3df9a2eb6735057e0609b2797393fead
[libc-test] / src / api / spawn.c
1 #include <spawn.h>
2 #define T(t) (t*)0;
3 #define C(n) switch(n){case n:;}
4 static void f()
5 {
6 T(posix_spawnattr_t)
7 T(posix_spawn_file_actions_t)
8 T(mode_t)
9 T(pid_t)
10 T(sigset_t)
11 T(struct sched_param)
12 C(POSIX_SPAWN_RESETIDS)
13 C(POSIX_SPAWN_SETPGROUP)
14 C(POSIX_SPAWN_SETSCHEDPARAM)
15 C(POSIX_SPAWN_SETSCHEDULER)
16 C(POSIX_SPAWN_SETSIGDEF)
17 C(POSIX_SPAWN_SETSIGMASK)
18 int(*p_posix_spawn)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawn;
19 int(*p_posix_spawn_file_actions_addclose)(posix_spawn_file_actions_t*,int) = posix_spawn_file_actions_addclose;
20 int(*p_posix_spawn_file_actions_adddup2)(posix_spawn_file_actions_t*,int,int) = posix_spawn_file_actions_adddup2;
21 int(*p_posix_spawn_file_actions_addopen)(posix_spawn_file_actions_t*restrict,int,const char*restrict,int,mode_t) = posix_spawn_file_actions_addopen;
22 int(*p_posix_spawn_file_actions_destroy)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_destroy;
23 int(*p_posix_spawn_file_actions_init)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_init;
24 int(*p_posix_spawnattr_destroy)(posix_spawnattr_t*) = posix_spawnattr_destroy;
25 int(*p_posix_spawnattr_getflags)(const posix_spawnattr_t*restrict,short*restrict) = posix_spawnattr_getflags;
26 int(*p_posix_spawnattr_getpgroup)(const posix_spawnattr_t*restrict,pid_t*restrict) = posix_spawnattr_getpgroup;
27 int(*p_posix_spawnattr_init)(posix_spawnattr_t*) = posix_spawnattr_init;
28 int(*p_posix_spawnattr_setflags)(posix_spawnattr_t*,short) = posix_spawnattr_setflags;
29 int(*p_posix_spawnattr_setpgroup)(posix_spawnattr_t*,pid_t) = posix_spawnattr_setpgroup;
30 int(*p_posix_spawnp)(pid_t*restrict,const char*restrict,const posix_spawn_file_actions_t*,const posix_spawnattr_t*restrict,char*const[restrict],char*const[restrict]) = posix_spawnp;
31 }
32 #include <signal.h>
33 static void g()
34 {
35 int(*p_posix_spawnattr_getsigdefault)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigdefault;
36 int(*p_posix_spawnattr_getsigmask)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigmask;
37 int(*p_posix_spawnattr_setsigdefault)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigdefault;
38 int(*p_posix_spawnattr_setsigmask)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigmask;
39 }
40 #include <sched.h>
41 static void h()
42 {
43 int(*p_posix_spawnattr_getschedparam)(const posix_spawnattr_t*restrict,struct sched_param*restrict) = posix_spawnattr_getschedparam;
44 int(*p_posix_spawnattr_getschedpolicy)(const posix_spawnattr_t*restrict,int*restrict) = posix_spawnattr_getschedpolicy;
45 int(*p_posix_spawnattr_setschedparam)(posix_spawnattr_t*restrict,const struct sched_param*restrict) = posix_spawnattr_setschedparam;
46 int(*p_posix_spawnattr_setschedpolicy)(posix_spawnattr_t*,int) = posix_spawnattr_setschedpolicy;
47 }