From patchwork Thu Sep 22 13:30:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 15901 Received: (qmail 82439 invoked by alias); 22 Sep 2016 13:31:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 82291 invoked by uid 89); 22 Sep 2016 13:31:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=1035, 1810, bothered, UD:socket.h X-HELO: l2mail1.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: carlos@redhat.com, joseph@codesourcery.com Subject: [PATCH 2c/6] Installed-header hygiene (BZ#20366): New dependencies on stdint.h after mechanical change. Date: Thu, 22 Sep 2016 09:30:48 -0400 Message-Id: <20160922133054.22210-8-zackw@panix.com> In-Reply-To: <20160922133054.22210-7-zackw@panix.com> References: <20160922133054.22210-1-zackw@panix.com> <20160922133054.22210-2-zackw@panix.com> <20160922133054.22210-3-zackw@panix.com> <20160922133054.22210-4-zackw@panix.com> <20160922133054.22210-5-zackw@panix.com> <20160922133054.22210-6-zackw@panix.com> <20160922133054.22210-7-zackw@panix.com> MIME-Version: 1.0 After changing from u_intNN_t to uintNN_t, a number of headers now need to include stdint.h to pick up those types. It might be more hygenic, namespace-wise, to use __uintNN_t instead, but none of these headers are bound by ISO or POSIX to do so, and it's unlikely that anyone using them will be bothered. Some of these files directly included features.h and/or sys/cdefs.h, which I removed, as the style generally seems to be to let sys/types.h do that for us. (This does not change the set of definitions exposed by any header; sys/types.h unconditionally includes both features.h and sys/cdefs.h.) One file included asm/types.h unnecessarily. * inet/protocols/talkd.h, resolv/arpa/nameser.h * sysdeps/generic/netinet/in_systm.h * sysdeps/gnu/netinet/ip_icmp.h, sysdeps/gnu/netinet/tcp.h * sysdeps/gnu/netinet/udp.h * sysdeps/unix/sysv/linux/net/ethernet.h * sysdeps/unix/sysv/linux/net/if_arp.h * sysdeps/unix/sysv/linux/net/if_ppp.h * sysdeps/unix/sysv/linux/net/if_shaper.h * sysdeps/unix/sysv/linux/netinet/if_fddi.h * sysdeps/unix/sysv/linux/netinet/if_tr.h * sysdeps/unix/sysv/linux/netipx/ipx.h * sysdeps/unix/sysv/linux/sys/acct.h Include stdint.h for uintNN_t definitions. Don't include sys/cdefs.h, features.h, or asm/types.h directly. --- inet/protocols/talkd.h | 1 + resolv/arpa/nameser.h | 2 +- sysdeps/generic/netinet/in_systm.h | 2 +- sysdeps/gnu/netinet/ip_icmp.h | 2 +- sysdeps/gnu/netinet/tcp.h | 1 + sysdeps/gnu/netinet/udp.h | 3 +-- sysdeps/unix/sysv/linux/net/ethernet.h | 3 ++- sysdeps/unix/sysv/linux/net/if_arp.h | 3 +-- sysdeps/unix/sysv/linux/net/if_ppp.h | 3 +-- sysdeps/unix/sysv/linux/net/if_shaper.h | 2 +- sysdeps/unix/sysv/linux/netinet/if_fddi.h | 4 +--- sysdeps/unix/sysv/linux/netinet/if_tr.h | 2 +- sysdeps/unix/sysv/linux/netipx/ipx.h | 3 +-- sysdeps/unix/sysv/linux/sys/acct.h | 5 ++--- 14 files changed, 16 insertions(+), 20 deletions(-) diff --git a/inet/protocols/talkd.h b/inet/protocols/talkd.h index 0437ae4..34e2654 100644 --- a/inet/protocols/talkd.h +++ b/inet/protocols/talkd.h @@ -52,6 +52,7 @@ #include #include +#include /* * Client->server request message format. diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h index 9d12b53..80d5cdf 100644 --- a/resolv/arpa/nameser.h +++ b/resolv/arpa/nameser.h @@ -50,7 +50,7 @@ #include #include -#include +#include /* * Define constants based on RFC 883, RFC 1034, RFC 1035 diff --git a/sysdeps/generic/netinet/in_systm.h b/sysdeps/generic/netinet/in_systm.h index 1629c36..7b9a92b 100644 --- a/sysdeps/generic/netinet/in_systm.h +++ b/sysdeps/generic/netinet/in_systm.h @@ -19,8 +19,8 @@ #ifndef _NETINET_IN_SYSTM_H #define _NETINET_IN_SYSTM_H 1 -#include #include +#include __BEGIN_DECLS diff --git a/sysdeps/gnu/netinet/ip_icmp.h b/sysdeps/gnu/netinet/ip_icmp.h index e57b144..542e789 100644 --- a/sysdeps/gnu/netinet/ip_icmp.h +++ b/sysdeps/gnu/netinet/ip_icmp.h @@ -18,8 +18,8 @@ #ifndef __NETINET_IP_ICMP_H #define __NETINET_IP_ICMP_H 1 -#include #include +#include __BEGIN_DECLS diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h index 42ec108..3fbea54 100644 --- a/sysdeps/gnu/netinet/tcp.h +++ b/sysdeps/gnu/netinet/tcp.h @@ -73,6 +73,7 @@ #ifdef __USE_MISC # include # include +# include typedef uint32_t tcp_seq; /* diff --git a/sysdeps/gnu/netinet/udp.h b/sysdeps/gnu/netinet/udp.h index f55391c..d5f60e4 100644 --- a/sysdeps/gnu/netinet/udp.h +++ b/sysdeps/gnu/netinet/udp.h @@ -47,9 +47,8 @@ #ifndef __NETINET_UDP_H #define __NETINET_UDP_H 1 -#include #include - +#include /* UDP header as specified by RFC 768, August 1980. */ diff --git a/sysdeps/unix/sysv/linux/net/ethernet.h b/sysdeps/unix/sysv/linux/net/ethernet.h index 56b3276..833473e 100644 --- a/sysdeps/unix/sysv/linux/net/ethernet.h +++ b/sysdeps/unix/sysv/linux/net/ethernet.h @@ -21,8 +21,9 @@ #ifndef __NET_ETHERNET_H #define __NET_ETHERNET_H 1 -#include #include +#include + #include /* IEEE 802.3 Ethernet constants */ __BEGIN_DECLS diff --git a/sysdeps/unix/sysv/linux/net/if_arp.h b/sysdeps/unix/sysv/linux/net/if_arp.h index 93758c8..9a20c83 100644 --- a/sysdeps/unix/sysv/linux/net/if_arp.h +++ b/sysdeps/unix/sysv/linux/net/if_arp.h @@ -20,12 +20,11 @@ /* Based on the 4.4BSD and Linux version of this file. */ #ifndef _NET_IF_ARP_H - #define _NET_IF_ARP_H 1 -#include #include #include +#include __BEGIN_DECLS diff --git a/sysdeps/unix/sysv/linux/net/if_ppp.h b/sysdeps/unix/sysv/linux/net/if_ppp.h index 20310eb..9994982 100644 --- a/sysdeps/unix/sysv/linux/net/if_ppp.h +++ b/sysdeps/unix/sysv/linux/net/if_ppp.h @@ -49,8 +49,7 @@ #define __NET_IF_PPP_H 1 #include -#include - +#include #include #include #include diff --git a/sysdeps/unix/sysv/linux/net/if_shaper.h b/sysdeps/unix/sysv/linux/net/if_shaper.h index 4a777d8..e318794 100644 --- a/sysdeps/unix/sysv/linux/net/if_shaper.h +++ b/sysdeps/unix/sysv/linux/net/if_shaper.h @@ -18,8 +18,8 @@ #ifndef _NET_IF_SHAPER_H #define _NET_IF_SHAPER_H 1 -#include #include +#include #include #include diff --git a/sysdeps/unix/sysv/linux/netinet/if_fddi.h b/sysdeps/unix/sysv/linux/netinet/if_fddi.h index 877f738..6758014 100644 --- a/sysdeps/unix/sysv/linux/netinet/if_fddi.h +++ b/sysdeps/unix/sysv/linux/netinet/if_fddi.h @@ -18,10 +18,8 @@ #ifndef _NETINET_IF_FDDI_H #define _NETINET_IF_FDDI_H 1 -#include #include -#include - +#include #include #ifdef __USE_MISC diff --git a/sysdeps/unix/sysv/linux/netinet/if_tr.h b/sysdeps/unix/sysv/linux/netinet/if_tr.h index 5df2206..814a35d 100644 --- a/sysdeps/unix/sysv/linux/netinet/if_tr.h +++ b/sysdeps/unix/sysv/linux/netinet/if_tr.h @@ -18,8 +18,8 @@ #ifndef _NETINET_IF_TR_H #define _NETINET_IF_TR_H 1 -#include #include +#include /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble and FCS/CRC (frame check sequence). */ diff --git a/sysdeps/unix/sysv/linux/netipx/ipx.h b/sysdeps/unix/sysv/linux/netipx/ipx.h index 1d6cb78..338aab5 100644 --- a/sysdeps/unix/sysv/linux/netipx/ipx.h +++ b/sysdeps/unix/sysv/linux/netipx/ipx.h @@ -18,9 +18,8 @@ #ifndef __NETIPX_IPX_H #define __NETIPX_IPX_H 1 -#include - #include +#include #include __BEGIN_DECLS diff --git a/sysdeps/unix/sysv/linux/sys/acct.h b/sysdeps/unix/sysv/linux/sys/acct.h index c629ad4..d24c2a7 100644 --- a/sysdeps/unix/sysv/linux/sys/acct.h +++ b/sysdeps/unix/sysv/linux/sys/acct.h @@ -18,12 +18,11 @@ #ifndef _SYS_ACCT_H #define _SYS_ACCT_H 1 -#include - +#include +#include #include #define __need_time_t #include -#include __BEGIN_DECLS