summaryrefslogtreecommitdiffstats
path: root/sys/sys/ipc.h
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-10-14 20:50:41 +0000
committermike <mike@FreeBSD.org>2002-10-14 20:50:41 +0000
commiteb03e03ed45fe867029773dcf161dd8a873450e0 (patch)
treed2812f9e82bd9256fe947c18267fdbf8000a61c5 /sys/sys/ipc.h
parent10d4187daf3212cefee57cf07056f8b15458af71 (diff)
downloadFreeBSD-src-eb03e03ed45fe867029773dcf161dd8a873450e0.zip
FreeBSD-src-eb03e03ed45fe867029773dcf161dd8a873450e0.tar.gz
o Add typedefs for gid_t, key_t, mode_t, and uid_t.
o Add comment about ipc_perm's members. o Add some visibility conditionals for non-standard extentions. o Remove a comment about ftok() not belonging.
Diffstat (limited to 'sys/sys/ipc.h')
-rw-r--r--sys/sys/ipc.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h
index 96b3951..9a094f1 100644
--- a/sys/sys/ipc.h
+++ b/sys/sys/ipc.h
@@ -50,6 +50,32 @@
#ifndef _SYS_IPC_H_
#define _SYS_IPC_H_
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t;
+#define _GID_T_DECLARED
+#endif
+
+#ifndef _KEY_T_DECLARED
+typedef __key_t key_t;
+#define _KEY_T_DECLARED
+#endif
+
+#ifndef _MODE_T_DECLARED
+typedef __mode_t mode_t;
+#define _MODE_T_DECLARED
+#endif
+
+#ifndef _UID_T_DECLARED
+typedef __uid_t uid_t;
+#define _UID_T_DECLARED
+#endif
+
+/*
+ * XXX almost all members have wrong types.
+ */
struct ipc_perm {
ushort cuid; /* creator user id */
ushort cgid; /* creator group id */
@@ -60,10 +86,12 @@ struct ipc_perm {
key_t key; /* user specified msg/sem/shm key */
};
+#if __BSD_VISIBLE
/* common mode bits */
#define IPC_R 000400 /* read permission */
#define IPC_W 000200 /* write/alter permission */
#define IPC_M 010000 /* permission to change control info */
+#endif
/* SVID required constants (same values as system 5) */
#define IPC_CREAT 001000 /* create entry if key does not exist */
@@ -75,7 +103,9 @@ struct ipc_perm {
#define IPC_RMID 0 /* remove identifier */
#define IPC_SET 1 /* set options */
#define IPC_STAT 2 /* get options */
+#if __BSD_VISIBLE
#define IPC_INFO 3 /* get info */
+#endif
#ifdef _KERNEL
/* Macros to convert between ipc ids and array indices or sequence ids */
@@ -92,10 +122,6 @@ extern void (*shmexit_hook)(struct proc *);
#else /* ! _KERNEL */
-/* XXX doesn't really belong here, but has been historical practice in SysV. */
-
-#include <sys/cdefs.h>
-
__BEGIN_DECLS
key_t ftok(const char *, int);
__END_DECLS
OpenPOWER on IntegriCloud