diff options
author | Zack Weinberg <zackw@panix.com> | 2019-06-01 19:32:01 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-01-08 14:15:41 -0500 |
commit | 0e8caaf081a844893aa5bbf67010c3e34ca47f34 (patch) | |
tree | 0b0c25b99b9531f66d41cdb5821d850c70c14ce6 /resolv/tst-bug18665.c | |
parent | b32c5f35b8fb037bd54cde10bb14e6510171534a (diff) | |
download | glibc-0e8caaf081a844893aa5bbf67010c3e34ca47f34.tar.gz |
Minimize includes of unrelated public headers by networking headers.
Stop including sys/param.h, sys/types.h, stdint.h, inttypes.h,
stdio.h, and string.h from network-related headers. This is done
separately from earlier patches because the network headers are extra
messy, and are also more likely to contain quirks inherited verbatim
from 4.xBSD than the bulk of our public headers.
Rose and NetROM are based on AX.25 so it makes practical sense for
netrose/rose.h and netrom/netrom.h to continue including netax25/ax25.h.
The only copies of ip_icmp.h and udp.h in the source tree are moved
from sysdeps/gnu to inet (after which there are no longer any netinet/
headers in sysdeps/gnu).
Much as sys/un.h needs to duplicate the prototype for strlen,
netinet/icmp6.h needs to duplicate the prototype for memset. I am
open to better ideas on that front.
* resolv/resolv.h: Include bits/types.h, bits/types/FILE.h,
and bits/types/size_t.h; don’t include sys/param.h, sys/types.h,
or stdio.h. Use __uint16_t and __uint32_t instead of uint16_t and
uint32_t.
* resolv/arpa/nameser.h: Include features.h, bits/types.h, and
bits/types/size_t.h; don’t include sys/param.h, sys/types.h, or
stdint.h. Use __uint16_t and __uint32_t instead of uint16_t and
uint32_t.
* resolv/arpa/nameser_compat.h: Include features.h.
* sysdeps/mach/hurd/net/ethernet.h: Include bits/types.h;
don’t include sys/types.h or stdint.h. Use __uint8_t and
__uint16_t instead of uint8_t and uint16_t.
* sysdeps/unix/sysv/linux/net/ethernet.h: Include features.h and
bits/types.h; don’t include sys/types.h or stdint.h.
Use __uint8_t and __uint16_t instead of uint8_t and uint16_t.
* sysdeps/unix/sysv/linux/netinet/if_ether.h: Include features.h
and bits/types.h. Use __uint8_t instead of uint8_t.
* sysdeps/mach/hurd/net/if_arp.h: Don’t include sys/types.h or
stdint.h. Use __uint32_t instead of uint32_t.
* sysdeps/unix/sysv/linux/net/if_arp.h: Include features.h.
Don’t include sys/types.h or stdint.h. Use __uint32_t instead of
uint32_t.
* sysdeps/mach/hurd/net/route.h: Don’t include sys/types.h.
* sysdeps/unix/sysv/linux/net/route.h: Don’t include sys/types.h.
* sysdeps/unix/sysv/linux/net/if_ppp.h: Include features.h and
bits/types.h. Don’t include sys/types.h or stdint.h. Use
__uint8_t and __uint32_t instead of uint8_t and uint32_t.
* sysdeps/unix/sysv/linux/net/if_shaper.h: Include features.h and
bits/types.h. Don’t include sys/types.h or stdint.h. Use
__uint16_t and __uint32_t instead of uint16_t and uint32_t.
* sysdeps/unix/sysv/linux/netatalk/at.h: Include features.h,
bits/types.h, and sys/ioctl.h. Don’t include asm/types.h or
linux/atalk.h. Copy over all user-appropriate definitions from
linux/atalk.h with adjustments for glibc context.
* grp/initgroups.c, nscd/initgrcache.c, nss/nss_db/db-XXX.c
* resolv/ns_print.c, resolv/tst-ns_name_compress.c
* resolv/tst-res_hnok.c, support/resolv_test.c:
Include stdio.h.
* nscd/initgrcache.c, nscd/netgroupcache.c
* nss/nss_compat/compat-grp.c, nss/nss_compat/compat-pwd.c
* nss/nss_compat/compat-spwd.c, resolv/ns_print.c:
Include sys/param.h for MIN and/or MAX.
* resolv/tst-resolv-res_init-skeleton.c: Include signal.h.
* inet/protocols/rwhod.h: Include features.h and bits/types.h.
Don’t include sys/types.h. Use __int32_t instead of int32_t.
* inet/protocols/talkd.h: Include features.h and bits/types.h.
Don’t include sys/types.h, sys/socket.h, or stdint.h. Use
__int32_t and __uint32_t instead of int32_t and uint32_t.
* inet/protocols/timed.h: Include features.h, bits/types.h,
and bits/types/struct_timeval.h. Don’t include sys/types.h or
sys/time.h.
* sysdeps/unix/sysv/linux/netipx/ipx.h: Include features.h and
bits/types.h. Don’t include sys/types.h or stdint.h. Use
__uint16_t and __uint32_t instead of uint16_t and uint32_t.
* sysdeps/unix/sysv/linux/netrose/rose.h: Include features.h.
Don’t include sys/socket.h.
* inet/netinet/icmp6.h: Include features.h, bits/endian.h,
bits/types.h, and bits/types/size_t.h. Don’t include inttypes.h,
string.h, or sys/types.h. Duplicate prototype of memset here.
Use __uintN_t instead of uintN_t types.
* inet/netinet/igmp.h: Include bits/types.h. Don’t include sys/types.h.
Use __uintN_t instead of uintN_t types.
* inet/netinet/ip.h: Include bits/types.h. Don’t include
bits/stdint-uintn.h. Use __uintN_t instead of uintN_t types.
* inet/netinet/ip6.h: Include features.h, bits/endian.h, and
bits/types.h. Don’t include inttypes.h. Use __uintN_t instead of
uintN_t types.
* inet/netinet/ip_icmp.h: Include features.h and bits/types.h.
Don’t include sys/types.h or stdint.h. Use __uintN_t instead of
uintN_t types.
* inet/netinet/udp.h: Likewise.
* sysdeps/generic/netinet/if_ether.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_ether.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_fddi.h: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_tr.h: Likewise.
* sysdeps/gnu/netinet/ip_icmp.h: Move to inet/netinet/ip_icmp.h.
* sysdeps/gnu/netinet/udp.h: Move to inet/netinet/udp.h.
* include/netinet/ip_icmp.h, include/netinet/udp.h: New wrappers.
* sysdeps/gnu/Makefile: Remove $(subdir)==inet stanza.
* inet/Makefile (headers): Add netinet/ip_icmp.h and
netinet/udp.h. Don’t use $(wildcard *.h) for arpa and protocols
headers. Sort list.
* scripts/check-obsolete-constructs.py
(HEADER_ALLOWED_INCLUDES, SYSDEP_ALLOWED_INCLUDES): Update.
Diffstat (limited to 'resolv/tst-bug18665.c')
0 files changed, 0 insertions, 0 deletions