aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/bits
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-10-10 00:56:17 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-10-10 00:56:17 +0000
commit2a4b25fad858ccae361afca6d4710e0e6b01b2b5 (patch)
treeade90f410482f12ecd13d7930adffcfc047bc475 /sysdeps/unix/sysv/linux/bits
parent19e62f26901febce98e34d81eb40323dcc835cd3 (diff)
downloadglibc-2a4b25fad858ccae361afca6d4710e0e6b01b2b5.tar
glibc-2a4b25fad858ccae361afca6d4710e0e6b01b2b5.tar.gz
glibc-2a4b25fad858ccae361afca6d4710e0e6b01b2b5.tar.bz2
glibc-2a4b25fad858ccae361afca6d4710e0e6b01b2b5.zip
Use common bits/shm.h for more architectures.
sysdeps/unix/sysv/linux/bits/shm.h has padding after time fields in struct shmid_ds unconditionally, and thus is only suitable for 32-bit architectures (no 64-bit configurations use this file); sysdeps/unix/sysv/linux/generic/bits/shm.h is substantively the same, except that the padding is conditioned on __WORDSIZE == 32, and so it can be used for 64-bit architectures as well. This patch adds the conditionals to sysdeps/unix/sysv/linux/bits/shm.h. The linux/generic/ version is then no longer needed and so is removed, as are the alpha and s390 versions which are also no longer needed. The other architecture-specific versions have different padding, layout, types or SHMLBA definitions and so are still needed after this change. This is essentially the same change for bits/shm.h as the bits/msq.h patch and the bits/sem.h patch. However, the details of the padding variations for the architectures that aren't changed are not all the same between msqid_ds, shmid_ds and semid_ds. Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/bits/shm.h: Include <bits/wordsize.h>. (struct shmid_ds): Condition padding after time fields on [__WORDSIZE == 32]. * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Remove file. * sysdeps/unix/sysv/linux/generic/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r--sysdeps/unix/sysv/linux/bits/shm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/shm.h b/sysdeps/unix/sysv/linux/bits/shm.h
index 896c1d96bf..0f10d94f1f 100644
--- a/sysdeps/unix/sysv/linux/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/bits/shm.h
@@ -20,6 +20,7 @@
#endif
#include <bits/types.h>
+#include <bits/wordsize.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -51,11 +52,17 @@ struct shmid_ds
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
__time_t shm_atime; /* time of last shmat() */
+#if __WORDSIZE == 32
unsigned long int __glibc_reserved1;
+#endif
__time_t shm_dtime; /* time of last shmdt() */
+#if __WORDSIZE == 32
unsigned long int __glibc_reserved2;
+#endif
__time_t shm_ctime; /* time of last change by shmctl() */
+#if __WORDSIZE == 32
unsigned long int __glibc_reserved3;
+#endif
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */