diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-10-10 00:54:27 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-10-10 00:54:27 +0000 |
commit | 19e62f26901febce98e34d81eb40323dcc835cd3 (patch) | |
tree | b919e4c4cac64f9726c9caf79a7f4b942009266f /sysdeps/unix/sysv/linux/bits | |
parent | b9c0f6c11a8c3b85b80aa72576e3e3cb751c1cff (diff) | |
download | glibc-19e62f26901febce98e34d81eb40323dcc835cd3.tar glibc-19e62f26901febce98e34d81eb40323dcc835cd3.tar.gz glibc-19e62f26901febce98e34d81eb40323dcc835cd3.tar.bz2 glibc-19e62f26901febce98e34d81eb40323dcc835cd3.zip |
Use common bits/sem.h for more architectures.
sysdeps/unix/sysv/linux/bits/sem.h has padding after time fields in
struct semid_ds unconditionally, and thus is only suitable for 32-bit
architectures (no 64-bit configurations use this file);
sysdeps/unix/sysv/linux/generic/bits/sem.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/sem.h. The linux/generic/ version is
then no longer needed and so is removed, as are the alpha, ia64 and
s390 versions which are also no longer needed. The other
architecture-specific versions have different padding or types and so
are still needed after this change.
This is essentially the same change for bits/sem.h as the bits/msq.h
patch. However, the details of the padding variations for the
architectures that aren't changed are not all the same between
msqid_ds and semid_ds.
Tested with build-many-glibcs.py.
* sysdeps/unix/sysv/linux/bits/sem.h: Include <bits/wordsize.h>.
(struct semid_ds): Condition padding after time fields on
[__WORDSIZE == 32].
* sysdeps/unix/sysv/linux/alpha/bits/sem.h: Remove file.
* sysdeps/unix/sysv/linux/generic/bits/sem.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sem.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sem.h: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/sem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/sem.h b/sysdeps/unix/sysv/linux/bits/sem.h index 7ccd600517..bf6d797080 100644 --- a/sysdeps/unix/sysv/linux/bits/sem.h +++ b/sysdeps/unix/sysv/linux/bits/sem.h @@ -20,6 +20,7 @@ #endif #include <sys/types.h> +#include <bits/wordsize.h> /* Flags for `semop'. */ #define SEM_UNDO 0x1000 /* undo the operation on exit */ @@ -39,9 +40,13 @@ struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ __time_t sem_otime; /* last semop() time */ +#if __WORDSIZE == 32 unsigned long int __glibc_reserved1; +#endif __time_t sem_ctime; /* last time changed by semctl() */ +#if __WORDSIZE == 32 unsigned long int __glibc_reserved2; +#endif unsigned long int sem_nsems; /* number of semaphores in set */ unsigned long int __glibc_reserved3; unsigned long int __glibc_reserved4; |