/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* */ #ifndef ←←XR←sys←ipc←h #define ←←XR←sys←ipc←h #include <config/PCR←OS.h> #include <sys/ipc.h> struct XR←ipc←perm { unsigned short uid; /* owner's user id */ unsigned short gid; /* owner's group id */ unsigned short cuid; /* creator's user id */ unsigned short cgid; /* creator's group id */ unsigned short mode; /* access modes */ unsigned short seq; /* slot usage sequence number */ XR←key←t key; /* key */ }; /* Common IPC Definitions. */ /* Flags bits. */ #define XR←IPC←ALLOC 0100000 /* entry currently allocated */ #define XR←IPC←CREAT 0001000 /* create entry if key doesn't exist */ #define XR←IPC←EXCL 0002000 /* fail if key exists */ #define XR←IPC←NOWAIT 0004000 /* error if request must wait */ /* Keys. */ #define XR←IPC←PRIVATE (XR←key←t)0 /* private key */ /* Control Commands. */ #define XR←IPC←RMID 0 /* remove identifier */ #define XR←IPC←SET 1 /* set options */ #define XR←IPC←STAT 2 /* get options */ #if defined(PCR←OS←SUNOS4) # define XR←sys←ipc←KeyToHost(key) (key) # define XR←sys←ipc←CmdToHost(cmd) (cmd) # define XR←sys←ipc←FlagsToHost(flags) (flags) extern void XR←sys←ipc←PermToHost(struct ipc←perm *hp, struct XR←ipc←perm *xp); extern void XR←sys←ipc←PermFromHost(struct XR←ipc←perm *xp, struct ipc←perm *hp); #elif defined(PCR←OS←SUNOS5) # define XR←sys←ipc←KeyToHost(key) (key) # define XR←sys←ipc←FlagsToHost(flags) (flags) extern int XR←sys←ipc←CmdToHost(int cmd); extern void XR←sys←ipc←PermToHost(struct ipc←perm *hp, struct XR←ipc←perm *xp); extern void XR←sys←ipc←PermFromHost(struct XR←ipc←perm *xp, struct ipc←perm *hp); #else # error os ? #endif #endif /*!←←XR←sys←ipc←h*/