[master] 4f94d57 Periodic #include untangling/cleanup

Poul-Henning Kamp phk at FreeBSD.org
Sat Jan 14 18:54:05 CET 2017


commit 4f94d576b546a4783480b152c909aacbb5532ffd
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Jan 14 17:53:03 2017 +0000

    Periodic #include untangling/cleanup

diff --git a/bin/varnishd/common/com_params.h b/bin/varnishd/common/com_params.h
index 269f188..a1ddd69 100644
--- a/bin/varnishd/common/com_params.h
+++ b/bin/varnishd/common/com_params.h
@@ -34,8 +34,6 @@
 #endif
 #define COMMON_PARAMS_H
 
-#include <stdint.h>
-
 #include "vre.h"
 
 #define VSM_CLASS_PARAM		"Params"
diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index afdeafd..82305e4 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -28,6 +28,11 @@
  *
  */
 
+#ifdef COMMON_COMMON_H
+#error "Multiple includes of common/common.h"
+#endif
+#define COMMON_COMMON_H
+
 #include <stdint.h>
 
 #include <sys/types.h>
diff --git a/bin/varnishd/common/common_vsm.c b/bin/varnishd/common/common_vsm.c
index 9a09e07..e91ef24 100644
--- a/bin/varnishd/common/common_vsm.c
+++ b/bin/varnishd/common/common_vsm.c
@@ -34,7 +34,6 @@
 
 #include "config.h"
 
-#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index fc0c56e..db94d1d 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -34,9 +34,7 @@
 #include <netinet/in.h>
 
 #include <ctype.h>
-#include <netdb.h>
 #include <stdio.h>
-#include <stdlib.h>
 
 #include "cache/cache_filter.h"
 #include "cache/cache_transport.h"
diff --git a/bin/varnishd/http2/cache_http2_panic.c b/bin/varnishd/http2/cache_http2_panic.c
index 6fe519b..6506436 100644
--- a/bin/varnishd/http2/cache_http2_panic.c
+++ b/bin/varnishd/http2/cache_http2_panic.c
@@ -31,14 +31,6 @@
 
 #include "cache/cache.h"
 
-#include <netinet/in.h>
-
-#include <ctype.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "cache/cache_filter.h"
 #include "cache/cache_transport.h"
 #include "http2/cache_http2.h"
 
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 0f03e15..7e9ab9e 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -31,14 +31,8 @@
 
 #include "cache/cache.h"
 
-#include <netinet/in.h>
-
-#include <ctype.h>
-#include <netdb.h>
 #include <stdio.h>
-#include <stdlib.h>
 
-#include "cache/cache_filter.h"
 #include "cache/cache_transport.h"
 #include "http2/cache_http2.h"
 
diff --git a/bin/varnishd/http2/cache_http2_send.c b/bin/varnishd/http2/cache_http2_send.c
index 257d518..f6f9587 100644
--- a/bin/varnishd/http2/cache_http2_send.c
+++ b/bin/varnishd/http2/cache_http2_send.c
@@ -31,14 +31,6 @@
 
 #include "cache/cache.h"
 
-#include <netinet/in.h>
-
-#include <ctype.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "cache/cache_filter.h"
 #include "cache/cache_transport.h"
 #include "http2/cache_http2.h"
 
diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h
index dc69bc0..f06d912 100644
--- a/bin/varnishd/mgt/mgt.h
+++ b/bin/varnishd/mgt/mgt.h
@@ -28,7 +28,12 @@
  *
  */
 
-#include <stdint.h>
+#ifdef MGT_MGT_H
+#error "Multiple includes of mgt/mgt.h"
+#endif
+#define MGT_MGT_H
+
+#include <stdio.h>
 
 #include "common/common.h"
 #include "common/com_params.h"
diff --git a/bin/varnishd/mgt/mgt_acceptor.c b/bin/varnishd/mgt/mgt_acceptor.c
index ae82607..c887464 100644
--- a/bin/varnishd/mgt/mgt_acceptor.c
+++ b/bin/varnishd/mgt/mgt_acceptor.c
@@ -35,7 +35,6 @@
 #include <sys/socket.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index d1c4f2f..e992eb2 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -38,8 +38,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <poll.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 6e6cc9a..c53205c 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -38,7 +38,6 @@
 #include <fcntl.h>
 #include <poll.h>
 #include <stdarg.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_jail.c b/bin/varnishd/mgt/mgt_jail.c
index a88a499..515d56d 100644
--- a/bin/varnishd/mgt/mgt_jail.c
+++ b/bin/varnishd/mgt/mgt_jail.c
@@ -33,7 +33,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_jail_solaris.c b/bin/varnishd/mgt/mgt_jail_solaris.c
index 1ab519e..96d1cba 100644
--- a/bin/varnishd/mgt/mgt_jail_solaris.c
+++ b/bin/varnishd/mgt/mgt_jail_solaris.c
@@ -208,7 +208,6 @@
 #ifdef HAVE_SETPPRIV
 
 #include <errno.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_jail_unix.c b/bin/varnishd/mgt/mgt_jail_unix.c
index 838b977..12e25cb 100644
--- a/bin/varnishd/mgt/mgt_jail_unix.c
+++ b/bin/varnishd/mgt/mgt_jail_unix.c
@@ -30,13 +30,12 @@
 
 #include "config.h"
 
-#include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
 #include <pwd.h>
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <sys/stat.h>
 
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index ea884d8..7b730dd 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2011 Varnish Software AS
+ * Copyright (c) 2006-2017 Varnish Software AS
  * All rights reserved.
  *
  * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
@@ -34,11 +34,9 @@
 #include <sys/utsname.h>
 
 #include <stdarg.h>
-#include <time.h>
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index a6411ab..380882a 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -31,7 +31,6 @@
 
 #include <ctype.h>
 #include <stdarg.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/bin/varnishd/mgt/mgt_param_bits.c b/bin/varnishd/mgt/mgt_param_bits.c
index 3706f27..89b6005 100644
--- a/bin/varnishd/mgt/mgt_param_bits.c
+++ b/bin/varnishd/mgt/mgt_param_bits.c
@@ -31,7 +31,6 @@
 
 #include <unistd.h>
 #include <string.h>
-#include <stdio.h>
 
 #include "mgt/mgt.h"
 #include "mgt/mgt_param.h"
diff --git a/bin/varnishd/mgt/mgt_param_tbl.c b/bin/varnishd/mgt/mgt_param_tbl.c
index b25539e..e29788d 100644
--- a/bin/varnishd/mgt/mgt_param_tbl.c
+++ b/bin/varnishd/mgt/mgt_param_tbl.c
@@ -29,8 +29,6 @@
 
 #include "config.h"
 
-#include <stdio.h>
-
 #include "mgt/mgt.h"
 
 #include "mgt/mgt_param.h"
diff --git a/bin/varnishd/mgt/mgt_param_tcp.c b/bin/varnishd/mgt/mgt_param_tcp.c
index 8def2a4..7744e1a 100644
--- a/bin/varnishd/mgt/mgt_param_tcp.c
+++ b/bin/varnishd/mgt/mgt_param_tcp.c
@@ -36,7 +36,6 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <netinet/in.h>
diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c
index 70e1c9a..643563a 100644
--- a/bin/varnishd/mgt/mgt_param_tweak.c
+++ b/bin/varnishd/mgt/mgt_param_tweak.c
@@ -34,7 +34,6 @@
 
 #include <limits.h>
 #include <math.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_pool.c b/bin/varnishd/mgt/mgt_pool.c
index 7cb807d..95e667c 100644
--- a/bin/varnishd/mgt/mgt_pool.c
+++ b/bin/varnishd/mgt/mgt_pool.c
@@ -42,8 +42,6 @@
 
 #include "config.h"
 
-#include <stdio.h>
-
 #include "mgt/mgt.h"
 
 #include "mgt/mgt_param.h"
diff --git a/bin/varnishd/mgt/mgt_shmem.c b/bin/varnishd/mgt/mgt_shmem.c
index 49a8753..f0849e9 100644
--- a/bin/varnishd/mgt/mgt_shmem.c
+++ b/bin/varnishd/mgt/mgt_shmem.c
@@ -35,8 +35,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <stdint.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_util.c b/bin/varnishd/mgt/mgt_util.c
index 8d2b0ee..83b3bc5 100644
--- a/bin/varnishd/mgt/mgt_util.c
+++ b/bin/varnishd/mgt/mgt_util.c
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * The management process and CLI handling
+ * The management process, various utility functions
  */
 
 #include "config.h"
@@ -34,15 +34,9 @@
 #include <sys/utsname.h>
 
 #include <stdarg.h>
-#include <time.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
-#include <unistd.h>
 
 #include "mgt/mgt.h"
 
diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index 2cbaaeb..39e2803 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -34,7 +34,6 @@
 #include <dlfcn.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index 6791245..bb9d4e0 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -32,7 +32,6 @@
 #include "config.h"
 
 #include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>



More information about the varnish-commit mailing list