Commit 098bc84a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

I can never remember which of the two VCC generation scripts to run

first, so combine them into one and avoid the issue entirely.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4188 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5cff501f
......@@ -27,18 +27,16 @@ typedef int vcl_func_f(struct sess *sp);
#define VCL_MET_MAX 9
/* VCL Returns */
#define VCL_RET_ERROR 0
#define VCL_RET_LOOKUP 1
#define VCL_RET_HASH 2
#define VCL_RET_PIPE 3
#define VCL_RET_PASS 4
#define VCL_RET_FETCH 5
#define VCL_RET_DELIVER 6
#define VCL_RET_DISCARD 7
#define VCL_RET_KEEP 8
#define VCL_RET_RESTART 9
#define VCL_RET_DELIVER 0
#define VCL_RET_ERROR 1
#define VCL_RET_FETCH 2
#define VCL_RET_HASH 3
#define VCL_RET_LOOKUP 4
#define VCL_RET_PASS 5
#define VCL_RET_PIPE 6
#define VCL_RET_RESTART 7
#define VCL_RET_MAX 10
#define VCL_RET_MAX 8
struct VCL_conf {
unsigned magic;
......
......@@ -7,15 +7,13 @@
*/
#ifdef VCL_RET_MAC
VCL_RET_MAC(deliver, DELIVER)
VCL_RET_MAC(error, ERROR)
VCL_RET_MAC(lookup, LOOKUP)
VCL_RET_MAC(fetch, FETCH)
VCL_RET_MAC(hash, HASH)
VCL_RET_MAC(pipe, PIPE)
VCL_RET_MAC(lookup, LOOKUP)
VCL_RET_MAC(pass, PASS)
VCL_RET_MAC(fetch, FETCH)
VCL_RET_MAC(deliver, DELIVER)
VCL_RET_MAC(discard, DISCARD)
VCL_RET_MAC(keep, KEEP)
VCL_RET_MAC(pipe, PIPE)
VCL_RET_MAC(restart, RESTART)
#endif
......
......@@ -3,7 +3,7 @@
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit vcc_gen_obj.tcl instead
* Edit and run vcc_gen_fixed_token.tcl instead
*/
struct sockaddr * VRT_r_client_ip(const struct sess *);
......
......@@ -25,11 +25,11 @@ libvcl_la_SOURCES = \
vcc_var.c \
vcc_xref.c
EXTRA_DIST = vcc_gen_obj.tcl \
EXTRA_DIST = \
vcc_gen_fixed_token.tcl
$(srcdir)/vcc_obj.c: $(srcdir)/vcc_gen_obj.tcl
cd $(srcdir) && @TCLSH@ vcc_gen_obj.tcl || true
$(srcdir)/vcc_obj.c: $(srcdir)/vcc_gen_fixed_token.tcl
cd $(srcdir) && @TCLSH@ vcc_gen_fixed_token.tcl || true
$(srcdir)/vcc_fixed_token.c: $(srcdir)/vcc_gen_fixed_token.tcl $(top_srcdir)/include/vcl.h $(top_srcdir)/include/vrt.h $(top_srcdir)/include/vrt_obj.h
cd $(srcdir) && @TCLSH@ vcc_gen_fixed_token.tcl || true
......
......@@ -176,17 +176,15 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, "#define VCL_MET_DELIVER\t\t(1 << 7)\n");
vsb_cat(sb, "#define VCL_MET_ERROR\t\t(1 << 8)\n");
vsb_cat(sb, "\n#define VCL_MET_MAX\t\t9\n\n/* VCL Returns */\n");
vsb_cat(sb, "#define VCL_RET_ERROR\t\t0\n#define VCL_RET_LOOKUP\t\t");
vsb_cat(sb, "1\n#define VCL_RET_HASH\t\t2\n#define VCL_RET_PIPE\t\t");
vsb_cat(sb, "3\n#define VCL_RET_PASS\t\t4\n#define VCL_RET_FETCH\t\t");
vsb_cat(sb, "5\n#define VCL_RET_DELIVER\t\t6\n");
vsb_cat(sb, "#define VCL_RET_DISCARD\t\t7\n#define VCL_RET_KEEP\t\t");
vsb_cat(sb, "8\n#define VCL_RET_RESTART\t\t9\n");
vsb_cat(sb, "\n#define VCL_RET_MAX\t\t10\n\n");
vsb_cat(sb, "struct VCL_conf {\n\tunsigned\tmagic;\n");
vsb_cat(sb, "#define VCL_CONF_MAGIC\t0x7406c509\t/* from /dev/rando");
vsb_cat(sb, "m */\n\n\tstruct director\t**director;\n");
vsb_cat(sb, "\tunsigned\tndirector;\n\tstruct vrt_ref\t*ref;\n");
vsb_cat(sb, "#define VCL_RET_DELIVER\t\t0\n#define VCL_RET_ERROR\t\t");
vsb_cat(sb, "1\n#define VCL_RET_FETCH\t\t2\n");
vsb_cat(sb, "#define VCL_RET_HASH\t\t3\n#define VCL_RET_LOOKUP\t\t4");
vsb_cat(sb, "\n#define VCL_RET_PASS\t\t5\n#define VCL_RET_PIPE\t\t6");
vsb_cat(sb, "\n#define VCL_RET_RESTART\t\t7\n");
vsb_cat(sb, "\n#define VCL_RET_MAX\t\t8\n\nstruct VCL_conf {\n");
vsb_cat(sb, "\tunsigned\tmagic;\n#define VCL_CONF_MAGIC\t0x7406c509");
vsb_cat(sb, "\t/* from /dev/random */\n\n\tstruct director\t**direc");
vsb_cat(sb, "tor;\n\tunsigned\tndirector;\n\tstruct vrt_ref\t*ref;\n");
vsb_cat(sb, "\tunsigned\tnref;\n\tunsigned\tbusy;\n");
vsb_cat(sb, "\tunsigned\tdiscard;\n\n\tunsigned\tnsrc;\n");
vsb_cat(sb, "\tconst char\t**srcname;\n\tconst char\t**srcbody;\n");
......@@ -230,8 +228,8 @@ vcl_output_lang_h(struct vsb *sb)
vsb_cat(sb, " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWI");
vsb_cat(sb, "SE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFT");
vsb_cat(sb, "WARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n");
vsb_cat(sb, " * SUCH DAMAGE.\n *\n * $Id: vrt.h 4025 2009-04-03 21:");
vsb_cat(sb, "52:44Z des $\n *\n * Runtime support for compiled VCL ");
vsb_cat(sb, " * SUCH DAMAGE.\n *\n * $Id: vrt.h 4185 2009-08-17 11:");
vsb_cat(sb, "53:01Z phk $\n *\n * Runtime support for compiled VCL ");
vsb_cat(sb, "programs.\n *\n * XXX: When this file is changed, lib/");
vsb_cat(sb, "libvcl/vcc_gen_fixed_token.tcl\n");
vsb_cat(sb, " * XXX: *MUST* be rerun.\n */\n");
......@@ -319,26 +317,26 @@ vcl_output_lang_h(struct vsb *sb)
/* ../../include/vrt_obj.h */
vsb_cat(sb, "/*\n * $Id: vcc_gen_obj.tcl 4099 2009-06-08 21:40:48Z ");
vsb_cat(sb, "phk $\n *\n * NB: This file is machine generated, DO ");
vsb_cat(sb, "NOT EDIT!\n *\n * Edit vcc_gen_obj.tcl instead\n");
vsb_cat(sb, " */\n\nstruct sockaddr * VRT_r_client_ip(const struct ");
vsb_cat(sb, "sess *);\nstruct sockaddr * VRT_r_server_ip(struct ses");
vsb_cat(sb, "s *);\nconst char * VRT_r_server_hostname(struct sess ");
vsb_cat(sb, "*);\nconst char * VRT_r_server_identity(struct sess *)");
vsb_cat(sb, ";\nint VRT_r_server_port(struct sess *);\n");
vsb_cat(sb, "const char * VRT_r_req_request(const struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_request(const struct sess *, const char");
vsb_cat(sb, " *, ...);\nconst char * VRT_r_req_url(const struct ses");
vsb_cat(sb, "s *);\nvoid VRT_l_req_url(const struct sess *, const c");
vsb_cat(sb, "har *, ...);\nconst char * VRT_r_req_proto(const struc");
vsb_cat(sb, "t sess *);\nvoid VRT_l_req_proto(const struct sess *, ");
vsb_cat(sb, "const char *, ...);\nvoid VRT_l_req_hash(struct sess *");
vsb_cat(sb, ", const char *);\nstruct director * VRT_r_req_backend(");
vsb_cat(sb, "struct sess *);\nvoid VRT_l_req_backend(struct sess *,");
vsb_cat(sb, " struct director *);\nint VRT_r_req_restarts(const str");
vsb_cat(sb, "uct sess *);\ndouble VRT_r_req_grace(struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_grace(struct sess *, double);\n");
vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4100 2009-06-09 10");
vsb_cat(sb, ":41:38Z phk $\n *\n * NB: This file is machine genera");
vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit and run vcc_gen_fixed_t");
vsb_cat(sb, "oken.tcl instead\n */\n\nstruct sockaddr * VRT_r_clien");
vsb_cat(sb, "t_ip(const struct sess *);\nstruct sockaddr * VRT_r_se");
vsb_cat(sb, "rver_ip(struct sess *);\nconst char * VRT_r_server_hos");
vsb_cat(sb, "tname(struct sess *);\nconst char * VRT_r_server_ident");
vsb_cat(sb, "ity(struct sess *);\nint VRT_r_server_port(struct sess");
vsb_cat(sb, " *);\nconst char * VRT_r_req_request(const struct sess");
vsb_cat(sb, " *);\nvoid VRT_l_req_request(const struct sess *, cons");
vsb_cat(sb, "t char *, ...);\nconst char * VRT_r_req_url(const stru");
vsb_cat(sb, "ct sess *);\nvoid VRT_l_req_url(const struct sess *, c");
vsb_cat(sb, "onst char *, ...);\nconst char * VRT_r_req_proto(const");
vsb_cat(sb, " struct sess *);\nvoid VRT_l_req_proto(const struct se");
vsb_cat(sb, "ss *, const char *, ...);\nvoid VRT_l_req_hash(struct ");
vsb_cat(sb, "sess *, const char *);\nstruct director * VRT_r_req_ba");
vsb_cat(sb, "ckend(struct sess *);\nvoid VRT_l_req_backend(struct s");
vsb_cat(sb, "ess *, struct director *);\nint VRT_r_req_restarts(con");
vsb_cat(sb, "st struct sess *);\ndouble VRT_r_req_grace(struct sess");
vsb_cat(sb, " *);\nvoid VRT_l_req_grace(struct sess *, double);\n");
vsb_cat(sb, "const char * VRT_r_req_xid(struct sess *);\n");
vsb_cat(sb, "unsigned VRT_r_req_esi(struct sess *);\n");
vsb_cat(sb, "void VRT_l_req_esi(struct sess *, unsigned);\n");
......
This diff is collapsed.
This diff is collapsed.
/*
* $Id: vcc_gen_obj.tcl 4099 2009-06-08 21:40:48Z phk $
* $Id: vcc_gen_fixed_token.tcl 4100 2009-06-09 10:41:38Z phk $
*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit vcc_gen_obj.tcl instead
* Edit and run vcc_gen_fixed_token.tcl instead
*/
#include "config.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment