Browse Source

libc/ipc: Allow architectures to define their own __IPC_64 macro

New architectures don't define ARCH_WANT_IPC_PARSE_VERSION in their kernel.
This means that every cmd passed to semctl,msgctl and shmctl is IPC_64 by
default. For these architectures we need to define __IPC_64 as 0. Existing
architectures are not affected by this change.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras 12 years ago
parent
commit
6c2fa3451f
1 changed files with 6 additions and 4 deletions
  1. 6 4
      libc/misc/sysvipc/ipc.h

+ 6 - 4
libc/misc/sysvipc/ipc.h

@@ -3,10 +3,12 @@
 #include <syscall.h>
 #include <bits/wordsize.h>
 
-#if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
-# define __IPC_64	0x100
-#else
-# define __IPC_64	0x0
+#ifndef __IPC_64
+# if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
+#  define __IPC_64	0x100
+# else
+#  define __IPC_64	0x0
+# endif
 #endif
 
 #ifdef __NR_ipc