1570af302Sopenharmony_ci#include <spawn.h>
2570af302Sopenharmony_ci#include "options.h"
3570af302Sopenharmony_ci#define T(t) (t*)0;
4570af302Sopenharmony_ci#define C(n) switch(n){case n:;}
5570af302Sopenharmony_cistatic void f()
6570af302Sopenharmony_ci{
7570af302Sopenharmony_ciT(posix_spawnattr_t)
8570af302Sopenharmony_ciT(posix_spawn_file_actions_t)
9570af302Sopenharmony_ciT(mode_t)
10570af302Sopenharmony_ciT(pid_t)
11570af302Sopenharmony_ciT(sigset_t)
12570af302Sopenharmony_ciT(struct sched_param)
13570af302Sopenharmony_ciC(POSIX_SPAWN_RESETIDS)
14570af302Sopenharmony_ciC(POSIX_SPAWN_SETPGROUP)
15570af302Sopenharmony_ci#ifdef POSIX_PRIORITY_SCHEDULING
16570af302Sopenharmony_ciC(POSIX_SPAWN_SETSCHEDPARAM)
17570af302Sopenharmony_ciC(POSIX_SPAWN_SETSCHEDULER)
18570af302Sopenharmony_ci#endif
19570af302Sopenharmony_ciC(POSIX_SPAWN_SETSIGDEF)
20570af302Sopenharmony_ciC(POSIX_SPAWN_SETSIGMASK)
21570af302Sopenharmony_ci{int(*p)(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;}
22570af302Sopenharmony_ci{int(*p)(posix_spawn_file_actions_t*,int) = posix_spawn_file_actions_addclose;}
23570af302Sopenharmony_ci{int(*p)(posix_spawn_file_actions_t*,int,int) = posix_spawn_file_actions_adddup2;}
24570af302Sopenharmony_ci{int(*p)(posix_spawn_file_actions_t*restrict,int,const char*restrict,int,mode_t) = posix_spawn_file_actions_addopen;}
25570af302Sopenharmony_ci{int(*p)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_destroy;}
26570af302Sopenharmony_ci{int(*p)(posix_spawn_file_actions_t*) = posix_spawn_file_actions_init;}
27570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*) = posix_spawnattr_destroy;}
28570af302Sopenharmony_ci{int(*p)(const posix_spawnattr_t*restrict,short*restrict) = posix_spawnattr_getflags;}
29570af302Sopenharmony_ci{int(*p)(const posix_spawnattr_t*restrict,pid_t*restrict) = posix_spawnattr_getpgroup;}
30570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*) = posix_spawnattr_init;}
31570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*,short) = posix_spawnattr_setflags;}
32570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*,pid_t) = posix_spawnattr_setpgroup;}
33570af302Sopenharmony_ci{int(*p)(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;}
34570af302Sopenharmony_ci}
35570af302Sopenharmony_ci#include <signal.h>
36570af302Sopenharmony_cistatic void g()
37570af302Sopenharmony_ci{
38570af302Sopenharmony_ci{int(*p)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigdefault;}
39570af302Sopenharmony_ci{int(*p)(const posix_spawnattr_t*restrict,sigset_t*restrict) = posix_spawnattr_getsigmask;}
40570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigdefault;}
41570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*restrict,const sigset_t*restrict) = posix_spawnattr_setsigmask;}
42570af302Sopenharmony_ci}
43570af302Sopenharmony_ci#ifdef POSIX_PRIORITY_SCHEDULING
44570af302Sopenharmony_ci#include <sched.h>
45570af302Sopenharmony_cistatic void h()
46570af302Sopenharmony_ci{
47570af302Sopenharmony_ci{int(*p)(const posix_spawnattr_t*restrict,struct sched_param*restrict) = posix_spawnattr_getschedparam;}
48570af302Sopenharmony_ci{int(*p)(const posix_spawnattr_t*restrict,int*restrict) = posix_spawnattr_getschedpolicy;}
49570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*restrict,const struct sched_param*restrict) = posix_spawnattr_setschedparam;}
50570af302Sopenharmony_ci{int(*p)(posix_spawnattr_t*,int) = posix_spawnattr_setschedpolicy;}
51570af302Sopenharmony_ci}
52570af302Sopenharmony_ci#endif
53