glibc/sysdeps/unix/sysv/linux/sparc
Joseph Myers a66bc30d6b Define struct rusage in sys/wait.h when required (bug 21575).
Some older standards (XPG4.2 through POSIX.1:2001, XSI only) require
sys/wait.h to include the definition of struct rusage.  This is
missing in glibc.

This patch adds the required definition.  struct rusage is moved to a
new header bits/types/struct_rusage.h to avoid bringing in the whole
of sys/resource.h (although the standards in question do allow the
whole of sys/resource.h to be brought in).  In the five
bits/resource.h headers, the only variation between the definitions of
struct rusage is that the sysdeps/unix/sysv/linux version is prepared
for x32 (by having anonymous unions with __syscall_slong_t fields) and
the others are not.  Thus, this version is suitable for use
generically (everything other than x32 simply has __syscall_slong_t
the same as long int, so there are no API or ABI changes involved, and
anonymous unions are already a required language feature for glibc
headers elsewhere), and this patch uses it as a base for the single
implementation of bits/types/struct_rusage.h.

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

	[BZ #21575]
	* resource/bits/types/struct_rusage.h: New file.
	* include/bits/types/struct_rusage.h: Likewise.
	* bits/resource.h (struct rusage): Include
	<bits/types/struct_rusage.h> instead of defining here.
	* sysdeps/unix/sysv/linux/bits/resource.h (struct rusage):
	Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/resource.h (struct rusage):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/resource.h (struct rusage):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/resource.h (struct rusage):
	Likewise.
	* resource/Makefile (headers): Add bits/types/struct_rusage.h.
	* posix/sys/wait.h [__USE_XOPEN_EXTENDED && !__USE_XOPEN2K8]:
	Include <bits/types/struct_rusage.h>
2017-06-19 11:59:19 +00:00
..
bits Define struct rusage in sys/wait.h when required (bug 21575). 2017-06-19 11:59:19 +00:00
sparc32 Update nios2, sparc32 localplt.data files for recent GCC change. 2017-06-09 16:26:06 +00:00
sparc64 posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
sys Fix sys/ucontext.h namespace from signal.h etc. inclusion (bug 21457). 2017-05-23 11:49:48 +00:00
Implies
Makefile
Versions
a.out.h
aio_cancel.c
arch-fork.h
configure
configure.ac
dl-cache.h
getrlimit64.c
getshmlba.c
getsysstats.c
kernel-features.h posix: Consolidate Linux pause syscall 2017-05-18 18:06:47 -03:00
kernel_termios.h
ldd-rewrite.sed
lowlevellock.h
pt-vfork.S
readelflib.c
rt-sysdep.c
sysdep.c
sysdep.h
system.c