aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am11
-rw-r--r--src/binlog.c25
2 files changed, 16 insertions, 20 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 5a525de..2b0f953 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of vmod-binlog
-# Copyright (C) 2013-2014, 2016 Sergey Poznyakoff
+# Copyright (C) 2013-2017 Sergey Poznyakoff
#
# Vmod-binlog is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,10 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
-AM_CPPFLAGS =\
- -I$(VARNISHSRC)/include\
- -I$(VARNISHSRC)/bin/varnishd\
- -I$(VARNISHSRC)
+AM_CPPFLAGS=\
+ $(VARNISHAPI_CFLAGS)
noinst_LIBRARIES = libbinlog.a
libbinlog_a_SOURCES = pack.c err.c parse-datetime.y xalloc.c
@@ -49,12 +47,11 @@ binlog.lo: vcc_if.c vcc_if.h
CLEANFILES = vcc_if.c vcc_if.h *.rst
-vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict
vccfile = $(top_srcdir)/src/vmod.vcc
vcc_if.c vcc_if.h: $(vmodtool) $(vccfile)
- $(AM_V_GEN)$(PYTHON) $(vmodtool) $(vmodtoolargs) $(vccfile)
+ $(AM_V_GEN)$(PYTHON) $(VARNISHAPI_VMODTOOL) $(vmodtoolargs) $(vccfile)
EXTRA_DIST = vmod.vcc
diff --git a/src/binlog.c b/src/binlog.c
index 1bf5950..b2d581c 100644
--- a/src/binlog.c
+++ b/src/binlog.c
@@ -1,5 +1,5 @@
/* This file is part of vmod-binlog
- Copyright (C) 2013, 2014, 2016 Sergey Poznyakoff
+ Copyright (C) 2013, 2014, 2016, 2017 Sergey Poznyakoff
Vmod-binlog is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,8 +31,7 @@
#include "vrt.h"
#include "vcc_if.h"
-#include "bin/varnishd/cache/cache.h"
-#define MOD_CTX const struct vrt_ctx *
+#include "cache/cache.h"
#define WSPTR(s) ((s)->ws)
#include "vmod-binlog.h"
@@ -270,7 +269,7 @@ make_key()
}
void
-vmod_init(MOD_CTX ctx, struct vmod_priv *priv,
+vmod_init(VRT_CTX, struct vmod_priv *priv,
const char *dir, const char *format, const char *param)
{
struct binlog_config *conf = priv->priv;
@@ -434,7 +433,7 @@ vmod_init(MOD_CTX ctx, struct vmod_priv *priv,
}
static char *
-mkfilename(MOD_CTX ctx, struct binlog_config *conf)
+mkfilename(VRT_CTX, struct binlog_config *conf)
{
time_t ts = time(NULL);
size_t u, n;
@@ -489,7 +488,7 @@ mkdir_p(struct binlog_config *conf, char *dir)
}
static int
-createfile(MOD_CTX ctx, struct binlog_config *conf)
+createfile(VRT_CTX, struct binlog_config *conf)
{
char *fname;
int fd;
@@ -599,7 +598,7 @@ checkheader(struct binlog_config *conf, size_t hdrsize)
}
static int
-newfile(MOD_CTX ctx, struct binlog_config *conf)
+newfile(VRT_CTX, struct binlog_config *conf)
{
int c;
void *base;
@@ -683,7 +682,7 @@ newfile(MOD_CTX ctx, struct binlog_config *conf)
}
static void
-closefile(MOD_CTX ctx, struct binlog_config *conf)
+closefile(VRT_CTX, struct binlog_config *conf)
{
size_t size;
@@ -701,7 +700,7 @@ closefile(MOD_CTX ctx, struct binlog_config *conf)
}
VCL_VOID
-vmod_start(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_start(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
time_t ts;
@@ -724,7 +723,7 @@ vmod_start(MOD_CTX ctx, struct vmod_priv *priv)
}
VCL_VOID
-vmod_pack(MOD_CTX ctx, struct vmod_priv *priv, VCL_STRING str)
+vmod_pack(VRT_CTX, struct vmod_priv *priv, VCL_STRING str)
{
struct binlog_config *conf = priv->priv;
struct binlog_env *ep = binlog_env_get();
@@ -759,7 +758,7 @@ vmod_pack(MOD_CTX ctx, struct vmod_priv *priv, VCL_STRING str)
}
VCL_VOID
-vmod_commit(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_commit(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
struct binlog_env *ep = binlog_env_get();
@@ -799,7 +798,7 @@ vmod_commit(MOD_CTX ctx, struct vmod_priv *priv)
}
VCL_VOID
-vmod_sync(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_sync(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
@@ -813,7 +812,7 @@ vmod_sync(MOD_CTX ctx, struct vmod_priv *priv)
}
VCL_VOID
-vmod_close(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_close(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;

Return to:

Send suggestions and report system problems to the System administrator.