glibc/sysdeps/unix/sysv/linux/bits
Joseph Myers 9f9feb6d5d Use single bits/msq.h for all architectures.
The bits/msq.h headers for architectures using the Linux kernel vary
in a few ways:

* x32 uses __syscall_ulong_t instead of unsigned long int.

* x32 has 64-bit time_t, so no padding around time fields despite
  __WORDSIZE == 32.

* Some older 32-bit big-endian architectures have padding before
  rather than after time fields, although the preferred generic
  approach is padding after the time fields independent of endianness.

(There are also insubstantial differences such as use of unsigned int
for padding instead of unsigned long int, which makes no difference to
layout since the padding fields using unsigned int are only present on
32-bit architectures.)

For the first, __syscall_ulong_t can be used in the generic version as
it's the same as unsigned long int everywhere except x32.  For the
other two differences, this patch adds macros __MSQ_PAD_BEFORE_TIME
and __MSQ_PAD_AFTER_TIME in a new bits/msq-pad.h header, so that
header is the only one needing to be provided on architectures with
differences in this area, and everything else can go in a single
common bits/msq.h header.  Once we have __TIMESIZE, the generic
bits/msq-pad.h can change to use that instead of __WORDSIZE, at which
point the x86 version of bits/msq-pad.h won't be needed either.

Tested for x86_64 and x86, and with build-many-glibcs.py.

	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
	bits/msq-pad.h.
	* sysdeps/unix/sysv/linux/bits/msq.h: Include <bits/msq-pad.h>
	instead of <bits/wordsize.h>.
	(msgqnum_t): Define as __syscall_ulong_t.
	(msglen_t): Likewise.
	(__MSQ_PAD_TIME): New macro, depending on [__MSQ_PAD_BEFORE_TIME]
	and [__MSQ_PAD_AFTER_TIME].
	(struct msqid_ds): Define time fields using __MSQ_PAD_TIME.  Use
	__syscall_ulong_t instead of unsigned long int.
	* sysdeps/unix/sysv/linux/bits/msq-pad.h: New file.
	* sysdeps/unix/sysv/linux/hppa/bits/msq-pad.h: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/msq-pad.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/msq-pad.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/msq-pad.h: Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/msq-pad.h: Likewise.
	* sysdeps/unix/sysv/linux/hppa/bits/msq.h: Remove.
	* sysdeps/unix/sysv/linux/mips/bits/msq.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/msq.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/msq.h: Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/msq.h: Likewise.
2018-10-11 12:07:27 +00:00
..
types Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
a.out.h Update. 2003-07-25 09:06:04 +00:00
dirent.h Define _DIRENT_MATCHES_DIRENT64 regardless 2018-03-05 18:10:04 -03:00
epoll.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
errno.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
eventfd.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fcntl-linux.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
fcntl.h Update. 2000-09-01 07:14:30 +00:00
in.h Add IPV6_FREEBIND from Linux 4.15. 2018-02-06 00:41:34 +00:00
initspin.h Update. 2000-10-15 06:50:42 +00:00
inotify.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ioctl-types.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ioctls.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
ipc.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
local_lim.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mman-linux.h Move MREMAP_* to bits/mman-shared.h. 2018-10-01 20:30:57 +00:00
mman-map-flags-generic.h Share MAP_* flags between more architectures. 2018-09-26 12:33:14 +00:00
mman-shared.h Move MREMAP_* to bits/mman-shared.h. 2018-10-01 20:30:57 +00:00
mman.h Share MAP_* flags between more architectures. 2018-09-26 12:33:14 +00:00
mqueue.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
msq-pad.h Use single bits/msq.h for all architectures. 2018-10-11 12:07:27 +00:00
msq.h Use single bits/msq.h for all architectures. 2018-10-11 12:07:27 +00:00
param.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
poll.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
posix_opt.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
procfs-extra.h Unify more sys/procfs.h headers. 2018-09-25 16:49:25 +00:00
procfs-id.h Unify more sys/procfs.h headers. 2018-09-25 16:49:25 +00:00
procfs-prregset.h Complete sys/procfs.h unification. 2018-09-25 16:50:30 +00:00
procfs.h Unify some sys/procfs.h headers. 2018-09-25 16:48:15 +00:00
ptrace-shared.h Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h. 2018-04-24 12:11:35 +00:00
resource.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sched.h hurd: Avoid exposing all <sched.h> symbols from sys/types.h 2018-04-19 20:24:36 +02:00
sem.h Use common bits/sem.h for more architectures. 2018-10-10 00:54:27 +00:00
shm.h Use common bits/shm.h for more architectures. 2018-10-10 00:56:17 +00:00
sigaction.h hurd: Fix includability of <hurd/signal.h> in all standards 2018-03-05 22:50:29 +01:00
sigcontext.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sigevent-consts.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
siginfo-arch.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
siginfo-consts-arch.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
siginfo-consts.h Update siginfo constants from Linux kernel (bug 21286). 2018-09-17 12:41:14 +00:00
signalfd.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
signum.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sigstack.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
socket_type.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
socket.h Add PF_XDP, AF_XDP and SOL_XDP from Linux 4.18 to bits/socket.h. 2018-08-21 17:22:53 +00:00
ss_flags.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
stat.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
statfs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
statvfs.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sys_errlist.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
sysctl.h Add sysctl.mk and bits/sysctl.h 2012-05-22 13:46:29 -07:00
termios.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
time.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timerfd.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
timex.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
uio_lim.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
uio-ext.h Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947] 2018-04-03 12:19:29 -07:00
utsname.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
waitflags.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00