[master] c5c9e33 Eliminate a redundant include file

Poul-Henning Kamp phk at varnish-cache.org
Sun Oct 9 10:42:21 CEST 2011


commit c5c9e33ee5f2bf4dd278841a6d82e25a647acef5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun Oct 9 08:42:03 2011 +0000

    Eliminate a redundant include file

diff --git a/lib/libvcl/Makefile.am b/lib/libvcl/Makefile.am
index 099ad36..8406ed7 100644
--- a/lib/libvcl/Makefile.am
+++ b/lib/libvcl/Makefile.am
@@ -7,7 +7,6 @@ pkglib_LTLIBRARIES = libvcl.la
 libvcl_la_LDFLAGS = -avoid-version
 
 libvcl_la_SOURCES = \
-	vcc_priv.h \
 	vcc_compile.h \
 	vcc_token_defs.h \
 	symbol_kind.h \
diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py
index 335cfd5..9342aaf 100755
--- a/lib/libvcl/generate.py
+++ b/lib/libvcl/generate.py
@@ -866,8 +866,7 @@ fo.write("""
 #include <stdio.h>
 #include <ctype.h>
 #include "config.h"
-#include "vcc_priv.h"
-#include "vsb.h"
+#include "vcc_compile.h"
 """)
 
 emit_vcl_fixed_token(fo, tokens)
diff --git a/lib/libvcl/vcc_acl.c b/lib/libvcl/vcc_acl.c
index bd94a5b..985a18e 100644
--- a/lib/libvcl/vcc_acl.c
+++ b/lib/libvcl/vcc_acl.c
@@ -40,8 +40,6 @@
 
 #include "vcc_compile.h"
 #include "vrt.h"
-#include "vcc_priv.h"
-#include "libvarnish.h"
 
 struct acl_e {
 	VTAILQ_ENTRY(acl_e)	list;
diff --git a/lib/libvcl/vcc_action.c b/lib/libvcl/vcc_action.c
index 1fafe98..61bfb87 100644
--- a/lib/libvcl/vcc_action.c
+++ b/lib/libvcl/vcc_action.c
@@ -34,8 +34,6 @@
 
 
 #include "vcc_compile.h"
-#include "vcc_priv.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------*/
 
diff --git a/lib/libvcl/vcc_backend.c b/lib/libvcl/vcc_backend.c
index 67fecd6..0c72c1c 100644
--- a/lib/libvcl/vcc_backend.c
+++ b/lib/libvcl/vcc_backend.c
@@ -59,8 +59,6 @@
 #include <string.h>
 
 #include "vcc_compile.h"
-#include "vcc_priv.h"
-#include "libvarnish.h"
 #include "vss.h"
 
 struct host {
diff --git a/lib/libvcl/vcc_backend_util.c b/lib/libvcl/vcc_backend_util.c
index 8d2cc1a..28510f5 100644
--- a/lib/libvcl/vcc_backend_util.c
+++ b/lib/libvcl/vcc_backend_util.c
@@ -34,9 +34,7 @@
 #include <stdarg.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------
  * Helper functions to complain about duplicate and missing fields
diff --git a/lib/libvcl/vcc_compile.c b/lib/libvcl/vcc_compile.c
index be3ec63..3af30c6 100644
--- a/lib/libvcl/vcc_compile.c
+++ b/lib/libvcl/vcc_compile.c
@@ -60,10 +60,7 @@
 #include <string.h>
 
 #include "vcc_compile.h"
-#include "vcc_priv.h"
-
 #include "libvcl.h"
-#include "libvarnish.h"
 
 struct method method_tab[] = {
 #define VCL_MET_MAC(l,U,m)	{ "vcl_"#l, m, VCL_MET_##U },
diff --git a/lib/libvcl/vcc_compile.h b/lib/libvcl/vcc_compile.h
index 438fe58..141f4f1 100644
--- a/lib/libvcl/vcc_compile.h
+++ b/lib/libvcl/vcc_compile.h
@@ -33,6 +33,20 @@
 #include "miniobj.h"
 #include "vsb.h"
 #include "vcl.h"
+#include "libvarnish.h"
+
+#include "vcc_token_defs.h"
+
+struct vsb;
+
+#define isident1(c) (isalpha(c))
+#define isident(c) (isalpha(c) || isdigit(c) || (c) == '_' || (c) == '-')
+#define isvar(c) (isident(c) || (c) == '.')
+unsigned vcl_fixed_token(const char *p, const char **q);
+extern const char * const vcl_tnames[256];
+void vcl_output_lang_h(struct vsb *sb);
+
+#define PF(t)	(int)((t)->e - (t)->b), (t)->b
 
 #define INDENT		2
 
diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c
index a5952c8..2e3951e 100644
--- a/lib/libvcl/vcc_dir_dns.c
+++ b/lib/libvcl/vcc_dir_dns.c
@@ -33,8 +33,6 @@
 #include <limits.h>
 
 #include "vcc_compile.h"
-#include "vcc_priv.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------
  * Parse directors
diff --git a/lib/libvcl/vcc_dir_random.c b/lib/libvcl/vcc_dir_random.c
index 46f74c2..4166918 100644
--- a/lib/libvcl/vcc_dir_random.c
+++ b/lib/libvcl/vcc_dir_random.c
@@ -30,8 +30,6 @@
 #include "config.h"
 
 #include "vcc_compile.h"
-#include "vcc_priv.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------
  * Parse directors
diff --git a/lib/libvcl/vcc_dir_round_robin.c b/lib/libvcl/vcc_dir_round_robin.c
index b1094fe..835d969 100644
--- a/lib/libvcl/vcc_dir_round_robin.c
+++ b/lib/libvcl/vcc_dir_round_robin.c
@@ -29,8 +29,6 @@
 #include "config.h"
 
 #include "vcc_compile.h"
-#include "vcc_priv.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------
  * Parse directors
diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c
index 4fbcd85..dc7d99d 100644
--- a/lib/libvcl/vcc_expr.c
+++ b/lib/libvcl/vcc_expr.c
@@ -37,9 +37,7 @@
 #include <string.h>
 #include <math.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 static const char *
 vcc_Type(enum var_type fmt)
diff --git a/lib/libvcl/vcc_parse.c b/lib/libvcl/vcc_parse.c
index 23c9bf7..4023287 100644
--- a/lib/libvcl/vcc_parse.c
+++ b/lib/libvcl/vcc_parse.c
@@ -32,9 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------*/
 
diff --git a/lib/libvcl/vcc_priv.h b/lib/libvcl/vcc_priv.h
deleted file mode 100644
index 1e990b2..0000000
--- a/lib/libvcl/vcc_priv.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * Copyright (c) 2006 Verdens Gang AS
- * Copyright (c) 2006-2009 Varnish Software AS
- * All rights reserved.
- *
- * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Stuff shared between main.c and fixed_token.c
- */
-
-#include "vcc_token_defs.h"
-
-struct vsb;
-
-#define isident1(c) (isalpha(c))
-#define isident(c) (isalpha(c) || isdigit(c) || (c) == '_' || (c) == '-')
-#define isvar(c) (isident(c) || (c) == '.')
-unsigned vcl_fixed_token(const char *p, const char **q);
-extern const char * const vcl_tnames[256];
-void vcl_output_lang_h(struct vsb *sb);
-
-#define PF(t)	(int)((t)->e - (t)->b), (t)->b
diff --git a/lib/libvcl/vcc_storage.c b/lib/libvcl/vcc_storage.c
index 5aff6e7..5f9712a 100644
--- a/lib/libvcl/vcc_storage.c
+++ b/lib/libvcl/vcc_storage.c
@@ -59,9 +59,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 #define PFX "storage."
 
diff --git a/lib/libvcl/vcc_string.c b/lib/libvcl/vcc_string.c
index c6353d7..dfc82cf 100644
--- a/lib/libvcl/vcc_string.c
+++ b/lib/libvcl/vcc_string.c
@@ -32,9 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 #include "vrt.h"
 #include "vre.h"
diff --git a/lib/libvcl/vcc_symb.c b/lib/libvcl/vcc_symb.c
index 4975c12..0acb0cd 100644
--- a/lib/libvcl/vcc_symb.c
+++ b/lib/libvcl/vcc_symb.c
@@ -32,9 +32,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------*/
 
diff --git a/lib/libvcl/vcc_token.c b/lib/libvcl/vcc_token.c
index 5a79732..63ebbf3 100644
--- a/lib/libvcl/vcc_token.c
+++ b/lib/libvcl/vcc_token.c
@@ -34,8 +34,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "libvarnish.h"
-#include "vcc_priv.h"
 #include "vcc_compile.h"
 
 /*--------------------------------------------------------------------*/
diff --git a/lib/libvcl/vcc_var.c b/lib/libvcl/vcc_var.c
index b6e1ea7..1bbac15 100644
--- a/lib/libvcl/vcc_var.c
+++ b/lib/libvcl/vcc_var.c
@@ -32,9 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 
 /*--------------------------------------------------------------------*/
 
diff --git a/lib/libvcl/vcc_vmod.c b/lib/libvcl/vcc_vmod.c
index 37a98fd..40c9ed5 100644
--- a/lib/libvcl/vcc_vmod.c
+++ b/lib/libvcl/vcc_vmod.c
@@ -32,9 +32,7 @@
 #include <dlfcn.h>
 #include <string.h>
 
-#include "vcc_priv.h"
 #include "vcc_compile.h"
-#include "libvarnish.h"
 #include "vmod_abi.h"
 
 void
diff --git a/lib/libvcl/vcc_xref.c b/lib/libvcl/vcc_xref.c
index 56a2747..c3ef375 100644
--- a/lib/libvcl/vcc_xref.c
+++ b/lib/libvcl/vcc_xref.c
@@ -41,8 +41,6 @@
 
 #include <stdio.h>
 
-#include "libvarnish.h"
-#include "vcc_priv.h"
 #include "vcc_compile.h"
 
 /*--------------------------------------------------------------------*/



More information about the varnish-commit mailing list