From 86f952e4e3f9c3e51f4a0d81ecad9bcdb11017dd Mon Sep 17 00:00:00 2001 From: reyk Date: Wed, 21 Jan 2015 22:21:05 +0000 Subject: [PATCH] httpd is based on relayd and had included many headers that are only needed by its ancestor. jsg@, include-what-you-use, and some manual review helped to cleanup the headers (take iwyu with a grain of salt). Based on common practice, httpd.h now also includes the necessary headers for itself. OK florian@ --- usr.sbin/httpd/config.c | 20 ++++---------------- usr.sbin/httpd/control.c | 9 +++------ usr.sbin/httpd/httpd.c | 9 ++++----- usr.sbin/httpd/httpd.h | 11 ++++++++++- usr.sbin/httpd/log.c | 11 +++-------- usr.sbin/httpd/logger.c | 9 +++------ usr.sbin/httpd/parse.y | 7 ++++--- usr.sbin/httpd/proc.c | 8 ++------ usr.sbin/httpd/server.c | 16 +++++++--------- usr.sbin/httpd/server_fcgi.c | 15 +++++---------- usr.sbin/httpd/server_file.c | 13 ++----------- usr.sbin/httpd/server_http.c | 14 +++----------- 12 files changed, 50 insertions(+), 92 deletions(-) diff --git a/usr.sbin/httpd/config.c b/usr.sbin/httpd/config.c index 98e06b58514..28fbecb5ecb 100644 --- a/usr.sbin/httpd/config.c +++ b/usr.sbin/httpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.31 2015/01/19 21:07:33 reyk Exp $ */ +/* $OpenBSD: config.c,v 1.32 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2011 - 2015 Reyk Floeter @@ -17,28 +17,16 @@ */ #include -#include -#include #include +#include +#include #include -#include -#include -#include - -#include #include -#include -#include -#include -#include -#include #include -#include #include -#include #include -#include +#include #include "httpd.h" diff --git a/usr.sbin/httpd/control.c b/usr.sbin/httpd/control.c index a6422bc0cef..fe603754308 100644 --- a/usr.sbin/httpd/control.c +++ b/usr.sbin/httpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.5 2014/12/21 00:54:49 guenther Exp $ */ +/* $OpenBSD: control.c,v 1.6 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -16,22 +16,19 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include +#include #include -#include -#include - #include #include #include #include #include #include -#include +#include #include "httpd.h" diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c index f229cc5673e..5ea455e609a 100644 --- a/usr.sbin/httpd/httpd.c +++ b/usr.sbin/httpd/httpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.c,v 1.30 2015/01/19 19:37:50 reyk Exp $ */ +/* $OpenBSD: httpd.c,v 1.31 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -23,16 +23,15 @@ #include #include #include -#include -#include #include #include -#include #include #include -#include +#include +#include +#include #include #include #include diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h index 9935c1c12c9..511f0a843b6 100644 --- a/usr.sbin/httpd/httpd.h +++ b/usr.sbin/httpd/httpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.h,v 1.71 2015/01/19 20:00:07 florian Exp $ */ +/* $OpenBSD: httpd.h,v 1.72 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -21,9 +21,18 @@ #ifndef _HTTPD_H #define _HTTPD_H +#include +#include +#include #include +#include +#include +#include + +#include #include +#include #include #include diff --git a/usr.sbin/httpd/log.c b/usr.sbin/httpd/log.c index f086d00735f..a5dfc6b12ee 100644 --- a/usr.sbin/httpd/log.c +++ b/usr.sbin/httpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.4 2014/12/21 00:54:49 guenther Exp $ */ +/* $OpenBSD: log.c,v 1.5 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -17,13 +17,8 @@ */ #include -#include #include -#include - -#include -#include -#include +#include #include #include @@ -31,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/usr.sbin/httpd/logger.c b/usr.sbin/httpd/logger.c index ee215851f59..c7a9bc3fda4 100644 --- a/usr.sbin/httpd/logger.c +++ b/usr.sbin/httpd/logger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logger.c,v 1.9 2015/01/16 06:40:17 deraadt Exp $ */ +/* $OpenBSD: logger.c,v 1.10 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -18,19 +18,16 @@ #include /* nitems */ #include -#include #include #include -#include -#include - +#include #include #include #include #include #include -#include +#include #include "httpd.h" diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 1c2c90ca121..4a037c7c663 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.57 2015/01/19 21:07:33 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.58 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2007 - 2015 Reyk Floeter @@ -29,18 +29,19 @@ #include #include #include +#include #include +#include +#include #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c index 95c3e984998..34d65c08e1f 100644 --- a/usr.sbin/httpd/proc.c +++ b/usr.sbin/httpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.7 2014/12/21 00:54:49 guenther Exp $ */ +/* $OpenBSD: proc.c,v 1.8 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2010 - 2014 Reyk Floeter @@ -21,11 +21,6 @@ #include #include #include -#include - -#include -#include -#include #include #include @@ -35,6 +30,7 @@ #include #include #include +#include #include "httpd.h" diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c index dfaa15c2955..15e14539a27 100644 --- a/usr.sbin/httpd/server.c +++ b/usr.sbin/httpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.53 2015/01/19 19:37:50 reyk Exp $ */ +/* $OpenBSD: server.c,v 1.54 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -22,26 +22,24 @@ #include #include #include -#include #include #include -#include #include -#include #include +#include +#include +#include +#include +#include #include #include -#include #include #include #include -#include -#include -#include #include -#include +#include #include #include "httpd.h" diff --git a/usr.sbin/httpd/server_fcgi.c b/usr.sbin/httpd/server_fcgi.c index b2dae7c50c8..f82772da234 100644 --- a/usr.sbin/httpd/server_fcgi.c +++ b/usr.sbin/httpd/server_fcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_fcgi.c,v 1.49 2015/01/19 20:00:07 florian Exp $ */ +/* $OpenBSD: server_fcgi.c,v 1.50 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2014 Florian Obser @@ -17,26 +17,21 @@ */ #include -#include #include -#include #include #include -#include +#include -#include #include -#include -#include +#include +#include #include -#include #include #include -#include #include +#include #include -#include #include #include "httpd.h" diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c index 447a0ddd701..2add01e4aa3 100644 --- a/usr.sbin/httpd/server_file.c +++ b/usr.sbin/httpd/server_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_file.c,v 1.47 2015/01/16 06:40:17 deraadt Exp $ */ +/* $OpenBSD: server_file.c,v 1.48 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -17,18 +17,10 @@ */ #include -#include #include #include -#include -#include -#include - -#include -#include -#include -#include +#include #include #include #include @@ -37,7 +29,6 @@ #include #include #include -#include #include #include "httpd.h" diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c index 85c0026533e..1a48b4a329e 100644 --- a/usr.sbin/httpd/server_http.c +++ b/usr.sbin/httpd/server_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_http.c,v 1.68 2015/01/19 20:01:02 florian Exp $ */ +/* $OpenBSD: server_http.c,v 1.69 2015/01/21 22:21:05 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -18,28 +18,20 @@ #include #include -#include -#include #include -#include #include -#include #include -#include -#include +#include #include -#include #include #include #include #include #include -#include -#include +#include #include -#include #include #include -- 2.20.1