1570af302Sopenharmony_ci#include <sys/shm.h>
2570af302Sopenharmony_ci#define T(t) (t*)0;
3570af302Sopenharmony_ci#define F(t,n) {t *y = &x.n;}
4570af302Sopenharmony_ci#define C(n) switch(n){case n:;}
5570af302Sopenharmony_cistatic void f()
6570af302Sopenharmony_ci{
7570af302Sopenharmony_ciT(shmatt_t)
8570af302Sopenharmony_ciT(pid_t)
9570af302Sopenharmony_ciT(size_t)
10570af302Sopenharmony_ciT(time_t)
11570af302Sopenharmony_ciC(SHM_RDONLY)
12570af302Sopenharmony_ciC(SHM_RND)
13570af302Sopenharmony_ciC(SHMLBA)
14570af302Sopenharmony_ci{
15570af302Sopenharmony_cistruct shmid_ds x;
16570af302Sopenharmony_ciF(struct ipc_perm, shm_perm)
17570af302Sopenharmony_ciF(size_t,shm_segsz)
18570af302Sopenharmony_ciF(pid_t, shm_lpid)
19570af302Sopenharmony_ciF(pid_t, shm_cpid)
20570af302Sopenharmony_ciF(shmatt_t,shm_nattch)
21570af302Sopenharmony_ciF(time_t,shm_atime)
22570af302Sopenharmony_ciF(time_t,shm_dtime)
23570af302Sopenharmony_ciF(time_t,shm_ctime)
24570af302Sopenharmony_ci}
25570af302Sopenharmony_ci{void*(*p)(int,const void*,int) = shmat;}
26570af302Sopenharmony_ci{int(*p)(int,int,struct shmid_ds*) = shmctl;}
27570af302Sopenharmony_ci{int(*p)(const void*) = shmdt;}
28570af302Sopenharmony_ci{int(*p)(key_t,size_t,int) = shmget;}
29570af302Sopenharmony_ci
30570af302Sopenharmony_ciT(uid_t)
31570af302Sopenharmony_ciT(gid_t)
32570af302Sopenharmony_ciT(mode_t)
33570af302Sopenharmony_ciT(key_t)
34570af302Sopenharmony_ci{
35570af302Sopenharmony_cistruct ipc_perm x;
36570af302Sopenharmony_ciF(uid_t,uid)
37570af302Sopenharmony_ciF(gid_t,gid)
38570af302Sopenharmony_ciF(uid_t,cuid)
39570af302Sopenharmony_ciF(gid_t,cgid)
40570af302Sopenharmony_ciF(mode_t, mode)
41570af302Sopenharmony_ci}
42570af302Sopenharmony_ciC(IPC_CREAT)
43570af302Sopenharmony_ciC(IPC_EXCL)
44570af302Sopenharmony_ciC(IPC_NOWAIT)
45570af302Sopenharmony_ciC(IPC_PRIVATE)
46570af302Sopenharmony_ciC(IPC_RMID)
47570af302Sopenharmony_ciC(IPC_SET)
48570af302Sopenharmony_ciC(IPC_STAT)
49570af302Sopenharmony_ci{key_t(*p)(const char*,int) = ftok;}
50570af302Sopenharmony_ci}
51