1 #include <sys/ipc.h> 2 #define T(t) (t*)0; 3 #define F(t,n) {t *y = &x.n;} 4 #define C(n) switch(n){case n:;} f()5static void f() 6 { 7 T(uid_t) 8 T(gid_t) 9 T(mode_t) 10 T(key_t) 11 { 12 struct ipc_perm x; 13 F(uid_t,uid) 14 F(gid_t,gid) 15 F(uid_t,cuid) 16 F(gid_t,cgid) 17 F(mode_t, mode) 18 } 19 C(IPC_CREAT) 20 C(IPC_EXCL) 21 C(IPC_NOWAIT) 22 C(IPC_PRIVATE) 23 C(IPC_RMID) 24 C(IPC_SET) 25 C(IPC_STAT) 26 {key_t(*p)(const char*,int) = ftok;} 27 } 28