svn commit: r298226 - in head/lib/libc: db/btree gen inet isc net resolv rpc secure stdlib xdr yp
Andriy Voskoboinyk
avos at FreeBSD.org
Mon Apr 18 21:05:20 UTC 2016
Author: avos
Date: Mon Apr 18 21:05:15 2016
New Revision: 298226
URL: https://svnweb.freebsd.org/changeset/base/298226
Log:
libc: do not include <sys/types.h> where <sys/param.h> was already included
According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
Modified:
head/lib/libc/db/btree/bt_split.c
head/lib/libc/gen/arc4random.c
head/lib/libc/gen/devname.c
head/lib/libc/gen/exec.c
head/lib/libc/gen/getnetgrent.c
head/lib/libc/gen/setproctitle.c
head/lib/libc/inet/inet_addr.c
head/lib/libc/inet/inet_ntop.c
head/lib/libc/inet/inet_pton.c
head/lib/libc/inet/nsap_addr.c
head/lib/libc/isc/eventlib_p.h
head/lib/libc/net/base64.c
head/lib/libc/net/ether_addr.c
head/lib/libc/net/eui64.c
head/lib/libc/net/getaddrinfo.c
head/lib/libc/net/gethostbydns.c
head/lib/libc/net/getprotoent.c
head/lib/libc/net/getservent.c
head/lib/libc/net/hesiod.c
head/lib/libc/net/ip6opt.c
head/lib/libc/net/map_v4v6.c
head/lib/libc/net/rthdr.c
head/lib/libc/net/sourcefilter.c
head/lib/libc/resolv/herror.c
head/lib/libc/resolv/res_comp.c
head/lib/libc/resolv/res_data.c
head/lib/libc/resolv/res_debug.c
head/lib/libc/resolv/res_init.c
head/lib/libc/resolv/res_mkquery.c
head/lib/libc/resolv/res_mkupdate.c
head/lib/libc/resolv/res_query.c
head/lib/libc/resolv/res_send.c
head/lib/libc/rpc/getrpcent.c
head/lib/libc/rpc/rpc_generic.c
head/lib/libc/rpc/svc_vc.c
head/lib/libc/secure/stack_protector.c
head/lib/libc/stdlib/rand.c
head/lib/libc/xdr/xdr_float.c
head/lib/libc/yp/yplib.c
Modified: head/lib/libc/db/btree/bt_split.c
==============================================================================
--- head/lib/libc/db/btree/bt_split.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/db/btree/bt_split.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -36,7 +36,6 @@ static char sccsid[] = "@(#)bt_split.c 8
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
#include <limits.h>
Modified: head/lib/libc/gen/arc4random.c
==============================================================================
--- head/lib/libc/gen/arc4random.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/gen/arc4random.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/time.h>
Modified: head/lib/libc/gen/devname.c
==============================================================================
--- head/lib/libc/gen/devname.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/gen/devname.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -33,14 +33,13 @@ static char sccsid[] = "@(#)devname.c 8.
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/param.h>
#include <sys/stat.h>
char *
Modified: head/lib/libc/gen/exec.c
==============================================================================
--- head/lib/libc/gen/exec.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/gen/exec.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
Modified: head/lib/libc/gen/getnetgrent.c
==============================================================================
--- head/lib/libc/gen/getnetgrent.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/gen/getnetgrent.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -85,9 +85,8 @@ __FBSDID("$FreeBSD$");
#include <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
#include <rpcsvc/ypclnt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <sys/param.h>
+#include <sys/stat.h>
#include <sys/errno.h>
static char *_netgr_yp_domain;
int _use_only_yp;
Modified: head/lib/libc/gen/setproctitle.c
==============================================================================
--- head/lib/libc/gen/setproctitle.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/gen/setproctitle.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -19,7 +19,6 @@
__FBSDID("$FreeBSD$");
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/sysctl.h>
Modified: head/lib/libc/inet/inet_addr.c
==============================================================================
--- head/lib/libc/inet/inet_addr.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/inet/inet_addr.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
Modified: head/lib/libc/inet/inet_ntop.c
==============================================================================
--- head/lib/libc/inet/inet_ntop.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/inet/inet_ntop.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -24,7 +24,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
Modified: head/lib/libc/inet/inet_pton.c
==============================================================================
--- head/lib/libc/inet/inet_pton.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/inet/inet_pton.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -23,7 +23,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Modified: head/lib/libc/inet/nsap_addr.c
==============================================================================
--- head/lib/libc/inet/nsap_addr.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/inet/nsap_addr.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -23,7 +23,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
Modified: head/lib/libc/isc/eventlib_p.h
==============================================================================
--- head/lib/libc/isc/eventlib_p.h Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/isc/eventlib_p.h Mon Apr 18 21:05:15 2016 (r298226)
@@ -27,7 +27,6 @@
#define _EVENTLIB_P_H
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/un.h>
Modified: head/lib/libc/net/base64.c
==============================================================================
--- head/lib/libc/net/base64.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/base64.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -43,7 +43,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
Modified: head/lib/libc/net/ether_addr.c
==============================================================================
--- head/lib/libc/net/ether_addr.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/ether_addr.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -40,7 +40,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
Modified: head/lib/libc/net/eui64.c
==============================================================================
--- head/lib/libc/net/eui64.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/eui64.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -72,11 +72,10 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <paths.h>
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/eui64.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/param.h>
#ifdef YP
#include <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
Modified: head/lib/libc/net/getaddrinfo.c
==============================================================================
--- head/lib/libc/net/getaddrinfo.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/getaddrinfo.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -55,7 +55,6 @@
__FBSDID("$FreeBSD$");
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <net/if.h>
Modified: head/lib/libc/net/gethostbydns.c
==============================================================================
--- head/lib/libc/net/gethostbydns.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/gethostbydns.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -56,7 +56,6 @@ static char fromrcsid[] = "From: Id: get
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
Modified: head/lib/libc/net/getprotoent.c
==============================================================================
--- head/lib/libc/net/getprotoent.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/getprotoent.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -34,7 +34,6 @@ static char sccsid[] = "@(#)getprotoent.
__FBSDID("$FreeBSD$");
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <limits.h>
Modified: head/lib/libc/net/getservent.c
==============================================================================
--- head/lib/libc/net/getservent.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/getservent.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -34,7 +34,6 @@ static char sccsid[] = "@(#)getservent.c
__FBSDID("$FreeBSD$");
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <db.h>
Modified: head/lib/libc/net/hesiod.c
==============================================================================
--- head/lib/libc/net/hesiod.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/hesiod.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -51,7 +51,6 @@ static char *orig_rcsid = "$NetBSD: hesi
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
Modified: head/lib/libc/net/ip6opt.c
==============================================================================
--- head/lib/libc/net/ip6opt.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/ip6opt.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -33,7 +33,6 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
Modified: head/lib/libc/net/map_v4v6.c
==============================================================================
--- head/lib/libc/net/map_v4v6.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/map_v4v6.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -55,7 +55,6 @@ static char sccsid[] = "@(#)gethostnamad
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
Modified: head/lib/libc/net/rthdr.c
==============================================================================
--- head/lib/libc/net/rthdr.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/rthdr.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -33,7 +33,6 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
Modified: head/lib/libc/net/sourcefilter.c
==============================================================================
--- head/lib/libc/net/sourcefilter.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/net/sourcefilter.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
Modified: head/lib/libc/resolv/herror.c
==============================================================================
--- head/lib/libc/resolv/herror.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/herror.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/uio.h>
Modified: head/lib/libc/resolv/res_comp.c
==============================================================================
--- head/lib/libc/resolv/res_comp.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_comp.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -72,7 +72,6 @@ static const char rcsid[] = "$Id: res_co
__FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
Modified: head/lib/libc/resolv/res_data.c
==============================================================================
--- head/lib/libc/resolv/res_data.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_data.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -23,7 +23,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
Modified: head/lib/libc/resolv/res_debug.c
==============================================================================
--- head/lib/libc/resolv/res_debug.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_debug.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -98,7 +98,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
Modified: head/lib/libc/resolv/res_init.c
==============================================================================
--- head/lib/libc/resolv/res_init.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_init.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
Modified: head/lib/libc/resolv/res_mkquery.c
==============================================================================
--- head/lib/libc/resolv/res_mkquery.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_mkquery.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -72,7 +72,6 @@ static const char rcsid[] = "$Id: res_mk
__FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
Modified: head/lib/libc/resolv/res_mkupdate.c
==============================================================================
--- head/lib/libc/resolv/res_mkupdate.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_mkupdate.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
Modified: head/lib/libc/resolv/res_query.c
==============================================================================
--- head/lib/libc/resolv/res_query.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_query.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -72,7 +72,6 @@ static const char rcsid[] = "$Id: res_qu
__FBSDID("$FreeBSD$");
#include "port_before.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Modified: head/lib/libc/resolv/res_send.c
==============================================================================
--- head/lib/libc/resolv/res_send.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/resolv/res_send.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$");
#endif
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
Modified: head/lib/libc/rpc/getrpcent.c
==============================================================================
--- head/lib/libc/rpc/getrpcent.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/rpc/getrpcent.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
*/
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <assert.h>
Modified: head/lib/libc/rpc/rpc_generic.c
==============================================================================
--- head/lib/libc/rpc/rpc_generic.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/rpc/rpc_generic.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include "reentrant.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
Modified: head/lib/libc/rpc/svc_vc.c
==============================================================================
--- head/lib/libc/rpc/svc_vc.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/rpc/svc_vc.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include "reentrant.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <sys/poll.h>
#include <sys/socket.h>
Modified: head/lib/libc/secure/stack_protector.c
==============================================================================
--- head/lib/libc/secure/stack_protector.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/secure/stack_protector.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/sysctl.h>
-#include <sys/types.h>
#include <errno.h>
#include <link.h>
#include <signal.h>
Modified: head/lib/libc/stdlib/rand.c
==============================================================================
--- head/lib/libc/stdlib/rand.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/stdlib/rand.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <sys/param.h>
#include <sys/sysctl.h>
-#include <sys/types.h>
#include <stdlib.h>
#include "un-namespace.h"
Modified: head/lib/libc/xdr/xdr_float.c
==============================================================================
--- head/lib/libc/xdr/xdr_float.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/xdr/xdr_float.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
*/
#include "namespace.h"
-#include <sys/types.h>
#include <sys/param.h>
#include <stdio.h>
Modified: head/lib/libc/yp/yplib.c
==============================================================================
--- head/lib/libc/yp/yplib.c Mon Apr 18 20:56:21 2016 (r298225)
+++ head/lib/libc/yp/yplib.c Mon Apr 18 21:05:15 2016 (r298226)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include "reentrant.h"
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <sys/uio.h>
More information about the svn-src-head
mailing list