This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21575] sys/wait.h missing struct rusage definition


https://sourceware.org/bugzilla/show_bug.cgi?id=21575

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a66bc30d6b19ca6c9c77c0d3750acb18c691705f (commit)
      from  5b83faf6a7ca57ef2bfbca2c77992cafc8daa0be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a66bc30d6b19ca6c9c77c0d3750acb18c691705f

commit a66bc30d6b19ca6c9c77c0d3750acb18c691705f
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jun 19 11:59:19 2017 +0000

    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>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                     |   19 ++++
 bits/resource.h                               |   44 +--------
 include/bits/types/struct_rusage.h            |    1 +
 posix/sys/wait.h                              |    6 +
 resource/Makefile                             |    2 +-
 resource/bits/types/struct_rusage.h           |  130 +++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/alpha/bits/resource.h |   44 +--------
 sysdeps/unix/sysv/linux/bits/resource.h       |  106 +--------------------
 sysdeps/unix/sysv/linux/mips/bits/resource.h  |   44 +--------
 sysdeps/unix/sysv/linux/sparc/bits/resource.h |   44 +--------
 10 files changed, 162 insertions(+), 278 deletions(-)
 create mode 100644 include/bits/types/struct_rusage.h
 create mode 100644 resource/bits/types/struct_rusage.h

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]