diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-09 02:24:15 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-09 02:26:38 +0200 |
commit | 26ebbda9d6440498731ee6980945bfc0a18f6dc1 (patch) | |
tree | 27a2d1ba6c7a89131b5444a1f6645a5bc5d4e462 | |
parent | 32a55b403a2bbd774aed5b714d25ddad4e062d4f (diff) | |
download | vmod-tbf-26ebbda9d6440498731ee6980945bfc0a18f6dc1.tar.gz vmod-tbf-26ebbda9d6440498731ee6980945bfc0a18f6dc1.tar.bz2 |
Cleanup of the merge
* configure.ac: Don't check for dbm. Enable silent rules.
* src/tbf.c: Restore the init function.
* src/vmod_tbf.vcc: Likewise.
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | src/tbf.c | 7 | ||||
-rw-r--r-- | src/vmod_tbf.vcc | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 6 |
4 files changed, 13 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index f8e19de..a93ac20 100644 --- a/configure.ac +++ b/configure.ac @@ -20,13 +20,14 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/vmod_tbf.vcc) AM_CONFIG_HEADER(config.h) AC_CANONICAL_SYSTEM AC_LANG(C) -AM_INIT_AUTOMAKE([1.14 gnu tar-ustar]) +AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules]) +AM_SILENT_RULES([yes]) AC_GNU_SOURCE AC_PROG_CC AC_PROG_CC_STDC if test "x$ac_cv_prog_cc_c99" = xno; then AC_MSG_ERROR([could not find a C99 compatible compiler]) @@ -101,30 +102,12 @@ AC_ARG_WITH([vmoddir], if test -z "$VMODDIR"; then VMODDIR='$(libdir)/varnish/mods' fi -########### -# Check for db.h and libdb -# -AC_CHECK_HEADER([db.h],,[AC_MSG_ERROR([Required header file db.h not found])]) - -AC_CHECK_LIB(db, db_create, - [LIBS="$LIBS -ldb" - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([#include "db.h"], - [int v_major, v_minor, v_patch; - db_version(&v_major, &v_minor, &v_patch); - return !(v_major == DB_VERSION_MAJOR - && v_minor == DB_VERSION_MINOR - && v_patch == DB_VERSION_PATCH); - ])], - [], - [AC_MSG_ERROR([header file db.h is not the same version as libdb])])]) - AC_CONFIG_COMMANDS([status],[ delim="-------------------------------------------------------------------" echo "" echo $delim echo "Building for Varnish version $VARNISHVERSION" echo $delim @@ -841,12 +841,19 @@ tbf_exit(void) struct tree *t = tbf_get_tree(); tree_dump(t, tbf_dump_file_name); tbf_release_tree(&t); } } +int +tbf_init(struct vmod_priv *priv, const struct VCL_conf *vclconf) +{ + tbf_tree = tree_create(); + atexit(tbf_exit); +} + VCL_VOID vmod_debug(MOD_CTX ctx, VCL_INT newval) { debug_level = newval; } diff --git a/src/vmod_tbf.vcc b/src/vmod_tbf.vcc index 22493e1..5347437 100644 --- a/src/vmod_tbf.vcc +++ b/src/vmod_tbf.vcc @@ -21,12 +21,13 @@ COLOPHON This document provides a short description of the **vmod-tbf** module. For a detailed documentation, please see vmod-tbf(3) manual page. DESCRIPTION =========== +$Init tbf_init $Function VOID debug(INT) $Function VOID dump(STRING) $Function VOID load(STRING) $Function VOID gc(DURATION) $Function VOID set_gc_interval(DURATION) $Function VOID dump_at_exit(STRING) diff --git a/tests/Makefile.am b/tests/Makefile.am index cb255cc..2510724 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,22 +31,22 @@ VMOD_TESTS = \ test02.vti\ test03.vtc\ test05.vtc\ time00.vtc .vti.vtc: - sed 's/^#VARNISH$(VARNISHVERSION)#//' $< > $@ + $(AM_V_GEN)sed 's/^#VARNISH$(VARNISHVERSION)#//' $< > $@ EXTRA_DIST=$(VMOD_VTC) $(VMOD_VTI) CLEANFILES=$(BUILT_TESTS) distclean-local: - rm -fr tbf + $(AM_V_at)rm -fr tbf check: $(BUILT_TESTS) - for t in $(VMOD_TESTS); do \ + $(AM_V_at)for t in $(VMOD_TESTS); do \ n=$${t%%.vti}; \ if [ $$n != $$t ]; then \ t=$(abs_builddir)/$${n}.vtc;\ else \ t=$(abs_srcdir)/$$t;\ fi; \ |