mbox series

[00/25] Public header file hygiene improvements for 2.30

Message ID 20190626174954.8009-1-zackw@panix.com
Headers show
Series Public header file hygiene improvements for 2.30 | expand

Message

Zack Weinberg June 26, 2019, 5:49 p.m. UTC
I would like to propose this set of hygiene improvements to public
header files for 2.30.  Its principal goal is to minimize the number
of cases where standardized public headers include other public
headers (standardized or not) and therefore define a bunch of symbols
that they’re not formally specified to define.  It also removes a fair
amount of cruft from sys/types.h and bits/types.h, obsoletes four
additional typedefs that should not be used in public interfaces
anymore (caddr_t, daddr_t, loff_t, register_t), and restricts
sys/types.h’s definition of u_intN_t and register_t to __USE_MISC
(i.e. they are no longer present in strict conformance modes).

These changes should not break portable programs, but they do have
fairly high source compatibility risk; I regret not having been able
to complete this patch series earlier in the development cycle.

This patch series is a superset of the “sys/types.h cleanup and
further typedef obsoletion” patch series I posted in March, which was
never fully reviewed.  I have rolled in all of the changes requested
from what reviews did happen.

Zack Weinberg (25):
  Move most headers installed by top-level Makefile to misc/.
  Define register_t using bits/typesizes.h macros.
  sys/types.h: Don’t define u_intN_t or register_t unless __USE_MISC.
  Add caddr_t, daddr_t, and loff_t to the set of obsolete typedefs.
  Simplify definition of __time64_t.
  Clean up bits/types.h.
  Create bits/types headers for most remaining __T_defined macros.
  Don’t conditionalize declarations of ldiv_t, lldiv_t, __gwchar_t.
  Add check-obsolete-constructs checker for nested includes.
  Swap sys/syslog.h with syslog.h.
  Swap sys/poll.h with poll.h.
  Don’t include sys/cdefs.h directly from public headers.
  Split up endian.h to minimize exposure of BYTE_ORDER.
  Add bits/types/ wrappers for stddef.h and stdarg.h types.
  Don’t rely on stddef.h or stdarg.h for individual type definitions.
  Limit the set of strings.h functions also exposed in string.h.
  Don’t include sys/select.h from sys/types.h.
  Don’t include signal.h from sys/wait.h or sys/param.h.
  Don’t include string.h from sys/un.h.
  Don’t include sys/time.h from sys/timex.h.
  Don’t include sys/types.h or stdint.h from most public headers.
  Minimize includes of unrelated public headers by networking headers.
  Don’t include sys/socket.h from public headers.
  Minimize inclusion of netinet/in.h from public headers.
  Rename sys/ucontext.h to bits/ucontext.h.

 Makefile                                      |  38 +-
 NEWS                                          |  11 +
 bits/endian.h                                 |  13 -
 bits/endianness.h                             |  17 +
 bits/fcntl.h                                  |   9 +-
 bits/in.h                                     |   8 +-
 bits/param.h                                  |   7 +
 bits/poll.h                                   |   9 +-
 bits/sem.h                                    |   7 +-
 bits/signum-generic.h                         |   2 +-
 bits/signum.h                                 |   2 +-
 bits/sockaddr.h                               |   3 +
 bits/socket.h                                 |  47 --
 bits/syslog-path.h                            |   8 +-
 bits/time64.h                                 |   2 +-
 bits/types/stack_t.h                          |   3 +-
 bits/typesizes.h                              |  16 +-
 bits/uapi-compat.h                            |  34 ++
 {sysdeps/generic/sys => bits}/ucontext.h      |   6 +-
 {sysdeps/gnu/bits => bits}/utmp.h             |  32 +-
 {sysdeps/gnu/bits => bits}/utmpx.h            |  35 +-
 conform/data/glob.h-data                      |   2 +-
 conform/data/stdio.h-data                     |   2 +-
 conform/data/sys/wait.h-data                  |   1 +
 conform/data/wchar.h-data                     |  12 +-
 ctype/ctype.h                                 |   2 +-
 debug/tst-chk1.c                              |   1 +
 debug/wcpcpy_chk.c                            |   2 -
 dirent/dirent.h                               |  17 +-
 dlfcn/dlfcn.h                                 |   4 +-
 elf/dl-map-segments.h                         |  15 +-
 elf/dl-minimal.c                              |   2 +-
 elf/dl-reloc.c                                |   4 +-
 elf/link.h                                    |   2 +-
 gmon/sys/gmon.h                               |   2 -
 gmon/sys/profil.h                             |   4 +-
 gmon/tst-sprofil.c                            |   1 +
 grp/grp.h                                     |  13 +-
 grp/initgroups.c                              |   1 +
 gshadow/gshadow.h                             |   4 +-
 hurd/Makefile                                 |   2 +-
 hurd/fd-read.c                                |   2 +-
 hurd/fd-write.c                               |   2 +-
 hurd/hurd/fd.h                                |   6 +-
 hurd/hurd/ioctl.h                             |   2 -
 hurd/hurd/signal.h                            |  15 +-
 hurd/hurd/sigpreempt.h                        |   3 +-
 hurd/hurd/userlink.h                          |  18 +-
 iconv/gconv.h                                 |   6 +-
 iconv/iconv.h                                 |   3 +-
 iconv/loop.c                                  |   1 -
 iconv/skeleton.c                              |   2 -
 include/bits/NULL.h                           |   1 +
 include/bits/endian.h                         |   1 +
 include/bits/strings_x2k8.h                   |   1 +
 include/bits/types/__va_list.h                |   1 +
 include/bits/types/blkcnt64_t.h               |   1 +
 include/bits/types/blkcnt_t.h                 |   1 +
 include/bits/types/blksize_t.h                |   1 +
 include/bits/types/caddr_t.h                  |   1 +
 include/bits/types/daddr_t.h                  |   1 +
 include/bits/types/dev_t.h                    |   1 +
 include/bits/types/fsblkcnt64_t.h             |   1 +
 include/bits/types/fsblkcnt_t.h               |   1 +
 include/bits/types/fsfilcnt64_t.h             |   1 +
 include/bits/types/fsfilcnt_t.h               |   1 +
 include/bits/types/fsid_t.h                   |   1 +
 include/bits/types/gid_t.h                    |   1 +
 include/bits/types/id_t.h                     |   1 +
 include/bits/types/in_addr_t.h                |   1 +
 include/bits/types/in_port_t.h                |   1 +
 include/bits/types/ino64_t.h                  |   1 +
 include/bits/types/ino_t.h                    |   1 +
 include/bits/types/intptr_t.h                 |   1 +
 include/bits/types/key_t.h                    |   1 +
 include/bits/types/loff_t.h                   |   1 +
 include/bits/types/mode_t.h                   |   1 +
 include/bits/types/nlink_t.h                  |   1 +
 include/bits/types/off64_t.h                  |   1 +
 include/bits/types/off_t.h                    |   1 +
 include/bits/types/pid_t.h                    |   1 +
 include/bits/types/ptrdiff_t.h                |   1 +
 include/bits/types/register_t.h               |   1 +
 include/bits/types/size_t.h                   |   1 +
 include/bits/types/socklen_t.h                |   1 +
 include/bits/types/ssize_t.h                  |   1 +
 include/bits/types/struct_in6_addr.h          |   1 +
 include/bits/types/struct_in_addr.h           |   1 +
 include/bits/types/struct_linger.h            |   1 +
 include/bits/types/struct_sockaddr.h          |   1 +
 include/bits/types/struct_sockaddr_in.h       |   1 +
 include/bits/types/struct_sockaddr_in6.h      |   1 +
 include/bits/types/struct_sockaddr_storage.h  |   1 +
 include/bits/types/suseconds_t.h              |   1 +
 include/bits/types/u_int.h                    |   1 +
 include/bits/types/u_intN_t.h                 |   1 +
 include/bits/types/uid_t.h                    |   1 +
 include/bits/types/uint.h                     |   1 +
 include/bits/types/useconds_t.h               |   1 +
 include/bits/types/va_list.h                  |   1 +
 include/bits/types/wchar_t.h                  |   1 +
 include/bits/xopen_lim.h                      | 149 +-----
 include/err.h                                 |   6 +-
 include/features.h                            | 478 +----------------
 include/gnu-versions.h                        |  53 +-
 include/gnu/libc-version.h                    |  35 +-
 include/ifaddrs.h                             |   1 +
 include/limits.h                              | 193 +------
 include/net/if.h                              |   2 +-
 include/netdb.h                               |   8 +-
 include/netinet/ether.h                       |   1 +
 include/netinet/in_systm.h                    |   1 +
 include/netinet/ip.h                          |   1 +
 include/netinet/ip_icmp.h                     |   1 +
 include/netinet/tcp.h                         |   1 +
 include/netinet/udp.h                         |   1 +
 include/poll.h                                |  12 +-
 include/set-hooks.h                           |   3 +-
 include/stdc-predef.h                         |  61 +--
 include/stdio.h                               |  34 +-
 include/sys/mtio.h                            |   1 +
 include/sys/poll.h                            |  10 +-
 include/sys/socketvar.h                       |   1 +
 include/sys/syslog.h                          |  19 +-
 include/sys/ucontext.h                        |   1 +
 include/syslog.h                              |  16 +-
 include/utmpx.h                               |   1 +
 include/values.h                              |  69 +--
 include/wchar.h                               |  14 +-
 inet/Makefile                                 |  14 +-
 inet/aliases.h                                |   4 +-
 inet/arpa/inet.h                              |   8 +-
 inet/bits/types/in_addr_t.h                   |   9 +
 inet/bits/types/in_port_t.h                   |   9 +
 inet/bits/types/struct_in6_addr.h             |  30 ++
 inet/bits/types/struct_in_addr.h              |  18 +
 inet/bits/types/struct_sockaddr_in.h          |  28 +
 inet/bits/types/struct_sockaddr_in6.h         |  25 +
 inet/check_pf.c                               |   1 +
 inet/gethstbynm.c                             |   1 +
 inet/gethstbynm_r.c                           |   1 +
 inet/getsourcefilter.c                        |   1 +
 inet/htonl.c                                  |   3 +-
 inet/htons.c                                  |   2 +
 inet/ifaddrs.h                                |   2 +-
 inet/inet6_opt.c                              |   1 +
 inet/inet6_option.c                           |   1 +
 inet/inet6_rth.c                              |   1 +
 inet/netinet/icmp6.h                          | 125 ++---
 inet/netinet/igmp.h                           |  12 +-
 inet/netinet/in.h                             | 137 ++---
 {sysdeps/generic => inet}/netinet/in_systm.h  |   3 +-
 {sysdeps/generic => inet}/netinet/ip.h        |  43 +-
 inet/netinet/ip6.h                            |  88 ++--
 {sysdeps/gnu => inet}/netinet/ip_icmp.h       |  63 +--
 {sysdeps/gnu => inet}/netinet/tcp.h           | 182 +++----
 {sysdeps/gnu => inet}/netinet/udp.h           |  20 +-
 inet/protocols/routed.h                       |   4 +-
 inet/protocols/rwhod.h                        |   5 +-
 inet/protocols/talkd.h                        |  11 +-
 inet/protocols/timed.h                        |   5 +-
 inet/setsourcefilter.c                        |   2 +-
 inet/test-ifaddrs.c                           |   1 +
 inet/test-inet6_opt.c                         |   1 +
 inet/tst-getni1.c                             |   1 +
 inet/tst-getni2.c                             |   1 +
 inet/tst-inet6_rth.c                          |   1 +
 inet/tst-inet6_scopeid_pton.c                 |   1 +
 intl/gettext.c                                |   7 +-
 intl/libintl.h                                |   8 +-
 intl/loadmsgcat.c                             |   7 +-
 intl/ngettext.c                               |   7 +-
 io/bits/poll2.h                               |   9 +-
 io/fcntl.h                                    |  27 +-
 io/fts.h                                      |   5 +-
 io/ftw.h                                      |   1 -
 io/{sys => }/poll.h                           |   6 +-
 io/sys/poll.h                                 |  79 +--
 io/sys/sendfile.h                             |   6 +-
 io/sys/stat.h                                 |  66 +--
 io/sys/statvfs.h                              |  21 +-
 libio/bits/stdio.h                            |   2 +-
 libio/bits/stdio2.h                           |  28 +-
 libio/bits/types/struct_FILE.h                |   1 +
 libio/iolibio.h                               |   2 +-
 libio/libio.h                                 |   8 +-
 libio/stdio.h                                 |  71 +--
 libio/vwprintf.c                              |   2 +-
 locale/loadlocale.c                           |  11 +-
 locale/locale.h                               |   3 +-
 login/Makefile                                |  13 +-
 login/utmp.h                                  |  15 +-
 {sysdeps/gnu => login}/utmpx.h                |  14 +-
 mach/lock-intern.h                            |   3 +-
 malloc/malloc.h                               |   7 +-
 malloc/tst-malloc-thread-fail.c               |   1 +
 malloc/tst-malloc_info.c                      |   1 +
 malloc/tst-mallocfork.c                       |   1 +
 misc/Makefile                                 |  31 +-
 misc/ar.h                                     |   2 +-
 misc/bits/syslog-ldbl.h                       |   9 +-
 misc/bits/syslog.h                            |  13 +-
 misc/bits/types/struct_iovec.h                |   3 +-
 {include => misc}/bits/xopen_lim.h            |   0
 misc/err.c                                    |  12 +-
 misc/err.h                                    |  14 +-
 {include => misc}/features.h                  |   0
 {include => misc}/gnu-versions.h              |   0
 {include => misc}/gnu/libc-version.h          |   0
 {include => misc}/limits.h                    |   0
 misc/search.h                                 |   3 +-
 {include => misc}/stdc-predef.h               |   0
 misc/sys/auxv.h                               |   3 +-
 misc/sys/mman.h                               |  20 +-
 {sysdeps/gnu => misc}/sys/mtio.h              |   7 +-
 misc/sys/param.h                              |  12 +-
 misc/sys/select.h                             |   7 +-
 misc/sys/syslog.h                             | 218 +-------
 misc/sys/uio.h                                |   5 +-
 misc/sys/xattr.h                              |   3 +-
 misc/{sys => }/syslog.h                       |   9 +-
 misc/tst-fdset.c                              |   2 +-
 misc/ustat.c                                  |   8 +-
 {include => misc}/values.h                    |   0
 nis/nis_add.c                                 |   4 +-
 nis/nis_call.c                                |  10 +-
 nis/nis_callback.c                            |  12 +-
 nis/nis_checkpoint.c                          |   4 +-
 nis/nis_domain_of.c                           |   1 +
 nis/nis_findserv.c                            |   8 +-
 nis/nis_intern.h                              |  12 +-
 nis/nis_lookup.c                              |   4 +-
 nis/nis_mkdir.c                               |   8 +-
 nis/nis_modify.c                              |   4 +-
 nis/nis_ping.c                                |   4 +-
 nis/nis_remove.c                              |   4 +-
 nis/nis_rmdir.c                               |   4 +-
 nis/nis_server.c                              |   8 +-
 nis/nis_table.c                               |  28 +-
 nis/nis_util.c                                |   4 +-
 nis/nss_nis/nis-hosts.c                       |   1 +
 nis/nss_nisplus/nisplus-grp.c                 |   8 +-
 nis/nss_nisplus/nisplus-hosts.c               |   1 +
 nis/nss_nisplus/nisplus-pwd.c                 |   8 +-
 nis/rpcsvc/nis_callback.h                     |   2 +-
 nis/rpcsvc/yp.h                               |   6 +-
 nis/yp_xdr.c                                  |   1 +
 nis/ypclnt.c                                  |  42 +-
 nptl/pthread_join_common.c                    |   2 +
 nptl/tst-cancel4.c                            |  24 +-
 nptl/tst-fork4.c                              |   1 +
 nptl/tst-getpid3.c                            |   1 +
 nptl/tst-mutex9.c                             |   1 +
 nptl/tst-rwlock12.c                           |   1 +
 nscd/aicache.c                                |   1 +
 nscd/cache.c                                  |   1 +
 nscd/hstcache.c                               |   1 +
 nscd/initgrcache.c                            |   3 +
 nscd/netgroupcache.c                          |   2 +
 nscd/nscd_gethst_r.c                          |   1 +
 nscd/servicescache.c                          |   1 +
 nss/digits_dots.c                             |   1 +
 nss/nss.h                                     |   6 +-
 nss/nss_compat/compat-grp.c                   |   1 +
 nss/nss_compat/compat-pwd.c                   |   1 +
 nss/nss_compat/compat-spwd.c                  |   1 +
 nss/nss_db/db-XXX.c                           |   1 +
 nss/nss_files/files-hosts.c                   |   1 +
 nss/nss_files/files-network.c                 |   1 +
 nss/tst-nss-files-hosts-erange.c              |   2 +
 nss/tst-nss-files-hosts-getent.c              |   2 +
 nss/tst-nss-files-hosts-multi.c               |   2 +
 nss/tst-nss-test4.c                           |   1 +
 posix/Makefile                                |  37 +-
 posix/bits/types.h                            | 199 +++----
 posix/bits/types/blkcnt64_t.h                 |   9 +
 posix/bits/types/blkcnt_t.h                   |  13 +
 posix/bits/types/blksize_t.h                  |   9 +
 posix/bits/types/caddr_t.h                    |   9 +
 posix/bits/types/daddr_t.h                    |   9 +
 posix/bits/types/dev_t.h                      |   9 +
 posix/bits/types/fsblkcnt64_t.h               |   9 +
 posix/bits/types/fsblkcnt_t.h                 |  13 +
 posix/bits/types/fsfilcnt64_t.h               |   9 +
 posix/bits/types/fsfilcnt_t.h                 |  13 +
 posix/bits/types/fsid_t.h                     |   9 +
 posix/bits/types/gid_t.h                      |   9 +
 posix/bits/types/id_t.h                       |  10 +
 posix/bits/types/ino64_t.h                    |   9 +
 posix/bits/types/ino_t.h                      |  13 +
 posix/bits/types/intptr_t.h                   |  10 +
 posix/bits/types/key_t.h                      |   9 +
 posix/bits/types/loff_t.h                     |   9 +
 posix/bits/types/mode_t.h                     |   9 +
 posix/bits/types/nlink_t.h                    |   9 +
 posix/bits/types/off64_t.h                    |   9 +
 posix/bits/types/off_t.h                      |  13 +
 posix/bits/types/pid_t.h                      |   9 +
 posix/bits/types/register_t.h                 |   9 +
 posix/bits/types/socklen_t.h                  |   9 +
 posix/bits/types/ssize_t.h                    |   9 +
 posix/bits/types/suseconds_t.h                |   9 +
 posix/bits/types/u_int.h                      |  15 +
 posix/bits/types/u_intN_t.h                   |  17 +
 posix/bits/types/uid_t.h                      |   9 +
 posix/bits/types/uint.h                       |  10 +
 posix/bits/types/useconds_t.h                 |   9 +
 posix/glob.h                                  |  32 +-
 posix/sched.h                                 |  13 +-
 posix/spawn.h                                 |   5 +-
 posix/sys/types.h                             | 332 ++++--------
 posix/sys/wait.h                              |  13 +-
 posix/tst-getaddrinfo2.c                      |   1 +
 posix/tst-getaddrinfo3.c                      |   1 +
 posix/unistd.h                                |  60 +--
 posix/wordexp.h                               |   3 +-
 pwd/pwd.h                                     |  15 +-
 resolv/arpa/nameser.h                         |  34 +-
 resolv/arpa/nameser_compat.h                  |   3 +-
 resolv/bits/types/res_state.h                 |  17 +-
 resolv/netdb.h                                |  13 +-
 resolv/ns_print.c                             |   2 +
 resolv/nss_dns/dns-network.c                  |   1 +
 resolv/resolv.h                               |  17 +-
 resolv/resolv_conf.c                          |   1 +
 resolv/tst-bug18665-tcp.c                     |   2 +
 resolv/tst-bug18665.c                         |   1 +
 resolv/tst-inet_ntop.c                        |   1 +
 resolv/tst-inet_pton.c                        |   1 +
 resolv/tst-ns_name_compress.c                 |   1 +
 resolv/tst-res_hnok.c                         |   1 +
 resolv/tst-resolv-ai_idn-common.c             |   2 +
 resolv/tst-resolv-basic.c                     |   1 +
 resolv/tst-resolv-binary.c                    |   1 +
 resolv/tst-resolv-canonname.c                 |   1 +
 resolv/tst-resolv-edns.c                      |   2 +
 resolv/tst-resolv-network.c                   |   2 +
 resolv/tst-resolv-nondecimal.c                |   2 +
 resolv/tst-resolv-res_init-skeleton.c         |   1 +
 resolv/tst-resolv-search.c                    |   2 +
 resolv/tst-resolv-threads.c                   |   1 +
 resolv/tst-resolv-trailing.c                  |   1 +
 resource/sys/resource.h                       |   6 +-
 rt/aio.h                                      |   7 +-
 rt/mqueue.h                                   |   8 +-
 rt/tst-mqueue1.c                              |   5 +-
 scripts/check-c++-types.sh                    |   1 +
 scripts/check-obsolete-constructs.py          | 494 ++++++++++++++++--
 shadow/shadow.h                               |   4 +-
 signal/sighold.c                              |   1 -
 signal/signal.h                               |  18 +-
 signal/sigrelse.c                             |   1 -
 socket/Makefile                               |   8 +-
 socket/bits/types/struct_linger.h             |  11 +
 socket/bits/types/struct_sockaddr.h           |  15 +
 socket/bits/types/struct_sockaddr_storage.h   |  21 +
 {sysdeps/gnu => socket}/net/if.h              |  12 +-
 socket/sys/socket.h                           |  23 +-
 {sysdeps/generic => socket}/sys/socketvar.h   |   0
 socket/sys/un.h                               |  10 +-
 stdio-common/printf.h                         |  11 +-
 stdio-common/tempname.c                       |   1 -
 stdio-common/tst-vfprintf-user-type.c         |   1 +
 stdlib/Makefile                               |   6 +-
 stdlib/alloca.h                               |   3 +-
 stdlib/bits/NULL.h                            |  47 ++
 stdlib/bits/types/__va_list.h                 |  47 ++
 stdlib/bits/types/ptrdiff_t.h                 |  45 ++
 stdlib/bits/types/size_t.h                    |  45 ++
 stdlib/bits/types/va_list.h                   |  36 ++
 stdlib/bits/types/wchar_t.h                   |  50 ++
 stdlib/inttypes.h                             |  14 +-
 stdlib/monetary.h                             |  10 +-
 stdlib/stdint.h                               |  16 +-
 stdlib/stdlib.h                               |  17 +-
 stdlib/sys/random.h                           |   4 +-
 stdlib/sys/ucontext.h                         |   1 +
 stdlib/ucontext.h                             |   2 +-
 string/Makefile                               |   5 +-
 string/bits/endian.h                          |  48 ++
 string/bits/strings_x2k8.h                    |  70 +++
 string/endian.h                               |  39 +-
 string/string.h                               |   8 +-
 string/strings.h                              |  42 +-
 string/test-string.h                          |   1 +
 string/tst-cmp.c                              |   1 +
 sunrpc/auth_des.c                             |   2 +-
 sunrpc/auth_unix.c                            |   4 +-
 sunrpc/authdes_prot.c                         |  10 +-
 sunrpc/authuxprot.c                           |   2 +-
 sunrpc/clnt_raw.c                             |  12 +-
 sunrpc/clnt_tcp.c                             |  28 +-
 sunrpc/clnt_udp.c                             |  22 +-
 sunrpc/clnt_unix.c                            |  26 +-
 sunrpc/key_call.c                             |   2 +-
 sunrpc/pm_getmaps.c                           |   2 +-
 sunrpc/pm_getport.c                           |   4 +-
 sunrpc/pmap_clnt.c                            |   4 +-
 sunrpc/pmap_prot2.c                           |   2 +-
 sunrpc/pmap_rmt.c                             |  16 +-
 sunrpc/proto.h                                |   2 +-
 sunrpc/rpc/auth.h                             |   4 +-
 sunrpc/rpc/auth_des.h                         |   3 +-
 sunrpc/rpc/clnt.h                             |  16 +-
 sunrpc/rpc/netdb.h                            |   3 +-
 sunrpc/rpc/pmap_clnt.h                        |  12 +-
 sunrpc/rpc/pmap_rmt.h                         |   4 +-
 sunrpc/rpc/rpc_msg.h                          |   4 +-
 sunrpc/rpc/svc.h                              |  15 +-
 sunrpc/rpc/types.h                            |  44 +-
 sunrpc/rpc/xdr.h                              |  22 +-
 sunrpc/rpc_clntout.c                          |   8 +-
 sunrpc/rpc_cmsg.c                             |  12 +-
 sunrpc/rpc_gethostbyname.c                    |   1 +
 sunrpc/rpc_hout.c                             |   2 +-
 sunrpc/rpc_prot.c                             |   4 +-
 sunrpc/rpc_sample.c                           |   4 +-
 sunrpc/rpc_svcout.c                           |   6 +-
 sunrpc/svc.c                                  |   3 +-
 sunrpc/svc_authux.c                           |   2 +-
 sunrpc/svc_raw.c                              |   8 +-
 sunrpc/svc_tcp.c                              |  24 +-
 sunrpc/svc_udp.c                              |  14 +-
 sunrpc/svc_unix.c                             |  28 +-
 sunrpc/xdr.c                                  |   4 +-
 sunrpc/xdr_array.c                            |   4 +-
 sunrpc/xdr_mem.c                              |  12 +-
 sunrpc/xdr_rec.c                              |  46 +-
 sunrpc/xdr_ref.c                              |   6 +-
 sunrpc/xdr_sizeof.c                           |   8 +-
 sunrpc/xdr_stdio.c                            |  14 +-
 support/resolv_test.c                         |   1 +
 support/resolv_test.h                         |   4 +-
 support/support_format_address_family.c       |   1 +
 support/support_format_addrinfo.c             |   1 +
 support/support_format_dns_packet.c           |   1 +
 support/support_format_hostent.c              |   1 +
 support/support_format_netent.c               |   1 +
 support/tst-support-namespace.c               |   1 +
 support/tst-support_capture_subprocess.c      |  19 +-
 support/xunistd.h                             |   4 +-
 sysdeps/aarch64/bits/endian.h                 |  30 --
 sysdeps/aarch64/bits/endianness.h             |  15 +
 sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h |   2 +-
 sysdeps/alpha/bits/endian.h                   |   7 -
 sysdeps/alpha/bits/endianness.h               |  11 +
 sysdeps/arm/bits/endian.h                     |  10 -
 sysdeps/arm/bits/endianness.h                 |  15 +
 sysdeps/arm/{sys => bits}/ucontext.h          |   6 +-
 sysdeps/arm/nptl/bits/pthreadtypes-arch.h     |   2 +-
 sysdeps/csky/bits/endian.h                    |   9 -
 sysdeps/csky/bits/endianness.h                |  15 +
 sysdeps/csky/nptl/bits/pthreadtypes-arch.h    |   2 +-
 sysdeps/generic/ldsodefs.h                    |   2 -
 sysdeps/generic/memcopy.h                     |   3 +-
 sysdeps/generic/net/if.h                      |  49 --
 sysdeps/generic/netinet/if_ether.h            |   6 +-
 sysdeps/generic/netinet/tcp.h                 | 108 ----
 sysdeps/gnu/Makefile                          |  17 -
 sysdeps/gnu/bits/sem.h                        |   7 +-
 sysdeps/hppa/bits/endian.h                    |   7 -
 sysdeps/hppa/bits/endianness.h                |  11 +
 .../htl/bits/types/struct___pthread_attr.h    |   4 +-
 sysdeps/htl/pthread.h                         |   1 -
 sysdeps/i386/{sys => bits}/ucontext.h         |   6 +-
 sysdeps/i386/i686/multiarch/bcopy.c           |   1 +
 sysdeps/i386/i686/multiarch/bzero.c           |   1 +
 sysdeps/i386/i686/multiarch/ifunc-impl-list.c |   1 +
 sysdeps/ia64/bits/endianness.h                |  11 +
 sysdeps/ia64/ieee754.h                        |   4 +-
 sysdeps/ieee754/ieee754.h                     |   4 +-
 sysdeps/ieee754/ldbl-128/ieee754.h            |   4 +-
 sysdeps/ieee754/ldbl-128ibm/ieee754.h         |   4 +-
 sysdeps/ieee754/ldbl-opt/nldbl-compat.c       |   8 +-
 sysdeps/ieee754/ldbl-opt/nldbl-compat.h       |  16 +-
 sysdeps/m68k/bits/endian.h                    |   7 -
 sysdeps/m68k/bits/endianness.h                |  11 +
 sysdeps/m68k/{sys => bits}/ucontext.h         |   6 +-
 sysdeps/m68k/nptl/bits/pthreadtypes-arch.h    |   2 +-
 sysdeps/mach/hurd/bits/errno.h                |   1 +
 sysdeps/mach/hurd/bits/fcntl.h                |  11 +-
 sysdeps/mach/hurd/bits/param.h                |  13 +-
 sysdeps/mach/hurd/bits/socket.h               |  47 --
 sysdeps/mach/hurd/bits/typesizes.h            |  16 +-
 sysdeps/mach/hurd/i386/Makefile               |  39 --
 sysdeps/mach/hurd/if_index.c                  |   1 +
 sysdeps/mach/hurd/net/ethernet.h              |  13 +-
 sysdeps/mach/hurd/net/if_arp.h                |  10 +-
 sysdeps/mach/hurd/net/route.h                 |  20 +-
 sysdeps/mach/hurd/sendfile.c                  |   1 +
 sysdeps/mach/i386/bits/mach/param.h           |   5 +
 sysdeps/microblaze/bits/endian.h              |  30 --
 sysdeps/microblaze/bits/endianness.h          |  15 +
 .../microblaze/nptl/bits/pthreadtypes-arch.h  |   2 +-
 sysdeps/mips/bits/endian.h                    |  15 -
 sysdeps/mips/bits/endianness.h                |  16 +
 sysdeps/mips/{sys => bits}/ucontext.h         |   6 +-
 sysdeps/mips/ieee754/ieee754.h                |  17 +-
 sysdeps/mips/nptl/bits/pthreadtypes-arch.h    |   2 +-
 sysdeps/nios2/bits/endian.h                   |  12 -
 sysdeps/nios2/bits/endianness.h               |  16 +
 sysdeps/nios2/nptl/bits/pthreadtypes-arch.h   |   2 +-
 sysdeps/nptl/libc-lock.h                      |   1 -
 sysdeps/nptl/libc-lockP.h                     |   1 -
 sysdeps/nptl/proc_service.h                   |   3 +
 sysdeps/nptl/pthread.h                        |   2 +-
 sysdeps/nptl/sys/procfs.h                     |   3 +-
 sysdeps/nptl/thread_db.h                      |   3 +-
 sysdeps/posix/dl-fileid.h                     |   4 +-
 sysdeps/posix/sigignore.c                     |   3 -
 sysdeps/posix/sigset.c                        |   3 -
 sysdeps/posix/waitid.c                        |   1 -
 sysdeps/powerpc/bits/endian.h                 |  36 --
 sysdeps/powerpc/bits/endianness.h             |  16 +
 .../power4/multiarch/ifunc-impl-list.c        |   1 +
 .../powerpc/powerpc64/multiarch/bcopy-ppc64.c |   1 +
 sysdeps/powerpc/powerpc64/multiarch/bcopy.c   |   1 +
 .../powerpc64/multiarch/ifunc-impl-list.c     |   1 +
 sysdeps/powerpc/sys/platform/ppc.h            |  10 +-
 sysdeps/pthread/semaphore.h                   |   2 +-
 sysdeps/riscv/bits/endian.h                   |   5 -
 sysdeps/riscv/bits/endianness.h               |  11 +
 sysdeps/riscv/nptl/bits/pthreadtypes-arch.h   |   2 +-
 sysdeps/s390/bits/endian.h                    |   7 -
 sysdeps/s390/bits/endianness.h                |  11 +
 sysdeps/s390/bzero.c                          |   1 +
 sysdeps/s390/multiarch/ifunc-impl-list.c      |   1 +
 sysdeps/sh/bits/endian.h                      |  13 -
 sysdeps/sh/bits/endianness.h                  |  15 +
 sysdeps/sh/nptl/bits/pthreadtypes-arch.h      |   2 +-
 sysdeps/sparc/bits/endian.h                   |  12 -
 sysdeps/sparc/bits/endianness.h               |  16 +
 sysdeps/sparc/sparc32/ieee754.h               |   4 +-
 sysdeps/sparc/sparc64/multiarch/bzero.c       |   1 +
 .../sparc/sparc64/multiarch/ifunc-impl-list.c |   1 +
 sysdeps/unix/bsd/bits/signum.h                |   2 +-
 sysdeps/unix/bsd/bits/sockaddr.h              |  12 +
 sysdeps/unix/sysv/linux/aarch64/bits/procfs.h |  16 +-
 .../linux/aarch64/{sys => bits}/ucontext.h    |   8 +-
 .../unix/sysv/linux/aarch64/sigcontextinfo.h  |   2 +-
 sysdeps/unix/sysv/linux/aarch64/sys/user.h    |   2 +
 .../unix/sysv/linux/aarch64/ucontext_i.sym    |   5 +-
 sysdeps/unix/sysv/linux/alpha/bits/epoll.h    |   5 +
 .../sysv/linux/alpha/bits/procfs-prregset.h   |   9 +
 sysdeps/unix/sysv/linux/alpha/bits/procfs.h   |   8 +-
 sysdeps/unix/sysv/linux/alpha/bits/signum.h   |   2 +-
 .../unix/sysv/linux/alpha/bits/typesizes.h    |   2 +-
 .../sysv/linux/alpha/{sys => bits}/ucontext.h |   6 +-
 sysdeps/unix/sysv/linux/alpha/sys/acct.h      |   2 +-
 sysdeps/unix/sysv/linux/alpha/sys/user.h      |   8 +-
 .../sysv/linux/alpha/ucontext-offsets.sym     |   2 +-
 sysdeps/unix/sysv/linux/arm/bits/procfs.h     |   9 +-
 .../sysv/linux/arm/{sys => bits}/ucontext.h   |   6 +-
 sysdeps/unix/sysv/linux/arm/register-dump.h   |   2 +-
 sysdeps/unix/sysv/linux/arm/sigcontextinfo.h  |   2 +-
 sysdeps/unix/sysv/linux/arm/sys/user.h        |   2 +
 sysdeps/unix/sysv/linux/arm/ucontext_i.sym    |   4 +-
 sysdeps/unix/sysv/linux/bits/epoll.h          |   5 +
 sysdeps/unix/sysv/linux/bits/in.h             |  33 +-
 sysdeps/unix/sysv/linux/bits/param.h          |   5 +
 sysdeps/unix/sysv/linux/bits/poll.h           |   9 +-
 sysdeps/unix/sysv/linux/bits/sem.h            |   7 +-
 sysdeps/unix/sysv/linux/bits/sigcontext.h     |  11 +-
 sysdeps/unix/sysv/linux/bits/signum.h         |   2 +-
 sysdeps/unix/sysv/linux/bits/socket.h         |  47 +-
 sysdeps/unix/sysv/linux/bits/timex.h          |  20 +-
 sysdeps/unix/sysv/linux/bits/types/stack_t.h  |   3 +-
 sysdeps/unix/sysv/linux/bits/uapi-compat.h    | 153 ++++++
 sysdeps/unix/sysv/linux/bits/uio-ext.h        |   4 +-
 sysdeps/unix/sysv/linux/check_native.c        |   1 +
 .../unix/sysv/linux/csky/abiv2/ucontext_i.sym |   4 +-
 sysdeps/unix/sysv/linux/csky/bits/procfs.h    |   5 +
 .../sysv/linux/csky/{sys => bits}/ucontext.h  |   6 +-
 sysdeps/unix/sysv/linux/csky/register-dump.h  |   2 +-
 sysdeps/unix/sysv/linux/dl-vdso.h             |   6 +
 sysdeps/unix/sysv/linux/errqueue.h            |  19 +-
 sysdeps/unix/sysv/linux/generic/bits/stat.h   |   2 +-
 sysdeps/unix/sysv/linux/generic/bits/statfs.h |   2 +-
 .../unix/sysv/linux/generic/bits/typesizes.h  |  16 +-
 .../sysv/linux/generic/wordsize-32/overflow.h |   2 +-
 sysdeps/unix/sysv/linux/hppa/bits/epoll.h     |   5 +
 sysdeps/unix/sysv/linux/hppa/bits/procfs.h    |   5 +
 sysdeps/unix/sysv/linux/hppa/bits/signum.h    |   2 +-
 .../sysv/linux/hppa/{sys => bits}/ucontext.h  |   6 +-
 sysdeps/unix/sysv/linux/hppa/pthread.h        |   1 -
 sysdeps/unix/sysv/linux/hppa/ucontext_i.sym   |   1 -
 sysdeps/unix/sysv/linux/i386/ucontext_i.sym   |   1 -
 sysdeps/unix/sysv/linux/ia64/Makefile         |   6 +-
 sysdeps/unix/sysv/linux/ia64/bits/endian.h    |   7 -
 sysdeps/unix/sysv/linux/ia64/bits/ipc.h       |   2 +-
 sysdeps/unix/sysv/linux/ia64/bits/procfs.h    |   9 +-
 .../unix/sysv/linux/ia64/bits/sigcontext.h    |  14 +-
 .../sysv/linux/ia64/bits/types/__ia64_fpreg.h |  22 +
 .../sysv/linux/ia64/{sys => bits}/ucontext.h  |  18 +-
 .../sysv/linux/ia64/sigcontext-offsets.sym    |   2 +-
 sysdeps/unix/sysv/linux/ia64/sys/ptrace.h     |   3 +-
 sysdeps/unix/sysv/linux/ia64/sys/user.h       |   2 +-
 sysdeps/unix/sysv/linux/lseek.c               |   4 +-
 sysdeps/unix/sysv/linux/lseek64.c             |   2 +-
 sysdeps/unix/sysv/linux/m68k/bits/poll.h      |   9 +-
 sysdeps/unix/sysv/linux/m68k/bits/procfs.h    |   9 +-
 sysdeps/unix/sysv/linux/m68k/bits/sockaddr.h  |   4 +-
 .../sysv/linux/m68k/{sys => bits}/ucontext.h  |   6 +-
 .../sysv/linux/m68k/m680x0/ucontext_i.sym     |   1 -
 sysdeps/unix/sysv/linux/m68k/sys/user.h       |   2 +
 .../unix/sysv/linux/microblaze/bits/procfs.h  |   9 +-
 .../linux/microblaze/{sys => bits}/ucontext.h |   6 +-
 sysdeps/unix/sysv/linux/microblaze/sys/user.h |   6 +-
 sysdeps/unix/sysv/linux/mips/bits/epoll.h     |   5 +
 sysdeps/unix/sysv/linux/mips/bits/poll.h      |   9 +-
 sysdeps/unix/sysv/linux/mips/bits/procfs.h    |   5 +
 sysdeps/unix/sysv/linux/mips/bits/signum.h    |   2 +-
 .../unix/sysv/linux/mips/bits/types/stack_t.h |   3 +-
 .../linux/{generic => mips}/bits/typesizes.h  |  28 +-
 .../sysv/linux/mips/{sys => bits}/ucontext.h  |   6 +-
 sysdeps/unix/sysv/linux/mips/sys/user.h       |   4 +-
 sysdeps/unix/sysv/linux/mips/ucontext_i.sym   |   2 -
 sysdeps/unix/sysv/linux/net/ethernet.h        |  12 +-
 sysdeps/unix/sysv/linux/net/if_arp.h          |   8 +-
 sysdeps/unix/sysv/linux/net/if_ppp.h          |  10 +-
 sysdeps/unix/sysv/linux/net/if_shaper.h       |   8 +-
 sysdeps/unix/sysv/linux/net/route.h           |  20 +-
 sysdeps/unix/sysv/linux/netatalk/at.h         |  40 +-
 sysdeps/unix/sysv/linux/netinet/if_ether.h    |  21 +-
 sysdeps/unix/sysv/linux/netinet/if_fddi.h     |  14 +-
 sysdeps/unix/sysv/linux/netinet/if_tr.h       |  68 +--
 sysdeps/unix/sysv/linux/netipx/ipx.h          |  10 +-
 sysdeps/unix/sysv/linux/netrose/rose.h        |   2 +-
 sysdeps/unix/sysv/linux/nios2/bits/procfs.h   |   5 +
 .../sysv/linux/nios2/{sys => bits}/ucontext.h |   6 +-
 .../unix/sysv/linux/nios2/sigcontextinfo.h    |   3 +-
 sysdeps/unix/sysv/linux/nios2/sys/user.h      |   2 +
 sysdeps/unix/sysv/linux/nios2/ucontext_i.sym  |   2 -
 sysdeps/unix/sysv/linux/ntp_gettime.c         |   4 -
 sysdeps/unix/sysv/linux/ntp_gettimex.c        |   4 -
 sysdeps/unix/sysv/linux/powerpc/bits/ppc.h    |   2 +-
 sysdeps/unix/sysv/linux/powerpc/bits/procfs.h |  20 +-
 .../linux/powerpc/{sys => bits}/ucontext.h    |   6 +-
 sysdeps/unix/sysv/linux/powerpc/htm.h         |   2 +-
 .../linux/powerpc/powerpc32/ucontext_i.sym    |   1 -
 .../linux/powerpc/powerpc64/ucontext_i.sym    |   1 -
 sysdeps/unix/sysv/linux/powerpc/sys/user.h    |   5 +-
 sysdeps/unix/sysv/linux/pselect.c             |   2 +-
 sysdeps/unix/sysv/linux/riscv/bits/procfs.h   |  10 +-
 .../sysv/linux/riscv/{sys => bits}/ucontext.h |   6 +-
 sysdeps/unix/sysv/linux/riscv/makecontext.c   |  18 +-
 .../unix/sysv/linux/riscv/sigcontextinfo.h    |   2 +-
 sysdeps/unix/sysv/linux/riscv/ucontext_i.sym  |   4 +-
 sysdeps/unix/sysv/linux/s390/bits/procfs.h    |   9 +-
 sysdeps/unix/sysv/linux/s390/bits/typesizes.h |  16 +-
 .../sysv/linux/s390/{sys => bits}/ucontext.h  |   6 +-
 .../{gnu => unix/sysv/linux/s390}/bits/utmp.h |  37 +-
 sysdeps/unix/sysv/linux/s390/bits/utmpx.h     |  34 +-
 sysdeps/unix/sysv/linux/s390/sys/user.h       |   2 +
 .../sysv/linux/s390/tst-ptrace-singleblock.c  |  11 +-
 sysdeps/unix/sysv/linux/s390/ucontext_i.sym   |   1 -
 sysdeps/unix/sysv/linux/scsi/sg.h             |   4 +-
 sysdeps/unix/sysv/linux/sh/bits/procfs.h      |   5 +
 .../sysv/linux/sh/{sys => bits}/ucontext.h    |   6 +-
 sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym |   1 -
 sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym |   1 -
 sysdeps/unix/sysv/linux/sh/sys/user.h         |   5 +-
 sysdeps/unix/sysv/linux/sparc/bits/epoll.h    |   5 +
 sysdeps/unix/sysv/linux/sparc/bits/poll.h     |   9 +-
 sysdeps/unix/sysv/linux/sparc/bits/procfs.h   |   7 +-
 sysdeps/unix/sysv/linux/sparc/bits/signum.h   |   2 +-
 .../unix/sysv/linux/sparc/bits/typesizes.h    |  16 +-
 .../sysv/linux/sparc/{sys => bits}/ucontext.h |   6 +-
 .../sysv/linux/sparc/sparc32/ucontext_i.sym   |   1 -
 sysdeps/unix/sysv/linux/sparc/sys/user.h      |   3 +-
 sysdeps/unix/sysv/linux/splice.c              |   2 +-
 sysdeps/unix/sysv/linux/sys/acct.h            |   8 +-
 sysdeps/unix/sysv/linux/sys/epoll.h           |  10 +-
 sysdeps/unix/sysv/linux/sys/eventfd.h         |   5 +-
 sysdeps/unix/sysv/linux/sys/fanotify.h        |   6 +-
 sysdeps/unix/sysv/linux/sys/fsuid.h           |   2 +-
 sysdeps/unix/sysv/linux/sys/inotify.h         |  11 +-
 sysdeps/unix/sysv/linux/sys/procfs.h          |   6 +-
 sysdeps/unix/sysv/linux/sys/quota.h           |   6 +-
 sysdeps/unix/sysv/linux/sys/raw.h             |   7 +-
 sysdeps/unix/sysv/linux/sys/signalfd.h        |  47 +-
 sysdeps/unix/sysv/linux/sys/sysctl.h          |   4 +-
 sysdeps/unix/sysv/linux/sys/timex.h           |  18 +-
 sysdeps/unix/sysv/linux/test-errno-linux.c    |   2 +-
 sysdeps/unix/sysv/linux/tst-align-clone.c     |   5 +-
 sysdeps/unix/sysv/linux/ustat.c               |   9 +-
 sysdeps/unix/sysv/linux/x86/bits/epoll.h      |   5 +
 sysdeps/unix/sysv/linux/x86/bits/procfs.h     |   5 +
 sysdeps/unix/sysv/linux/x86/bits/typesizes.h  |  21 +-
 .../sysv/linux/x86/{sys => bits}/ucontext.h   |   6 +-
 sysdeps/unix/sysv/linux/x86/sys/user.h        |   2 +
 sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym |   1 -
 sysdeps/x86/bits/endian.h                     |   7 -
 sysdeps/x86/bits/endianness.h                 |  11 +
 sysvipc/sys/ipc.h                             |  24 +-
 sysvipc/sys/msg.h                             |  20 +-
 sysvipc/sys/sem.h                             |  13 +-
 sysvipc/sys/shm.h                             |  21 +-
 termios/termios.h                             |   8 +-
 time/sys/time.h                               |   6 +-
 time/time.h                                   |  15 +-
 wcsmbs/bits/wchar2.h                          |  14 +-
 wcsmbs/uchar.h                                |   4 +-
 wcsmbs/wchar.h                                |  46 +-
 wcsmbs/wcstol_l.c                             |   1 -
 wcsmbs/wcstoll_l.c                            |   1 -
 wcsmbs/wcstoul_l.c                            |   1 -
 wcsmbs/wcstoull_l.c                           |   1 -
 wctype/bits/wctype-wchar.h                    |   2 +-
 709 files changed, 4331 insertions(+), 4675 deletions(-)
 delete mode 100644 bits/endian.h
 create mode 100644 bits/endianness.h
 create mode 100644 bits/uapi-compat.h
 rename {sysdeps/generic/sys => bits}/ucontext.h (95%)
 copy {sysdeps/gnu/bits => bits}/utmp.h (83%)
 rename {sysdeps/gnu/bits => bits}/utmpx.h (82%)
 create mode 100644 include/bits/NULL.h
 create mode 100644 include/bits/endian.h
 create mode 100644 include/bits/strings_x2k8.h
 create mode 100644 include/bits/types/__va_list.h
 create mode 100644 include/bits/types/blkcnt64_t.h
 create mode 100644 include/bits/types/blkcnt_t.h
 create mode 100644 include/bits/types/blksize_t.h
 create mode 100644 include/bits/types/caddr_t.h
 create mode 100644 include/bits/types/daddr_t.h
 create mode 100644 include/bits/types/dev_t.h
 create mode 100644 include/bits/types/fsblkcnt64_t.h
 create mode 100644 include/bits/types/fsblkcnt_t.h
 create mode 100644 include/bits/types/fsfilcnt64_t.h
 create mode 100644 include/bits/types/fsfilcnt_t.h
 create mode 100644 include/bits/types/fsid_t.h
 create mode 100644 include/bits/types/gid_t.h
 create mode 100644 include/bits/types/id_t.h
 create mode 100644 include/bits/types/in_addr_t.h
 create mode 100644 include/bits/types/in_port_t.h
 create mode 100644 include/bits/types/ino64_t.h
 create mode 100644 include/bits/types/ino_t.h
 create mode 100644 include/bits/types/intptr_t.h
 create mode 100644 include/bits/types/key_t.h
 create mode 100644 include/bits/types/loff_t.h
 create mode 100644 include/bits/types/mode_t.h
 create mode 100644 include/bits/types/nlink_t.h
 create mode 100644 include/bits/types/off64_t.h
 create mode 100644 include/bits/types/off_t.h
 create mode 100644 include/bits/types/pid_t.h
 create mode 100644 include/bits/types/ptrdiff_t.h
 create mode 100644 include/bits/types/register_t.h
 create mode 100644 include/bits/types/size_t.h
 create mode 100644 include/bits/types/socklen_t.h
 create mode 100644 include/bits/types/ssize_t.h
 create mode 100644 include/bits/types/struct_in6_addr.h
 create mode 100644 include/bits/types/struct_in_addr.h
 create mode 100644 include/bits/types/struct_linger.h
 create mode 100644 include/bits/types/struct_sockaddr.h
 create mode 100644 include/bits/types/struct_sockaddr_in.h
 create mode 100644 include/bits/types/struct_sockaddr_in6.h
 create mode 100644 include/bits/types/struct_sockaddr_storage.h
 create mode 100644 include/bits/types/suseconds_t.h
 create mode 100644 include/bits/types/u_int.h
 create mode 100644 include/bits/types/u_intN_t.h
 create mode 100644 include/bits/types/uid_t.h
 create mode 100644 include/bits/types/uint.h
 create mode 100644 include/bits/types/useconds_t.h
 create mode 100644 include/bits/types/va_list.h
 create mode 100644 include/bits/types/wchar_t.h
 rewrite include/bits/xopen_lim.h (100%)
 rewrite include/features.h (100%)
 rewrite include/gnu-versions.h (100%)
 rewrite include/gnu/libc-version.h (100%)
 rewrite include/limits.h (100%)
 create mode 100644 include/netinet/in_systm.h
 create mode 100644 include/netinet/ip.h
 create mode 100644 include/netinet/ip_icmp.h
 create mode 100644 include/netinet/tcp.h
 create mode 100644 include/netinet/udp.h
 rewrite include/stdc-predef.h (100%)
 create mode 100644 include/sys/mtio.h
 create mode 100644 include/sys/socketvar.h
 rewrite include/sys/syslog.h (93%)
 create mode 100644 include/sys/ucontext.h
 rewrite include/syslog.h (100%)
 create mode 100644 include/utmpx.h
 rewrite include/values.h (100%)
 create mode 100644 inet/bits/types/in_addr_t.h
 create mode 100644 inet/bits/types/in_port_t.h
 create mode 100644 inet/bits/types/struct_in6_addr.h
 create mode 100644 inet/bits/types/struct_in_addr.h
 create mode 100644 inet/bits/types/struct_sockaddr_in.h
 create mode 100644 inet/bits/types/struct_sockaddr_in6.h
 rename {sysdeps/generic => inet}/netinet/in_systm.h (97%)
 rename {sysdeps/generic => inet}/netinet/ip.h (93%)
 rename {sysdeps/gnu => inet}/netinet/ip_icmp.h (90%)
 rename {sysdeps/gnu => inet}/netinet/tcp.h (74%)
 rename {sysdeps/gnu => inet}/netinet/udp.h (91%)
 copy io/{sys => }/poll.h (95%)
 rewrite io/sys/poll.h (99%)
 rename {sysdeps/gnu => login}/utmpx.h (94%)
 copy {include => misc}/bits/xopen_lim.h (100%)
 copy {include => misc}/features.h (100%)
 copy {include => misc}/gnu-versions.h (100%)
 copy {include => misc}/gnu/libc-version.h (100%)
 copy {include => misc}/limits.h (100%)
 copy {include => misc}/stdc-predef.h (100%)
 rename {sysdeps/gnu => misc}/sys/mtio.h (98%)
 rewrite misc/sys/syslog.h (99%)
 copy misc/{sys => }/syslog.h (97%)
 copy {include => misc}/values.h (100%)
 create mode 100644 posix/bits/types/blkcnt64_t.h
 create mode 100644 posix/bits/types/blkcnt_t.h
 create mode 100644 posix/bits/types/blksize_t.h
 create mode 100644 posix/bits/types/caddr_t.h
 create mode 100644 posix/bits/types/daddr_t.h
 create mode 100644 posix/bits/types/dev_t.h
 create mode 100644 posix/bits/types/fsblkcnt64_t.h
 create mode 100644 posix/bits/types/fsblkcnt_t.h
 create mode 100644 posix/bits/types/fsfilcnt64_t.h
 create mode 100644 posix/bits/types/fsfilcnt_t.h
 create mode 100644 posix/bits/types/fsid_t.h
 create mode 100644 posix/bits/types/gid_t.h
 create mode 100644 posix/bits/types/id_t.h
 create mode 100644 posix/bits/types/ino64_t.h
 create mode 100644 posix/bits/types/ino_t.h
 create mode 100644 posix/bits/types/intptr_t.h
 create mode 100644 posix/bits/types/key_t.h
 create mode 100644 posix/bits/types/loff_t.h
 create mode 100644 posix/bits/types/mode_t.h
 create mode 100644 posix/bits/types/nlink_t.h
 create mode 100644 posix/bits/types/off64_t.h
 create mode 100644 posix/bits/types/off_t.h
 create mode 100644 posix/bits/types/pid_t.h
 create mode 100644 posix/bits/types/register_t.h
 create mode 100644 posix/bits/types/socklen_t.h
 create mode 100644 posix/bits/types/ssize_t.h
 create mode 100644 posix/bits/types/suseconds_t.h
 create mode 100644 posix/bits/types/u_int.h
 create mode 100644 posix/bits/types/u_intN_t.h
 create mode 100644 posix/bits/types/uid_t.h
 create mode 100644 posix/bits/types/uint.h
 create mode 100644 posix/bits/types/useconds_t.h
 rewrite posix/sys/types.h (73%)
 create mode 100644 socket/bits/types/struct_linger.h
 create mode 100644 socket/bits/types/struct_sockaddr.h
 create mode 100644 socket/bits/types/struct_sockaddr_storage.h
 rename {sysdeps/gnu => socket}/net/if.h (98%)
 rename {sysdeps/generic => socket}/sys/socketvar.h (100%)
 create mode 100644 stdlib/bits/NULL.h
 create mode 100644 stdlib/bits/types/__va_list.h
 create mode 100644 stdlib/bits/types/ptrdiff_t.h
 create mode 100644 stdlib/bits/types/size_t.h
 create mode 100644 stdlib/bits/types/va_list.h
 create mode 100644 stdlib/bits/types/wchar_t.h
 create mode 100644 stdlib/sys/ucontext.h
 create mode 100644 string/bits/endian.h
 create mode 100644 string/bits/strings_x2k8.h
 delete mode 100644 sysdeps/aarch64/bits/endian.h
 create mode 100644 sysdeps/aarch64/bits/endianness.h
 delete mode 100644 sysdeps/alpha/bits/endian.h
 create mode 100644 sysdeps/alpha/bits/endianness.h
 delete mode 100644 sysdeps/arm/bits/endian.h
 create mode 100644 sysdeps/arm/bits/endianness.h
 rename sysdeps/arm/{sys => bits}/ucontext.h (96%)
 delete mode 100644 sysdeps/csky/bits/endian.h
 create mode 100644 sysdeps/csky/bits/endianness.h
 delete mode 100644 sysdeps/generic/net/if.h
 delete mode 100644 sysdeps/generic/netinet/tcp.h
 delete mode 100644 sysdeps/hppa/bits/endian.h
 create mode 100644 sysdeps/hppa/bits/endianness.h
 rename sysdeps/i386/{sys => bits}/ucontext.h (97%)
 create mode 100644 sysdeps/ia64/bits/endianness.h
 delete mode 100644 sysdeps/m68k/bits/endian.h
 create mode 100644 sysdeps/m68k/bits/endianness.h
 rename sysdeps/m68k/{sys => bits}/ucontext.h (96%)
 delete mode 100644 sysdeps/microblaze/bits/endian.h
 create mode 100644 sysdeps/microblaze/bits/endianness.h
 delete mode 100644 sysdeps/mips/bits/endian.h
 create mode 100644 sysdeps/mips/bits/endianness.h
 rename sysdeps/mips/{sys => bits}/ucontext.h (97%)
 delete mode 100644 sysdeps/nios2/bits/endian.h
 create mode 100644 sysdeps/nios2/bits/endianness.h
 delete mode 100644 sysdeps/powerpc/bits/endian.h
 create mode 100644 sysdeps/powerpc/bits/endianness.h
 delete mode 100644 sysdeps/riscv/bits/endian.h
 create mode 100644 sysdeps/riscv/bits/endianness.h
 delete mode 100644 sysdeps/s390/bits/endian.h
 create mode 100644 sysdeps/s390/bits/endianness.h
 delete mode 100644 sysdeps/sh/bits/endian.h
 create mode 100644 sysdeps/sh/bits/endianness.h
 delete mode 100644 sysdeps/sparc/bits/endian.h
 create mode 100644 sysdeps/sparc/bits/endianness.h
 rename sysdeps/unix/sysv/linux/aarch64/{sys => bits}/ucontext.h (95%)
 rename sysdeps/unix/sysv/linux/alpha/{sys => bits}/ucontext.h (96%)
 rename sysdeps/unix/sysv/linux/arm/{sys => bits}/ucontext.h (97%)
 create mode 100644 sysdeps/unix/sysv/linux/bits/uapi-compat.h
 rename sysdeps/unix/sysv/linux/csky/{sys => bits}/ucontext.h (96%)
 rename sysdeps/unix/sysv/linux/hppa/{sys => bits}/ucontext.h (96%)
 delete mode 100644 sysdeps/unix/sysv/linux/ia64/bits/endian.h
 create mode 100644 sysdeps/unix/sysv/linux/ia64/bits/types/__ia64_fpreg.h
 rename sysdeps/unix/sysv/linux/ia64/{sys => bits}/ucontext.h (91%)
 rename sysdeps/unix/sysv/linux/m68k/{sys => bits}/ucontext.h (97%)
 rename sysdeps/unix/sysv/linux/microblaze/{sys => bits}/ucontext.h (96%)
 copy sysdeps/unix/sysv/linux/{generic => mips}/bits/typesizes.h (82%)
 rename sysdeps/unix/sysv/linux/mips/{sys => bits}/ucontext.h (97%)
 rename sysdeps/unix/sysv/linux/nios2/{sys => bits}/ucontext.h (95%)
 rename sysdeps/unix/sysv/linux/powerpc/{sys => bits}/ucontext.h (98%)
 rename sysdeps/unix/sysv/linux/riscv/{sys => bits}/ucontext.h (97%)
 rename sysdeps/unix/sysv/linux/s390/{sys => bits}/ucontext.h (96%)
 rename sysdeps/{gnu => unix/sysv/linux/s390}/bits/utmp.h (83%)
 rename sysdeps/unix/sysv/linux/sh/{sys => bits}/ucontext.h (97%)
 rename sysdeps/unix/sysv/linux/sparc/{sys => bits}/ucontext.h (99%)
 rename sysdeps/unix/sysv/linux/x86/{sys => bits}/ucontext.h (98%)
 delete mode 100644 sysdeps/x86/bits/endian.h
 create mode 100644 sysdeps/x86/bits/endianness.h

Comments

Adhemerval Zanella Netto June 28, 2019, 11:27 a.m. UTC | #1
On 26/06/2019 14:49, Zack Weinberg wrote:
> I would like to propose this set of hygiene improvements to public
> header files for 2.30.  Its principal goal is to minimize the number
> of cases where standardized public headers include other public
> headers (standardized or not) and therefore define a bunch of symbols
> that they’re not formally specified to define.  It also removes a fair
> amount of cruft from sys/types.h and bits/types.h, obsoletes four
> additional typedefs that should not be used in public interfaces
> anymore (caddr_t, daddr_t, loff_t, register_t), and restricts
> sys/types.h’s definition of u_intN_t and register_t to __USE_MISC
> (i.e. they are no longer present in strict conformance modes).
> 
> These changes should not break portable programs, but they do have
> fairly high source compatibility risk; I regret not having been able
> to complete this patch series earlier in the development cycle.
> 
> This patch series is a superset of the “sys/types.h cleanup and
> further typedef obsoletion” patch series I posted in March, which was
> never fully reviewed.  I have rolled in all of the changes requested
> from what reviews did happen.

I will try to catch up with the patchset, but I am not sure I will be
able to review in full for 2.30.  I did a sanity check and looks that 
build-many-glibcs.py tools can produce workable toolchains for most 
ABIs (I have not checked all multiple variants for every one though, 
such the myriad of mips abis).
Zack Weinberg July 4, 2019, 11:31 p.m. UTC | #2
On Thu, Jul 4, 2019 at 1:54 PM Andreas K. Huettel <dilfridge@gentoo.org> wrote:
>
> are your commits available in a branch somewhere?

Yes, branch zack/no-nested-includes of the official glibc git
repository.  https://sourceware.org/git/?p=glibc.git;a=log;h=refs/heads/zack/no-nested-includes

> I would like to do some testing (easy with Gentoo) and have been trying
> unsuccessfully for two days now to get git to import the e-mails.

Thanks!  I look forward to hearing what your testing shows.

zw
Andreas K. Huettel July 5, 2019, 11:18 p.m. UTC | #3
Am Freitag, 5. Juli 2019, 01:31:57 CEST schrieb Zack Weinberg:
> On Thu, Jul 4, 2019 at 1:54 PM Andreas K. Huettel <dilfridge@gentoo.org> 
wrote:
> > are your commits available in a branch somewhere?
> 
> Yes, branch zack/no-nested-includes of the official glibc git
> repository. 
> https://sourceware.org/git/?p=glibc.git;a=log;h=refs/heads/zack/no-nested-i
> ncludes

OK great, thank you. Rebuilding a test chroot against (un-hygienized) master 
glibc now, then I'll add your patches, rebuild glibc, and have the chroot 
rebuild itself again. 

If you have any suggestions what software to try...
Andreas K. Huettel July 6, 2019, 10:45 a.m. UTC | #4
> OK great, thank you. Rebuilding a test chroot against (un-hygienized) master
> glibc now, then I'll add your patches, rebuild glibc, and have the chroot
> rebuild itself again.

Soo, this has definitely some blast radius. Before the extra patches, all packages of the (rather minimal, system-only) chroot rebuilt fine against glibc-master.

Afterwards... not. Log snippets for the first half of fails are below, as is the full list of packages in the chroot. 
I'll look at the second half of the logs in the evening.

 * The following 16 packages have failed to build, install, or execute
 * postinst:
 * 
 *  (sys-process/procps-3.3.15-r1:0/6::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-process/procps-3.3.15-r1:20190705-233948.log.gz'
 *  (sys-apps/net-tools-1.60_p20180626073013:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-apps/net-tools-1.60_p20180626073013:20190705-234440.log.gz'
 *  (net-firewall/iptables-1.8.3-r1:0/1.8.3::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/net-firewall/iptables-1.8.3-r1:20190705-235208.log.gz'
 *  (sys-apps/busybox-1.31.0:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-apps/busybox-1.31.0:20190705-235219.log.gz'
 *  (sys-apps/util-linux-2.34:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-apps/util-linux-2.34:20190706-000751.log.gz'
 *  (sys-apps/shadow-4.7:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-apps/shadow-4.7:20190706-000808.log.gz'
 *  (sys-devel/gcc-9.1.0-r1:9.1.0/9.1.0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-devel/gcc-9.1.0-r1:20190706-000853.log.gz'
 *  (sys-apps/iproute2-5.1.0:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-apps/iproute2-5.1.0:20190706-003817.log.gz'
 *  (net-misc/openssh-8.0_p1-r2:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/net-misc/openssh-8.0_p1-r2:20190706-004440.log.gz'
 *  (sys-process/psmisc-23.2-r2:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-process/psmisc-23.2-r2:20190706-004551.log.gz'
 *  (net-libs/libtirpc-1.1.4:0/3::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/net-libs/libtirpc-1.1.4:20190706-004909.log.gz'
 *  (app-crypt/pinentry-1.1.0-r3:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/app-crypt/pinentry-1.1.0-r3:20190706-010111.log.gz'
 *  (net-libs/libnsl-1.2.0:0/2::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/net-libs/libnsl-1.2.0:20190706-010540.log.gz'
 *  (sys-libs/pam-1.3.1-r1:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-libs/pam-1.3.1-r1:20190706-011458.log.gz'
 *  (net-misc/iputils-20190515:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/net-misc/iputils-20190515:20190706-011527.log.gz'
 *  (sys-fs/udev-242:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/build/sys-fs/udev-242:20190706-011534.log.gz'


/var/log/portage/build/sys-process/procps-3.3.15-r1:20190705-233948.log.gz

x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -include ./config.h -I. -I./include -DLOCALEDIR=\"/usr/share/locale\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Iproc -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -c -o w.o w.c
w.c: In function ‘print_from’:
w.c:204:19: error: ‘AF_INET6’ undeclared (first use in this function)
  204 |    if (!inet_ntop(AF_INET6, &ut_addr_v6, buf_ipv6, sizeof(buf_ipv6))) {
      |                   ^~~~~~~~
w.c:204:19: note: each undeclared identifier is reported only once for each function it appears in
w.c:211:37: error: ‘AF_INET’ undeclared (first use in this function)
  211 |    if (!(ut_addr_v6[0] && inet_ntop(AF_INET, &ut_addr_v6[0], buf, sizeof(buf)))) {
      |                                     ^~~~~~~
make[2]: *** [Makefile:1501: w.o] Error 1

https://gitlab.com/procps-ng/procps/blob/master/w.c



/var/log/portage/build/sys-apps/net-tools-1.60_p20180626073013:20190705-234440.log.gz

x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -Wall -fno-strict-aliasing  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I. -I/var/tmp
/portage/sys-apps/net-tools-1.60_p20180626073013/work/net-tools-1.60_p20180626073013/include -Ilib -c ifconfig.c
ifconfig.c: In function ‘main’:
ifconfig.c:488:32: error: ‘uintptr_t’ undeclared (first use in this function); did you mean ‘intptr_t’?
  488 |      ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp);
      |                                ^~~~~~~~~
      |                                intptr_t
ifconfig.c:488:32: note: each undeclared identifier is reported only once for each function it appears in
ifconfig.c:488:42: error: expected ‘;’ before ‘atoi’
  488 |      ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp);
      |                                          ^~~~~
      |                                          ;
ifconfig.c:502:42: error: expected ‘;’ before ‘atoi’
  502 |      ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp);
      |                                          ^~~~~
      |                                          ;

https://sourceforge.net/p/net-tools/code/ci/master/tree/ifconfig.c



/var/log/portage/build/net-firewall/iptables-1.8.3-r1:20190705-235208.log.gz

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT      -DXTABLES_LIBDIR=\"/usr/lib64/xtables\" -DXTABLES_INTERNAL -I../include -I.
./include -I..      -Wall -Waggregate-return -Wmissing-declarations  -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes     -Wlogical-op    -Winline -pipe  -DENABLE_IPV4 -DENABLE_IPV6 -m
arch=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -c -o xtables_legacy_multi-iptables-restore.o `test -f 'iptables-restore.c' || echo './'`iptables-restore.c
iptables-restore.c:25:15: error: variable ‘wait_interval’ has initializer but incomplete type
   25 | static struct timeval wait_interval = {
      |               ^~~~~~~
iptables-restore.c:26:3: error: ‘struct timeval’ has no member named ‘tv_sec’
   26 |  .tv_sec = 1,
      |   ^~~~~~

https://git.netfilter.org/iptables/tree/iptables/iptables-restore.c



/var/log/portage/build/sys-apps/busybox-1.31.0:20190705-235219.log.gz

  x86_64-pc-linux-gnu-gcc -Wp,-MD,networking/libiproute/.iptunnel.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.31.0)" -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char   -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-builtin-printf      -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(iptunnel)"  -D"KBUILD_MODNAME=KBUILD_STR(iptunnel)" -c -o networking/libiproute/iptunnel.o networking/libiproute/iptunnel.c
networking/libiproute/iptunnel.c:45:2: error: unknown type name ‘uint16_t’
   45 |  uint16_t        i_flags;
      |  ^~~~~~~~
networking/libiproute/iptunnel.c:46:2: error: unknown type name ‘uint16_t’
   46 |  uint16_t        o_flags;
      |  ^~~~~~~~
networking/libiproute/iptunnel.c:47:2: error: unknown type name ‘uint32_t’
   47 |  uint32_t        i_key;
      |  ^~~~~~~~
networking/libiproute/iptunnel.c:48:2: error: unknown type name ‘uint32_t’
   48 |  uint32_t        o_key;
      |  ^~~~~~~~

https://git.busybox.net/busybox/tree/networking/libiproute/iptunnel.c



/var/log/portage/build/sys-apps/util-linux-2.34:20190706-000751.log.gz

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34  -include config.h -I/var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34/include -D
LOCALEDIR=\"/usr/share/locale\" -D_PATH_RUNSTATEDIR=\"/var/lib/run\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmiss
ing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-v
ariable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wimplicit-function-declaration -Wdiscarded-qualifiers -march=native -O
2 -pipe -ggdb -frecord-gcc-switches -flto -c -o login-utils/last.o /var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34/login-utils/last.c
/var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34/login-utils/last.c: In function ‘dns_lookup’:
/var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34/login-utils/last.c:314:20: error: ‘AF_INET’ undeclared (first use in this function)
  314 |   sin.sin_family = AF_INET;
      |                    ^~~~~~~
/var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34/login-utils/last.c:314:20: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/sys-apps/util-linux-2.34/work/util-linux-2.34/login-utils/last.c:322:22: error: ‘AF_INET6’ undeclared (first use in this function)
  322 |   sin6.sin6_family = AF_INET6;
      |                      ^~~~~~~~

https://github.com/karelzak/util-linux/blob/master/login-utils/last.c



/var/log/portage/build/sys-apps/shadow-4.7:20190706-000808.log.gz

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I../lib   -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -c -o utmp.o utmp.c
utmp.c: In function ‘prepare_utmp’:
utmp.c:294:17: error: dereferencing pointer to incomplete type ‘struct sockaddr_in’
  294 |             &(sa->sin_addr),
      |                 ^~
utmp.c:307:17: error: dereferencing pointer to incomplete type ‘struct sockaddr_in6’
  307 |             &(sa->sin6_addr),
      |                 ^~

https://github.com/shadow-maint/shadow/blob/master/libmisc/utmp.c



/var/log/portage/build/sys-devel/gcc-9.1.0-r1:20190706-000853.log.gz

/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:81:7: error: ‘fd_set’ was not declared in this scope
   81 |       fd_set read_set;
      |       ^~~~~~
/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:83:17: error: ‘read_set’ was not declared in this scope
   83 |       FD_ZERO (&read_set);
      |                 ^~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:83:7: error: ‘FD_ZERO’ was not declared in this scope
   83 |       FD_ZERO (&read_set);
      |       ^~~~~~~
/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:84:7: error: ‘FD_SET’ was not declared in this scope; did you mean ‘L_SET’?
   84 |       FD_SET (m_fd, &read_set);
      |       ^~~~~~
      |       L_SET
/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:88:26: error: ‘FD_SETSIZE’ was not declared in this scope; did you mean ‘CPU_SETSIZE’?
   88 |       int nfds = select (FD_SETSIZE, &read_set, NULL, NULL, NULL);
      |                          ^~~~~~~~~~
      |                          CPU_SETSIZE
/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:88:18: error: ‘select’ was not declared in this scope
   88 |       int nfds = select (FD_SETSIZE, &read_set, NULL, NULL, NULL);
      |                  ^~~~~~
/var/tmp/portage/sys-devel/gcc-9.1.0-r1/work/gcc-9.1.0/libcc1/connection.cc:102:29: error: ‘FD_ISSET’ was not declared in this scope; did you mean ‘CPU_ISSET’?
  102 |       if (m_aux_fd != -1 && FD_ISSET (m_aux_fd, &read_set))
      |                             ^~~~~~~~
      |                             CPU_ISSET

https://github.com/gcc-mirror/gcc/blob/master/libcc1/connection.cc



Full list of packages in the chroot (you can ignore the gentoo-specific virtual/*):

app-admin/eselect-1.4.14
app-admin/perl-cleaner-2.27
app-arch/bzip2-1.0.6-r11
app-arch/gzip-1.10
app-arch/tar-1.32
app-arch/unzip-6.0_p21-r2
app-arch/xz-utils-5.2.4-r3
app-crypt/gnupg-2.2.16-r1
app-crypt/gpgme-1.13.0
app-crypt/libb2-0.98.1-r1
app-crypt/openpgp-keys-gentoo-release-20190427
app-crypt/pinentry-1.1.0-r3
app-editors/nano-4.3
app-eselect/eselect-lib-bin-symlink-0.1.1
app-eselect/eselect-pinentry-0.7
app-eselect/eselect-python-20190417
app-i18n/man-pages-de-2.12
app-misc/c_rehash-1.7-r1
app-misc/ca-certificates-20190110.3.43
app-misc/editor-wrapper-4
app-misc/mime-types-9
app-misc/mmv-1.01b_p18-r1
app-misc/pax-utils-1.2.4
app-portage/eix-0.33.8
app-portage/elt-patches-20170826.1
app-portage/gemato-14.1
app-portage/genlop-0.30.10-r2
app-portage/gentoolkit-0.4.5
app-portage/portage-utils-0.80_pre20190620
app-portage/repoman-2.3.16
app-portage/ufed-0.94
app-shells/bash-5.0_p7
app-shells/push-2.0-r1
app-shells/quoter-3.0_p2-r1
app-text/build-docbook-catalog-1.21
app-text/docbook-xml-dtd-4.1.2-r6
app-text/docbook-xml-dtd-4.2-r2
app-text/docbook-xml-dtd-4.3-r1
app-text/docbook-xml-dtd-4.4-r2
app-text/docbook-xml-dtd-4.5-r1
app-text/docbook-xsl-stylesheets-1.79.1-r2
app-text/opensp-1.5.2-r6
app-text/po4a-0.55
app-text/sgml-common-0.6.3-r6
dev-lang/perl-5.30.0
dev-lang/python-2.7.16
dev-lang/python-3.6.8
dev-lang/python-exec-2.4.6
dev-lang/tcl-8.6.9
dev-libs/expat-2.2.7
dev-libs/gmp-6.1.2-r1
dev-libs/iniparser-3.1-r1
dev-libs/libassuan-2.5.1-r1
dev-libs/libbsd-0.9.1
dev-libs/libffi-3.3_rc0
dev-libs/libgcrypt-1.8.4
dev-libs/libgpg-error-1.36
dev-libs/libksba-1.3.5-r2
dev-libs/libltdl-2.4.6
dev-libs/libpcre-8.43
dev-libs/libpcre2-10.33
dev-libs/libtasn1-4.13
dev-libs/libunistring-0.9.10
dev-libs/libxml2-2.9.9-r1
dev-libs/libxslt-1.1.33-r1
dev-libs/mpc-1.1.0-r1
dev-libs/mpfr-4.0.2
dev-libs/nettle-3.5.1
dev-libs/npth-1.6-r1
dev-libs/openssl-1.1.0k
dev-libs/popt-1.16-r2
dev-perl/Authen-SASL-2.160.0-r1
dev-perl/Date-Manip-6.600.0
dev-perl/Digest-HMAC-1.30.0-r1
dev-perl/Encode-Locale-1.50.0
dev-perl/Error-0.170.250
dev-perl/File-Listing-6.40.0-r1
dev-perl/HTML-Parser-3.720.0
dev-perl/HTML-Tagset-3.200.0-r1
dev-perl/HTTP-Cookies-6.40.0
dev-perl/HTTP-Daemon-6.10.0-r2
dev-perl/HTTP-Date-6.20.0-r1
dev-perl/HTTP-Message-6.130.0
dev-perl/HTTP-Negotiate-6.10.0-r1
dev-perl/IO-HTML-1.1.0
dev-perl/IO-Socket-INET6-2.720.0-r1
dev-perl/IO-Socket-SSL-2.52.0
dev-perl/LWP-MediaTypes-6.20.0-r1
dev-perl/LWP-Protocol-https-6.70.0
dev-perl/Locale-gettext-1.70.0
dev-perl/MIME-Charset-1.12.2
dev-perl/MailTools-2.190.0
dev-perl/Module-Build-0.422.400
dev-perl/Net-HTTP-6.170.0
dev-perl/Net-SSLeay-1.850.0
dev-perl/SGMLSpm-1.1-r1
dev-perl/Socket6-0.280.0
dev-perl/Sub-Name-0.210.0
dev-perl/TermReadKey-2.370.0
dev-perl/Text-CharWidth-0.40.0-r1
dev-perl/Text-WrapI18N-0.60.0-r1
dev-perl/TimeDate-2.300.0
dev-perl/Try-Tiny-0.300.0
dev-perl/URI-1.730.0
dev-perl/Unicode-LineBreak-2017.4.0-r1
dev-perl/WWW-RobotRules-6.20.0-r1
dev-perl/XML-Parser-2.440.0
dev-perl/YAML-Tiny-1.730.0
dev-perl/libwww-perl-6.270.0
dev-python/bz2file-0.98
dev-python/certifi-2018.11.29
dev-python/cython-0.29.10
dev-python/lxml-4.3.3
dev-python/pyblake2-1.1.2
dev-python/pyxattr-0.6.1
dev-python/pyyaml-5.1
dev-python/setuptools-41.0.1
dev-tcltk/expect-5.45.4
dev-util/dejagnu-1.6
dev-util/gperf-3.1
dev-util/gtk-doc-am-1.25-r1
dev-util/intltool-0.51.0-r2
dev-util/meson-0.50.1
dev-util/ninja-1.9.0
dev-util/pkgconfig-openbsd-20130507-r2
dev-util/re2c-1.1.1
dev-vcs/git-2.22.0
net-dns/libidn2-2.2.0
net-firewall/iptables-1.8.3-r1
net-libs/gnutls-3.6.7
net-libs/libmnl-1.0.4
net-libs/libnsl-1.2.0
net-libs/libtirpc-1.1.4
net-misc/curl-7.65.1
net-misc/iputils-20190515
net-misc/netifrc-0.6.1
net-misc/openssh-8.0_p1-r2
net-misc/rsync-3.1.3
net-misc/wget-1.20.3-r2
perl-core/File-Temp-0.230.900
sys-apps/acl-2.2.53
sys-apps/attr-2.4.48-r3
sys-apps/baselayout-2.6-r1
sys-apps/busybox-1.31.0
sys-apps/coreutils-8.31
sys-apps/debianutils-4.8.6.1
sys-apps/diffutils-3.7
sys-apps/file-5.37
sys-apps/findutils-4.6.0-r1
sys-apps/gawk-5.0.1
sys-apps/gentoo-functions-0.12
sys-apps/grep-3.3-r1
sys-apps/groff-1.22.4
sys-apps/help2man-1.47.10
sys-apps/hwids-20190316
sys-apps/install-xattr-0.7
sys-apps/iproute2-5.1.0
sys-apps/kbd-2.0.4
sys-apps/kmod-26-r1
sys-apps/less-551
sys-apps/man-1.6g-r1
sys-apps/man-pages-5.01
sys-apps/man-pages-posix-2013a
sys-apps/net-tools-1.60_p20180626073013
sys-apps/openrc-0.41.2
sys-apps/opentmpfiles-0.2
sys-apps/portage-2.3.67
sys-apps/sandbox-2.17
sys-apps/sed-4.7
sys-apps/shadow-4.7
sys-apps/sysvinit-2.95
sys-apps/texinfo-6.6-r3
sys-apps/util-linux-2.34
sys-apps/which-2.21
sys-auth/pambase-20190402
sys-devel/autoconf-2.69-r4
sys-devel/autoconf-wrapper-13-r1
sys-devel/automake-1.16.1-r1
sys-devel/automake-wrapper-11
sys-devel/binutils-2.32-r1
sys-devel/binutils-config-5.1-r1
sys-devel/bison-3.4.1
sys-devel/flex-2.6.4-r1
sys-devel/gcc-9.1.0-r1
sys-devel/gcc-config-2.0
sys-devel/gettext-0.20.1
sys-devel/gnuconfig-20180101
sys-devel/libtool-2.4.6-r5
sys-devel/m4-1.4.18-r1
sys-devel/make-4.2.1-r4
sys-devel/patch-2.7.6-r3
sys-fs/e2fsprogs-1.45.2
sys-fs/udev-242
sys-fs/udev-init-scripts-33
sys-kernel/linux-headers-5.1
sys-libs/cracklib-2.9.7
sys-libs/db-6.0.35-r1
sys-libs/e2fsprogs-libs-1.45.2
sys-libs/gdbm-1.18.1
sys-libs/glibc-9999
sys-libs/libcap-2.27
sys-libs/libseccomp-2.4.1
sys-libs/ncurses-6.1_p20181020
sys-libs/pam-1.3.1-r1
sys-libs/readline-8.0
sys-libs/timezone-data-2019a
sys-libs/zlib-1.2.11-r2
sys-process/procps-3.3.15-r1
sys-process/psmisc-23.2-r2
virtual/acl-0-r2
virtual/dev-manager-0-r2
virtual/editor-0-r2
virtual/libc-1
virtual/libffi-3.3_rc0
virtual/libiconv-0-r2
virtual/libintl-0-r2
virtual/man-0-r2
virtual/modutils-0
virtual/os-headers-0-r1
virtual/package-manager-1
virtual/pager-0
virtual/pam-0-r1
virtual/perl-CPAN-Meta-2.150.10-r2
virtual/perl-CPAN-Meta-YAML-0.18.0-r4
virtual/perl-Carp-1.500.0-r1
virtual/perl-Compress-Raw-Bzip2-2.84.0
virtual/perl-Compress-Raw-Zlib-2.84.0
virtual/perl-Data-Dumper-2.174.0
virtual/perl-Digest-MD5-2.550.0-r1
virtual/perl-Digest-SHA-6.20.0
virtual/perl-Encode-3.10.0
virtual/perl-Exporter-5.730.0-r1
virtual/perl-ExtUtils-CBuilder-0.280.231
virtual/perl-ExtUtils-Install-2.140.0-r1
virtual/perl-ExtUtils-MakeMaker-7.340.0-r1
virtual/perl-ExtUtils-Manifest-1.720.0
virtual/perl-ExtUtils-ParseXS-3.400.0
virtual/perl-File-Spec-3.780.0
virtual/perl-File-Temp-0.230.900
virtual/perl-Getopt-Long-2.500.0-r1
virtual/perl-IO-1.400.0
virtual/perl-IO-Compress-2.84.0
virtual/perl-IO-Socket-IP-0.390.0-r1
virtual/perl-JSON-PP-4.20.0
virtual/perl-MIME-Base64-3.150.0-r5
virtual/perl-Module-Metadata-1.0.36
virtual/perl-Parse-CPAN-Meta-2.150.10-r2
virtual/perl-Perl-OSType-1.10.0-r2
virtual/perl-Scalar-List-Utils-1.500.0-r1
virtual/perl-Storable-3.150.0
virtual/perl-Test-Harness-3.420.0-r1
virtual/perl-Text-ParseWords-3.300.0-r5
virtual/perl-Time-Local-1.280.0
virtual/perl-XSLoader-0.300.0-r1
virtual/perl-libnet-3.110.0-r1
virtual/perl-parent-0.237.0
virtual/perl-podlators-4.110.0
virtual/perl-version-0.992.400
virtual/pkgconfig-1
virtual/service-manager-0
virtual/shadow-0
virtual/ssh-0
virtual/tmpfiles-0
virtual/udev-217
virtual/yacc-0
Andreas K. Huettel July 6, 2019, 2:59 p.m. UTC | #5
Am Samstag, 6. Juli 2019, 12:45:15 CEST schrieb Andreas K. Huettel:
> > OK great, thank you. Rebuilding a test chroot against (un-hygienized)
> > master glibc now, then I'll add your patches, rebuild glibc, and have the
> > chroot rebuild itself again.
> 
> Soo, this has definitely some blast radius. Before the extra patches, all
> packages of the (rather minimal, system-only) chroot rebuilt fine against
> glibc-master.
> 
> Afterwards... not. Log snippets for the first half of fails are below, as is
> the full list of packages in the chroot. I'll look at the second half of
> the logs in the evening.
> 

Here's the rest of the log snippets. Note that I didnt list all errors, only the first one(s). Also, more source files may be broken that the build doesnt even reach. 


/var/log/portage/build/sys-apps/iproute2-5.1.0:20190706-003817.log.gz

x86_64-pc-linux-gnu-gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto  -I../include -I
../include/uapi -DRESOLVE_HOSTNAMES -DLIBDIR=\"/lib64\" -DCONFDIR=\"/etc/iproute2\" -DNETNS_RUN_DIR=\"/var/run/netns\" -DNETNS_ETC_DIR=\"/etc/netns\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOU
RCE -D_LARGEFILE64_SOURCE -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -DHAVE_LIBBSD -I/usr/include -DHAVE_SETNS -DHAVE_LIBMNL -I/usr/include -fPIC   -c -o color.o color.c
In file included from /usr/include/resolv.h:62,
                 from ../include/utils.h:7,
                 from color.c:12:
/usr/include/bits/types/res_state.h:22:3: error: array type has incomplete element type ‘struct sockaddr_in’
   22 |   nsaddr_list[MAXNS]; /* address of name server */
      |   ^~~~~~~~~~~
/usr/include/bits/types/res_state.h:33:18: error: field ‘addr’ has incomplete type
   33 |   struct in_addr addr;
      |                  ^~~~
/usr/include/bits/in.h:127:20: error: field ‘ip_dst’ has incomplete type
  127 |     struct in_addr ip_dst; /* First hop; zero without source route.  */
      |                    ^~~~~~
/usr/include/bits/in.h:134:20: error: field ‘imr_multiaddr’ has incomplete type
  134 |     struct in_addr imr_multiaddr; /* IP multicast address of group */
      |                    ^~~~~~~~~~~~~
/usr/include/bits/in.h:135:20: error: field ‘imr_address’ has incomplete type
  135 |     struct in_addr imr_address;  /* local IP address of interface */
      |                    ^~~~~~~~~~~
/usr/include/bits/in.h:143:20: error: field ‘ipi_spec_dst’ has incomplete type
  143 |     struct in_addr ipi_spec_dst; /* Routing destination address  */
      |                    ^~~~~~~~~~~~
...



/var/log/portage/build/net-misc/openssh-8.0_p1-r2:20190706-004440.log.gz

x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign
 -Wno-unused-result -fno-strict-aliasing  -ftrapv -fno-builtin-memset -fstack-protector-strong -fPIE   -I. -I.. -I. -I./..  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -DHAVE_CONFIG_H -c kludge-f
d_set.c
kludge-fd_set.c:19:27: error: unknown type name ‘fd_set’
   19 | void kludge_FD_SET(int n, fd_set *set) {
      |                           ^~~~~~
kludge-fd_set.c:22:28: error: unknown type name ‘fd_set’
   22 | int kludge_FD_ISSET(int n, fd_set *set) {
      |                            ^~~~~~

https://github.com/openssh/openssh-portable/blob/master/openbsd-compat/kludge-fd_set.c



/var/log/portage/build/sys-process/psmisc-23.2-r2:20190706-004551.log.gz

c -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto  -Wl,-O1 -Wl,--as-needed  peekfd.c   -o peekfd
peekfd.c: In function ‘detach’:
peekfd.c:103:2: warning: implicit declaration of function ‘signal’ [-Wimplicit-function-declaration]
  103 |  signal(SIGINT, SIG_DFL);
      |  ^~~~~~
peekfd.c:103:9: error: ‘SIGINT’ undeclared (first use in this function)
  103 |  signal(SIGINT, SIG_DFL);
      |         ^~~~~~
peekfd.c:103:9: note: each undeclared identifier is reported only once for each function it appears in
peekfd.c:103:17: error: ‘SIG_DFL’ undeclared (first use in this function)
  103 |  signal(SIGINT, SIG_DFL);
      |                 ^~~~~~~
...

https://gitlab.com/psmisc/psmisc/blob/master/src/peekfd.c



/var/log/portage/build/net-libs/libtirpc-1.1.4:20190706-004909.log.gz

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/src -I.. -I/var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/tirpc
 -include config.h -DPORTMAP -DINET6 -D_GNU_SOURCE -Wall -pipe -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -c /var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/src/authunix_prot.
c  -fPIC -DPIC -o .libs/libtirpc_la-authunix_prot.o
In file included from /var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/src/authunix_prot.c:39:
/var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/tirpc/rpc/types.h:75:9: error: unknown type name ‘__u_char’
   75 | typedef __u_char u_char;
      |         ^~~~~~~~
/var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/tirpc/rpc/types.h:75:18: error: conflicting types for ‘u_char’
   75 | typedef __u_char u_char;
      |                  ^~~~~~
In file included from /usr/include/sys/types.h:91,
                 from /var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/tirpc/rpc/types.h:41,
                 from /var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/src/authunix_prot.c:39:
/usr/include/bits/types/u_int.h:8:23: note: previous declaration of ‘u_char’ was here
    8 | typedef unsigned char u_char;
      |                       ^~~~~~
In file included from /var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/src/authunix_prot.c:39:
/var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/tirpc/rpc/types.h:76:9: error: unknown type name ‘__u_short’
   76 | typedef __u_short u_short;
      |         ^~~~~~~~~
/var/tmp/portage/net-libs/libtirpc-1.1.4/work/libtirpc-1.1.4/tirpc/rpc/types.h:76:19: error: conflicting types for ‘u_short’
   76 | typedef __u_short u_short;
      |                   ^~~~~~~
...

https://git.linux-nfs.org/?p=steved/libtirpc.git;a=blob;f=tirpc/rpc/types.h



/var/log/portage/build/app-crypt/pinentry-1.1.0-r3:20190706-010111.log.gz

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..   -I../secmem -Wall  -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -Wall -Wno-pointer-sign -Wpointer-arith -c -o pinentry-emacs.o pinentry-emacs.c
pinentry-emacs.c: In function ‘read_from_emacs’:
pinentry-emacs.c:316:3: error: unknown type name ‘fd_set’
  316 |   fd_set rfds;
      |   ^~~~~~
pinentry-emacs.c:329:3: warning: implicit declaration of function ‘FD_ZERO’; did you mean ‘NZERO’? [-Wimplicit-function-declaration]
  329 |   FD_ZERO (&rfds);
      |   ^~~~~~~
      |   NZERO
pinentry-emacs.c:330:3: warning: implicit declaration of function ‘FD_SET’; did you mean ‘L_SET’? [-Wimplicit-function-declaration]
  330 |   FD_SET (s, &rfds);
      |   ^~~~~~
      |   L_SET
pinentry-emacs.c:331:12: warning: implicit declaration of function ‘select’ [-Wimplicit-function-declaration]
  331 |   retval = select (s + 1, &rfds, NULL, NULL, &tv);
      |            ^~~~~~

https://github.com/gpg/pinentry/blob/master/emacs/pinentry-emacs.c



/var/log/portage/build/net-libs/libnsl-1.2.0:20190706-010540.log.gz

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/net-libs/libnsl-1.2.0/work/libnsl-1.2.0/src -I.. -I/var/tmp/portage/net-libs/libnsl-1.2.0/work/libnsl-1.2.0/src -I/usr/in
clude/tirpc -DLOCALEDIR=\"/usr/share/locale\" -W -Wall -Wbad-function-cast -Wcast-align -Winline -Wnested-externs -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -D_REENT
RANT=1 -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -c /var/tmp/portage/net-libs/libnsl-1.2.0/work/libnsl-1.2.0/src/yp_xdr.c  -fPIC -DPIC -o .libs/yp_xdr.o
In file included from /var/tmp/portage/net-libs/libnsl-1.2.0/work/libnsl-1.2.0/src/yp_xdr.c:41:
/usr/include/tirpc/rpc/types.h:75:9: error: unknown type name ‘__u_char’
   75 | typedef __u_char u_char;
      |         ^~~~~~~~
/usr/include/tirpc/rpc/types.h:75:18: error: conflicting types for ‘u_char’
   75 | typedef __u_char u_char;
      |                  ^~~~~~
In file included from /usr/include/sys/types.h:91,
                 from /usr/include/tirpc/rpc/types.h:41,
                 from /var/tmp/portage/net-libs/libnsl-1.2.0/work/libnsl-1.2.0/src/yp_xdr.c:41:
/usr/include/bits/types/u_int.h:8:23: note: previous declaration of ‘u_char’ was here
    8 | typedef unsigned char u_char;
      |                       ^~~~~~
In file included from /var/tmp/portage/net-libs/libnsl-1.2.0/work/libnsl-1.2.0/src/yp_xdr.c:41:
/usr/include/tirpc/rpc/types.h:76:9: error: unknown type name ‘__u_short’
   76 | typedef __u_short u_short;
      |         ^~~~~~~~~
/usr/include/tirpc/rpc/types.h:76:19: error: conflicting types for ‘u_short’
   76 | typedef __u_short u_short;
      |                   ^~~~~~~
...

https://github.com/thkukuk/libnsl/blob/master/src/yp_xdr.c



/var/log/portage/build/sys-libs/pam-1.3.1-r1:20190706-011458.log.gz

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace -I../.. -I/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/li
nux-pam-1.3.1/libpam/include -I/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/libpamc/include -DSECURECONF_DIR=\"/etc/security/\" -march=native -O2 -pipe -ggdb -frecord-gcc-switches -flto -W
 -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wwrite-strings -Winline -Wshadow -c /var/tmp/portage/sys
-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c  -fPIC -DPIC -o .libs/pam_namespace.o
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c: In function ‘inst_init’:
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c:1177:19: error: storage size of ‘newsa’ isn’t known
 1177 |  struct sigaction newsa, oldsa;
      |                   ^~~~~
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c:1177:26: error: storage size of ‘oldsa’ isn’t known
 1177 |  struct sigaction newsa, oldsa;
      |                          ^~~~~
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c:1182:28: error: ‘SIG_DFL’ undeclared (first use in this function)
 1182 |         newsa.sa_handler = SIG_DFL;
      |                            ^~~~~~~
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c:1182:28: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c:1183:6: warning: implicit declaration of function ‘sigaction’ [-Wimplicit-function-declaration]
 1183 |  if (sigaction(SIGCHLD, &newsa, &oldsa) == -1) {
      |      ^~~~~~~~~
/var/tmp/portage/sys-libs/pam-1.3.1-r1/work/linux-pam-1.3.1/modules/pam_namespace/pam_namespace.c:1183:16: error: ‘SIGCHLD’ undeclared (first use in this function)
 1183 |  if (sigaction(SIGCHLD, &newsa, &oldsa) == -1) {
      |                ^~~~~~~
...

https://github.com/linux-pam/linux-pam/blob/master/modules/pam_namespace/pam_namespace.c



/var/log/portage/build/net-misc/iputils-20190515:20190706-011527.log.gz

[4/9] x86_64-pc-linux-gnu-gcc -Iarping@exe -I. -I../iputils-s20190515 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c99 -include config.h -include git-version.h '-DGETTEXT_PACKAGE="iputils"' -march=native -O2 -ggdb -frecord-gcc-switches -flto -MD -MQ 'arping@exe/arping.c.o' -MF 'arping@exe/arping.c.o.d' -o 'arping@exe/arping.c.o' -c ../iputils-s20190515/arping.c
FAILED: arping@exe/arping.c.o 
x86_64-pc-linux-gnu-gcc -Iarping@exe -I. -I../iputils-s20190515 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c99 -include config.h -include git-version.h '-DGETTEXT_PACKAGE="iputils"' -march=native -O2 -ggdb -frecord-gcc-switches -flto -MD -MQ 'arping@exe/arping.c.o' -MF 'arping@exe/arping.c.o.d' -o 'arping@exe/arping.c.o' -c ../iputils-s20190515/arping.c
../iputils-s20190515/arping.c: In function ‘send_pack’:
../iputils-s20190515/arping.c:281:8: warning: implicit declaration of function ‘sendto’ [-Wimplicit-function-declaration]
  281 |  err = sendto(ctl->socketfd, buf, p - buf, 0, (struct sockaddr *)HE, sll_len(ah->ar_hln));
      |        ^~~~~~
../iputils-s20190515/arping.c: In function ‘netlink_query’:
../iputils-s20190515/arping.c:472:9: error: variable ‘mh’ has initializer but incomplete type
  472 |  struct msghdr mh = { 0 };
      |         ^~~~~~
../iputils-s20190515/arping.c:472:23: warning: excess elements in struct initializer
  472 |  struct msghdr mh = { 0 };
      |                       ^
...

https://github.com/iputils/iputils/blob/master/arping.c



/var/log/portage/build/sys-fs/udev-242:20190706-011534.log.gz

FAILED: src/libsystemd-network/efd04ff@@systemd-network@sta/arp-util.c.o 
x86_64-pc-linux-gnu-gcc -Isrc/libsystemd-network/efd04ff@@systemd-network@sta -Isrc/libsystemd-network -I../systemd-242/src/libsystemd-network -Isrc/basic -I../systemd-242/src/basic -Isrc/shared -I../sys
temd-242/src/shared -Isrc/systemd -I../systemd-242/src/systemd -Isrc/journal -I../systemd-242/src/journal -Isrc/journal-remote -I../systemd-242/src/journal-remote -Isrc/nspawn -I../systemd-242/src/nspawn
 -Isrc/resolve -I../systemd-242/src/resolve -Isrc/timesync -I../systemd-242/src/timesync -I../systemd-242/src/time-wait-sync -Isrc/login -I../systemd-242/src/login -Isrc/udev -I../systemd-242/src/udev -I
src/libudev -I../systemd-242/src/libudev -Isrc/core -I../systemd-242/src/core -Isrc/shutdown -I../systemd-242/src/shutdown -I../systemd-242/src/libsystemd/sd-bus -I../systemd-242/src/libsystemd/sd-device
 -I../systemd-242/src/libsystemd/sd-event -I../systemd-242/src/libsystemd/sd-hwdb -I../systemd-242/src/libsystemd/sd-id128 -I../systemd-242/src/libsystemd/sd-netlink -I../systemd-242/src/libsystemd/sd-ne
twork -I../systemd-242/src/libsystemd/sd-resolve -I. -I../systemd-242/ -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-s
tyle-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -W
error=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=ove
rflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Wno-error=nonnull
 -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -ffunction-sectio
ns -fdata-sections -Werror=shadow -include config.h -march=native -O2 -ggdb -frecord-gcc-switches -flto -fPIC -MD -MQ 'src/libsystemd-network/efd04ff@@systemd-network@sta/arp-util.c.o' -MF 'src/libsystem
d-network/efd04ff@@systemd-network@sta/arp-util.c.o.d' -o 'src/libsystemd-network/efd04ff@@systemd-network@sta/arp-util.c.o' -c ../systemd-242/src/libsystemd-network/arp-util.c
../systemd-242/src/libsystemd-network/arp-util.c: In function ‘arp_send_packet’:
../systemd-242/src/libsystemd-network/arp-util.c:116:9: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
  116 |         memcpy(&arp.arp_sha, ha, ETH_ALEN);
      |         ^~~~~~
../systemd-242/src/libsystemd-network/arp-util.c:116:9: warning: incompatible implicit declaration of built-in function ‘memcpy’
../systemd-242/src/libsystemd-network/arp-util.c:13:1: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
   12 | #include "util.h"
  +++ |+#include <string.h>
   13 | 

https://github.com/systemd/systemd/blob/master/src/libsystemd-network/arp-util.c
Zack Weinberg July 6, 2019, 4:38 p.m. UTC | #6
Thanks for this.  I'll look at it carefully when I'm back from
traveling. If you feel like testing more stuff, the most interesting
targets are probably network servers and language interpreters.