move IPC_STAT definition to a new bits/ipcstat.h file

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.
This commit is contained in:
Rich Felker 2019-07-31 20:35:37 -04:00
parent 3541925fb1
commit 006a75a997
11 changed files with 11 additions and 3 deletions

1
arch/arm/bits/ipcstat.h Normal file
View File

@ -0,0 +1 @@
#define IPC_STAT 2

View File

@ -0,0 +1 @@
#define IPC_STAT 2

1
arch/i386/bits/ipcstat.h Normal file
View File

@ -0,0 +1 @@
#define IPC_STAT 2

1
arch/m68k/bits/ipcstat.h Normal file
View File

@ -0,0 +1 @@
#define IPC_STAT 2

View File

@ -0,0 +1 @@
#define IPC_STAT 2

1
arch/mips/bits/ipcstat.h Normal file
View File

@ -0,0 +1 @@
#define IPC_STAT 2

View File

@ -0,0 +1 @@
#define IPC_STAT 2

1
arch/or1k/bits/ipcstat.h Normal file
View File

@ -0,0 +1 @@
#define IPC_STAT 2

View File

@ -0,0 +1 @@
#define IPC_STAT 2

1
arch/sh/bits/ipcstat.h Normal file
View File

@ -0,0 +1 @@
#define IPC_STAT 2

View File

@ -22,6 +22,7 @@ extern "C" {
#endif #endif
#include <bits/ipc.h> #include <bits/ipc.h>
#include <bits/ipcstat.h>
#define IPC_CREAT 01000 #define IPC_CREAT 01000
#define IPC_EXCL 02000 #define IPC_EXCL 02000
@ -29,9 +30,6 @@ extern "C" {
#define IPC_RMID 0 #define IPC_RMID 0
#define IPC_SET 1 #define IPC_SET 1
#ifndef IPC_STAT
#define IPC_STAT 2
#endif
#define IPC_INFO 3 #define IPC_INFO 3
#define IPC_PRIVATE ((key_t) 0) #define IPC_PRIVATE ((key_t) 0)