* [XSI] The uid_t, gid_t, mode_t, and key_t types SHALL be defined as
* described in <sys/types.h>.
*/
-#ifndef _UID_T
-typedef __darwin_uid_t uid_t; /* user id */
-#define _UID_T
-#endif
-
-#ifndef _GID_T
-typedef __darwin_gid_t gid_t;
-#define _GID_T
-#endif
-
-#ifndef _MODE_T
-typedef __darwin_mode_t mode_t;
-#define _MODE_T
-#endif
-
-#ifndef _KEY_T
-#define _KEY_T
-typedef __int32_t key_t;
-#endif
+#include <sys/_types/_uid_t.h>
+#include <sys/_types/_gid_t.h>
+#include <sys/_types/_mode_t.h>
+#include <sys/_types/_key_t.h>
+
+
+#pragma pack(4)
/*
* Technically, we should force all code references to the new structure
};
#endif /* !__DARWIN_UNIX03 */
+#pragma pack()
+
/*
* [XSI] Definitions shall be provided for the following constants:
*/
/* Macros to convert between ipc ids and array indices or sequence ids */
#define IPCID_TO_IX(id) ((id) & 0xffff)
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
-#define IXSEQ_TO_IPCID(ix,perm) (((perm._seq) << 16L) | (ix & 0xffff))
+#define IXSEQ_TO_IPCID(ix,perm) (((perm._seq) << 16L) | ((ix) & 0xffff))
struct ucred;