diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-10-10 00:52:47 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-10-10 00:52:47 +0000 |
commit | b9c0f6c11a8c3b85b80aa72576e3e3cb751c1cff (patch) | |
tree | 469a066f6e5b30fbdf6f4e6849c5f5bffc8949e9 /sysdeps/unix/sysv/linux/bits/msq.h | |
parent | 97785a61afbb47221e5ec799a57f210ceab85cce (diff) | |
download | glibc-b9c0f6c11a8c3b85b80aa72576e3e3cb751c1cff.tar glibc-b9c0f6c11a8c3b85b80aa72576e3e3cb751c1cff.tar.gz glibc-b9c0f6c11a8c3b85b80aa72576e3e3cb751c1cff.tar.bz2 glibc-b9c0f6c11a8c3b85b80aa72576e3e3cb751c1cff.zip |
Use common bits/msq.h for more architectures.
sysdeps/unix/sysv/linux/bits/msq.h has padding after time fields in
struct msqid_ds unconditionally, and thus is only suitable for 32-bit
architectures (no 64-bit configurations use this file);
sysdeps/unix/sysv/linux/generic/bits/msq.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/msq.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.
Tested with build-many-glibcs.py.
* sysdeps/unix/sysv/linux/bits/msq.h: Include <bits/wordsize.h>.
(struct msqid_ds): Condition padding after time fields on
[__WORDSIZE == 32].
* sysdeps/unix/sysv/linux/alpha/bits/msq.h: Remove file.
* sysdeps/unix/sysv/linux/generic/bits/msq.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/msq.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/msq.h: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/msq.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/msq.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/msq.h b/sysdeps/unix/sysv/linux/bits/msq.h index 319521018d..0fe85e578d 100644 --- a/sysdeps/unix/sysv/linux/bits/msq.h +++ b/sysdeps/unix/sysv/linux/bits/msq.h @@ -20,6 +20,7 @@ #endif #include <bits/types.h> +#include <bits/wordsize.h> /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ @@ -39,11 +40,17 @@ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ __time_t msg_stime; /* time of last msgsnd command */ +#if __WORDSIZE == 32 unsigned long int __glibc_reserved1; +#endif __time_t msg_rtime; /* time of last msgrcv command */ +#if __WORDSIZE == 32 unsigned long int __glibc_reserved2; +#endif __time_t msg_ctime; /* time of last change */ +#if __WORDSIZE == 32 unsigned long int __glibc_reserved3; +#endif unsigned long int __msg_cbytes; /* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ msglen_t msg_qbytes; /* max number of bytes allowed on queue */ |