move IPC_STAT definition to a new bits/ipcstat.h file
authorRich Felker <dalias@aerifal.cx>
Thu, 1 Aug 2019 00:35:37 +0000 (20:35 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2019 04:08:23 +0000 (00:08 -0400)
otherwise, 32-bit archs that could otherwise share the generic
bits/ipc.h would need to duplicate the struct ipc_perm definition,
obscuring the fact that it's the same. sysvipc is not widely used and
these headers are not commonly included, so there is no performance
gain to be had by limiting the number of indirectly included files
here.

files with the existing time32 definition of IPC_STAT are added to all
current 32-bit archs now, so that when it's changed the change will
show up as a change rather than addition of a new file where it's less
obvious that the value is changing vs the generic one that was used
before.

arch/arm/bits/ipcstat.h [new file with mode: 0644]
arch/generic/bits/ipcstat.h [new file with mode: 0644]
arch/i386/bits/ipcstat.h [new file with mode: 0644]
arch/m68k/bits/ipcstat.h [new file with mode: 0644]
arch/microblaze/bits/ipcstat.h [new file with mode: 0644]
arch/mips/bits/ipcstat.h [new file with mode: 0644]
arch/mipsn32/bits/ipcstat.h [new file with mode: 0644]
arch/or1k/bits/ipcstat.h [new file with mode: 0644]
arch/powerpc/bits/ipcstat.h [new file with mode: 0644]
arch/sh/bits/ipcstat.h [new file with mode: 0644]
include/sys/ipc.h

diff --git a/arch/arm/bits/ipcstat.h b/arch/arm/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/generic/bits/ipcstat.h b/arch/generic/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/i386/bits/ipcstat.h b/arch/i386/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/m68k/bits/ipcstat.h b/arch/m68k/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/microblaze/bits/ipcstat.h b/arch/microblaze/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/mips/bits/ipcstat.h b/arch/mips/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/mipsn32/bits/ipcstat.h b/arch/mipsn32/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/or1k/bits/ipcstat.h b/arch/or1k/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/powerpc/bits/ipcstat.h b/arch/powerpc/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
diff --git a/arch/sh/bits/ipcstat.h b/arch/sh/bits/ipcstat.h
new file mode 100644 (file)
index 0000000..0018ad1
--- /dev/null
@@ -0,0 +1 @@
+#define IPC_STAT 2
index cde376fcf8e03f3bde877dff205dd6f4a7afbd06..9e366b7bed0499abed8cacb13a4e64faedad79d1 100644 (file)
@@ -22,6 +22,7 @@ extern "C" {
 #endif
 
 #include <bits/ipc.h>
+#include <bits/ipcstat.h>
 
 #define IPC_CREAT  01000
 #define IPC_EXCL   02000
@@ -29,9 +30,6 @@ extern "C" {
 
 #define IPC_RMID 0
 #define IPC_SET  1
-#ifndef IPC_STAT
-#define IPC_STAT 2
-#endif
 #define IPC_INFO 3
 
 #define IPC_PRIVATE ((key_t) 0)