Flesh out <sys/msg.h>, <sys/sem.h>, <sys/shm.h>.
Also fix <sys/ipc.h>.
Not useful except to systems/bringup folks for testing. Trivial tests
added, and double-checked under strace to see that things look right.
x86 -- which works differently to everything else -- tested on the host.
Bug: http://b/27952303
Change-Id: I328534e994ae9e90755f545478fba03038c0bb94
diff --git a/libc/include/sys/msg.h b/libc/include/sys/msg.h
index 73965f2..f746bb5 100644
--- a/libc/include/sys/msg.h
+++ b/libc/include/sys/msg.h
@@ -30,6 +30,22 @@
#define _SYS_MSG_H_
#include <sys/cdefs.h>
+#include <sys/ipc.h>
+
#include <linux/msg.h>
+#define msqid_ds msqid64_ds
+
+__BEGIN_DECLS
+
+typedef __kernel_ulong_t msgqnum_t;
+typedef __kernel_ulong_t msglen_t;
+
+int msgctl(int, int, struct msqid_ds*) __INTRODUCED_IN_FUTURE;
+int msgget(key_t, int) __INTRODUCED_IN_FUTURE;
+ssize_t msgrcv(int, void*, size_t, long, int) __INTRODUCED_IN_FUTURE;
+int msgsnd(int, const void*, size_t, int) __INTRODUCED_IN_FUTURE;
+
+__END_DECLS
+
#endif /* _SYS_MSG_H_ */