978e96
From f2857da7cdb65bfad75ee30981f5b2fde5bbb1dc Mon Sep 17 00:00:00 2001
978e96
From: Joseph Myers <joseph@codesourcery.com>
978e96
Date: Mon, 18 Jun 2018 13:37:57 +0000
978e96
Subject: [PATCH] Add SHM_STAT_ANY from Linux 4.17 to bits/shm.h.
978e96
978e96
Linux 4.17 adds a SHM_STAT_ANY constant (ipcs command).  This patch
978e96
adds it to the relevant bits/shm.h headers.
978e96
978e96
Tested for x86_64.
978e96
978e96
	* sysdeps/unix/sysv/linux/alpha/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): New macro.
978e96
	* sysdeps/unix/sysv/linux/arm/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/generic/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/hppa/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/ia64/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/mips/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/powerpc/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/s390/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/sh/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/sparc/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
	* sysdeps/unix/sysv/linux/x86/bits/shm.h [__USE_MISC]
978e96
	(SHM_STAT_ANY): Likewise.
978e96
---
978e96
 ChangeLog                                  | 25 ++++++++++++++++++++++
978e96
 sysdeps/unix/sysv/linux/alpha/bits/shm.h   |  1 +
978e96
 sysdeps/unix/sysv/linux/arm/bits/shm.h     |  1 +
978e96
 sysdeps/unix/sysv/linux/bits/shm.h         |  1 +
978e96
 sysdeps/unix/sysv/linux/generic/bits/shm.h |  1 +
978e96
 sysdeps/unix/sysv/linux/hppa/bits/shm.h    |  1 +
978e96
 sysdeps/unix/sysv/linux/ia64/bits/shm.h    |  1 +
978e96
 sysdeps/unix/sysv/linux/mips/bits/shm.h    |  1 +
978e96
 sysdeps/unix/sysv/linux/powerpc/bits/shm.h |  1 +
978e96
 sysdeps/unix/sysv/linux/s390/bits/shm.h    |  1 +
978e96
 sysdeps/unix/sysv/linux/sh/bits/shm.h      |  1 +
978e96
 sysdeps/unix/sysv/linux/sparc/bits/shm.h   |  1 +
978e96
 sysdeps/unix/sysv/linux/x86/bits/shm.h     |  1 +
978e96
 13 files changed, 37 insertions(+)
978e96
978e96
Index: b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
978e96
@@ -65,6 +65,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/arm/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/arm/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/arm/bits/shm.h
978e96
@@ -69,6 +69,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/bits/shm.h
978e96
@@ -68,6 +68,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/generic/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/generic/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/generic/bits/shm.h
978e96
@@ -76,6 +76,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
978e96
@@ -73,6 +73,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/ia64/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
978e96
@@ -61,6 +61,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/mips/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
978e96
@@ -62,6 +62,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT	13
978e96
 # define SHM_INFO	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
978e96
@@ -78,6 +78,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT      13
978e96
 # define SHM_INFO      14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST      01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/s390/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/s390/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/s390/bits/shm.h
978e96
@@ -75,6 +75,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT	13
978e96
 # define SHM_INFO	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/sh/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/sh/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/sh/bits/shm.h
978e96
@@ -66,6 +66,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/sparc/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
978e96
@@ -76,6 +76,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */
978e96
Index: b/sysdeps/unix/sysv/linux/x86/bits/shm.h
978e96
===================================================================
978e96
--- a/sysdeps/unix/sysv/linux/x86/bits/shm.h
978e96
+++ b/sysdeps/unix/sysv/linux/x86/bits/shm.h
978e96
@@ -74,6 +74,7 @@ struct shmid_ds
978e96
 /* ipcs ctl commands */
978e96
 # define SHM_STAT 	13
978e96
 # define SHM_INFO 	14
978e96
+# define SHM_STAT_ANY	15
978e96
 
978e96
 /* shm_mode upper byte flags */
978e96
 # define SHM_DEST	01000	/* segment will be destroyed on last detach */