diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 17 | ||||
-rw-r--r-- | src/tbf.h | 20 | ||||
-rw-r--r-- | src/vmod-tbf.3 | 2 |
3 files changed, 9 insertions, 30 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 214af8f..7d4e194 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,21 +41,10 @@ tbf.lo: vcc_if.h CLEANFILES = vcc_if.c vcc_if.h *.rst -if VARNISH4 - vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py - vmodtoolargs = --strict - vccfile = $(top_srcdir)/src/vmod_tbf.vcc -else - vmodtool = $(VARNISHSRC)/lib/libvmod_std/vmod.py - vmodtoolargs = - vccfile = vmod_tbf.vcc3 +vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py +vmodtoolargs = --strict +vccfile = $(top_srcdir)/src/vmod_tbf.vcc -vmod_tbf.vcc3: $(top_srcdir)/src/vmod_tbf.vcc - CLEANFILES += vmod_tbf.vcc3 -endif - -.vcc.vcc3: - sed -n '/^\$$/{s///;s/\(Module *[^ ][^ ]*\).*/\1/;p}' $< > $@ vcc_if.c vcc_if.h: $(vmodtool) $(vccfile) @PYTHON@ $(vmodtool) $(vmodtoolargs) $(vccfile) @@ -1,5 +1,5 @@ /* This file is part of vmod-tbf - Copyright (C) 2013-2014 Sergey Poznyakoff + Copyright (C) 2013-2016 Sergey Poznyakoff Vmod-tbf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,17 +25,7 @@ #include "vrt.h" #include "vcc_if.h" #include "pthread.h" -#if VARNISHVERSION == 3 -# include "bin/varnishd/cache.h" -# define VCL_VOID void -# define VCL_INT int -# define VCL_REAL double -# define VCL_BOOL unsigned -# define VCL_STRING const char * -# define MOD_CTX struct sess * -# define WSPTR(s) ((s)->wrk->ws) -#else -# include "bin/varnishd/cache/cache.h" -# define MOD_CTX const struct vrt_ctx * -# define WSPTR(s) ((s)->ws) -#endif + +#include "bin/varnishd/cache/cache.h" +#define MOD_CTX const struct vrt_ctx * +#define WSPTR(s) ((s)->ws) diff --git a/src/vmod-tbf.3 b/src/vmod-tbf.3 index 03d7daf..0b5a99d 100644 --- a/src/vmod-tbf.3 +++ b/src/vmod-tbf.3 @@ -206,7 +206,7 @@ of time. .\" for man-based doc pages. .if "\V[MANCGI]"WEBDOC" \{\ . ds package vmod-tbf -. ds version 1.0 +. ds version 2.0 . so download.inc \} .SH "SEE ALSO" |