Ticket 2810 is about the names generated by vmodtool and vcc, and
while there is a good intellectual argument for getting it right,
I am a little bit worried about how much havoc that causes.
This is a WIP patch headed in that direction, and I would like to
hear input from VMOD writers.
Ideally with this stuff finished, VMOD writers can version their
vmods using $Prefix and you will then be able to import multiple
different versions of the same VMOD in the same VCL. Not sure that
is a good thing to do, but it proves that the name-space issue is
solved.
See the changes to the in-tree vmods for how this will look for you.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[email protected] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
diff --git a/doc/sphinx/reference/directors.rst b/doc/sphinx/reference/directors.rst
index b359133ae..8758b4535 100644
--- a/doc/sphinx/reference/directors.rst
+++ b/doc/sphinx/reference/directors.rst
@@ -155,7 +155,7 @@ Health Probes
=============
It is possible in a VCL program to query the health of a director (see
-:ref:`func_healthy`). A director can report its health if it implements the
+:ref:`vmod_std.healthy`). A director can report its health if it implements the
``healthy`` function, it is otherwise always considered healthy.
Unless you are making a dynamic backend, you need to take care of the
diff --git a/doc/sphinx/whats-new/upgrading-5.1.rst b/doc/sphinx/whats-new/upgrading-5.1.rst
index f350c58ff..62a1726c4 100644
--- a/doc/sphinx/whats-new/upgrading-5.1.rst
+++ b/doc/sphinx/whats-new/upgrading-5.1.rst
@@ -197,7 +197,7 @@ vcl_recv
* Added ``req.storage``, which tells Varnish which storage backend to
use if you choose to save the request body (see
- :ref:`func_cache_req_body`).
+ :ref:`vmod_std.cache_req_body`).
* ``return(vcl(LABEL))`` may not be called after a restart. It can
only be called from the active VCL instance.
@@ -232,9 +232,9 @@ nuke limit is used in all cases.
vmod_std
~~~~~~~~
-* Added ``std.getenv()``, see :ref:`func_getenv`.
+* Added ``std.getenv()``, see :ref:`vmod_std.getenv`.
-* Added ``std.late_100_continue()``, see :ref:`func_late_100_continue`.
+* Added ``std.late_100_continue()``, see :ref:`vmod_std.late_100_continue`.
Other changes
=============
diff --git a/doc/sphinx/whats-new/upgrading-5.2.rst b/doc/sphinx/whats-new/upgrading-5.2.rst
index fa137c35f..8edd71b6b 100644
--- a/doc/sphinx/whats-new/upgrading-5.2.rst
+++ b/doc/sphinx/whats-new/upgrading-5.2.rst
@@ -121,7 +121,7 @@ situation.
vmod_std
~~~~~~~~
-Added :ref:`func_file_exists`.
+Added :ref:`vmod_std.file_exists`.
New VMODs in the standard distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/sphinx/whats-new/upgrading-6.0.rst b/doc/sphinx/whats-new/upgrading-6.0.rst
index 510993143..7a0227995 100644
--- a/doc/sphinx/whats-new/upgrading-6.0.rst
+++ b/doc/sphinx/whats-new/upgrading-6.0.rst
@@ -461,9 +461,9 @@ backend, or set a value for the Host header in VCL.
VMOD std
--------
-:ref:`std.port(IP) <func_port>` always returns 0 when applied to a
+:ref:`std.port(IP) <vmod_std.port>` always returns 0 when applied to a
``*.ip`` variable whose value is set to ``0.0.0.0`` because the
-listener is UDS. :ref:`std.set_ip_tos(INT) <func_set_ip_tos>` is
+listener is UDS. :ref:`std.set_ip_tos(INT) <vmod_std.set_ip_tos>` is
silently ignored when the listener is UDS.
The ``shard`` director
@@ -519,7 +519,7 @@ except for ``req.restarts`` and ``req.xid``, which change by design.
If you need to reset the client request headers to their original
state (before changes in VCL), call
-:ref:`std.rollback(req) <func_rollback>`.
+:ref:`std.rollback(req) <vmod_std.rollback>`.
``return(restart)`` can now be called from ``vcl_recv{}``.
diff --git a/doc/sphinx/whats-new/upgrading-6.1.rst b/doc/sphinx/whats-new/upgrading-6.1.rst
index a082b3cc5..7a5499af4 100644
--- a/doc/sphinx/whats-new/upgrading-6.1.rst
+++ b/doc/sphinx/whats-new/upgrading-6.1.rst
@@ -138,7 +138,7 @@ Other changes to VCL
VMODs
=====
-Added the :ref:`func_fnmatch` function to :ref:`vmod_std(3)`, which
+Added the :ref:`vmod_std.fnmatch` function to :ref:`vmod_std(3)`, which
you can use for shell-style wildcard matching. Wildcard patterns may
be a good fit for matching URLs, to match against a pattern like
``/foo/*/bar/*``. The patterns can be built at runtime, if you need to
diff --git a/include/vrt.h b/include/vrt.h
index 35d9dcaa1..5863e2997 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -240,6 +240,7 @@ struct vmod_data {
const char *file_id;
const char *name;
+ const char *func_name;
const void *func;
int func_len;
const char *proto;
diff --git a/lib/libvcc/vcc_vmod.c b/lib/libvcc/vcc_vmod.c
index 00f0cb0d0..678821429 100644
--- a/lib/libvcc/vcc_vmod.c
+++ b/lib/libvcc/vcc_vmod.c
@@ -307,8 +307,8 @@ vcc_ParseImport(struct vcc *tl)
VSB_printf(ifp->ini, "\tif (VRT_Vmod_Init(ctx,\n");
VSB_printf(ifp->ini, "\t &VGC_vmod_%.*s,\n", PF(mod));
VSB_printf(ifp->ini, "\t %u,\n", tl->vmod_count++);
- VSB_printf(ifp->ini, "\t &Vmod_%.*s_Func,\n", PF(mod));
- VSB_printf(ifp->ini, "\t sizeof(Vmod_%.*s_Func),\n", PF(mod));
+ VSB_printf(ifp->ini, "\t &%s,\n", vmd->func_name);
+ VSB_printf(ifp->ini, "\t sizeof(%s),\n", vmd->func_name);
VSB_printf(ifp->ini, "\t \"%.*s\",\n", PF(mod));
VSB_printf(ifp->ini, "\t ");
VSB_quote(ifp->ini, fnp, -1, VSB_QUOTE_CSTR);
diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index 17956311b..ffe6de3d4 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -127,6 +127,13 @@ def unquote(txt):
assert is_quoted(txt)
return txt[1:-1]
+def fmt_cstruct(fo, a, b):
+ ''' Output line in vmod struct '''
+ t = "\t%s\t" % a
+ while len(t.expandtabs()) < 40:
+ t += "\t"
+ fo.write("%s%s\n" % (t, b))
+
#######################################################################
@@ -177,15 +184,6 @@ def lwrap(s, width=64):
return "\n".join(ll) + "\n"
-def fmt_cstruct(fo, mn, x):
- """
- Align fields in C struct
- """
- a = "\ttd_" + mn + "_" + x
- while len(a.expandtabs()) < 40:
- a += "\t"
- fo.write("%s*%s;\n" % (a, x))
-
#######################################################################
@@ -424,9 +422,11 @@ class ProtoType(object):
s += ", ".join(ll)
return s + ');'
+ def typedef_name(self):
+ return 'td_' + self.st.vcc.sympfx + self.cname()
+
def typedef(self, args):
- tn = 'td_' + self.st.vcc.modname + '_' + self.cname()
- return "typedef " + self.proto(args, name=tn)
+ return "typedef " + self.proto(args, name=self.typedef_name())
def argstructname(self):
return "struct %s_arg" % self.cname(True)
@@ -468,7 +468,7 @@ class ProtoType(object):
''' Produce VCL prototype as JSON '''
ll = []
self.retval.jsonproto(ll)
- ll.append('Vmod_%s_Func.%s' % (self.st.vcc.modname, cfunc))
+ ll.append('%s.%s' % (self.st.vcc.csn, cfunc))
if self.argstruct:
ll.append(self.argstructname())
else:
@@ -508,13 +508,13 @@ class Stanza(object):
warn=False)
def rstfile(self, fo, man):
- if self.rstlbl:
- fo.write("\n.. _" + self.rstlbl + ":\n")
self.rsthead(fo, man)
self.rstdoc(fo, man)
def rsthead(self, fo, unused_man):
''' Emit the systematic part of the documentation '''
+ if self.rstlbl:
+ fo.write("\n.. _" + self.rstlbl + ":\n")
if self.proto:
self.proto.rsthead(fo)
fo.write("\n")
@@ -532,6 +532,20 @@ class Stanza(object):
def cstuff(self, unused_fo, unused_where):
return
+ def fmt_cstruct_proto(self, fo, proto, define):
+ if define:
+ fmt_cstruct(
+ fo,
+ proto.typedef_name(),
+ '*' + proto.cname() + ';'
+ )
+ else:
+ fmt_cstruct(
+ fo,
+ '.' + proto.cname() + ' =',
+ '*' + self.vcc.sympfx + proto.cname() + ','
+ )
+
def cstruct(self, unused_fo, unused_define):
return
@@ -556,10 +570,9 @@ class ModuleStanza(Stanza):
else:
print("\nNOTICE: Please put $Module description in quotes.\n")
self.vcc.moddesc = " ".join(self.toks[3:])
- self.rstlbl = "vmod_%s(%s)" % (
- self.vcc.modname,
- self.vcc.mansection
- )
+ self.rstlbl = "vmod_%s(%d)" % (self.vcc.modname, 3)
+ if self.vcc.sympfx is None:
+ self.vcc.sympfx = self.vcc.modname + "_"
self.vcc.contents.append(self)
def rsthead(self, fo, man):
@@ -570,6 +583,8 @@ class ModuleStanza(Stanza):
fo.write("\n")
fo.write(":Manual section: " + self.vcc.mansection + "\n")
else:
+ if self.rstlbl:
+ fo.write("\n.. _" + self.rstlbl + ":\n")
write_rst_hdr(fo,
self.vcc.sympfx + self.vcc.modname +
' - ' + self.vcc.moddesc,
@@ -648,18 +663,21 @@ class EventStanza(Stanza):
def cstuff(self, fo, where):
if where == 'h':
- fo.write("vmod_event_f %s;\n" % self.event_func)
+ fo.write("vmod_event_f %s%s;\n" %
+ (self.vcc.sympfx, self.event_func))
def cstruct(self, fo, define):
if define:
- fo.write("\tvmod_event_f\t\t\t*_event;\n")
+ fmt_cstruct(fo, "vmod_event_f", "*_event;")
else:
- fo.write("\t%s,\n" % self.event_func)
+ fmt_cstruct(fo,
+ "._event =",
+ '*' + self.vcc.sympfx + self.event_func + ',')
def json(self, jl):
jl.append([
"$EVENT",
- "Vmod_%s_Func._event" % self.vcc.modname
+ "%s._event" % self.vcc.csn
])
@@ -669,17 +687,14 @@ class FunctionStanza(Stanza):
def parse(self):
self.proto = ProtoType(self)
- self.rstlbl = "func_" + self.proto.name
+ self.rstlbl = "vmod_%s.%s" % (self.vcc.modname, self.proto.name)
self.vcc.contents.append(self)
def cstuff(self, fo, where):
fo.write(self.proto.cproto(['VRT_CTX'], where))
def cstruct(self, fo, define):
- if define:
- fmt_cstruct(fo, self.vcc.modname, self.proto.cname())
- else:
- fo.write("\t" + self.proto.cname(pfx=True) + ",\n")
+ self.fmt_cstruct_proto(fo, self.proto, define)
def json(self, jl):
jl.append(["$FUNC", "%s" % self.proto.name])
@@ -702,11 +717,13 @@ class ObjectStanza(Stanza):
self.fini.argstruct = False
self.fini.args = []
- self.rstlbl = "obj_" + self.proto.name
+ self.rstlbl = "vmod_%s.%s" % (self.vcc.modname, self.proto.name)
self.vcc.contents.append(self)
self.methods = []
def rsthead(self, fo, man):
+ if self.rstlbl:
+ fo.write("\n.. _" + self.rstlbl + ":\n")
self.proto.rsthead(fo)
fo.write("\n" + "\n".join(self.doc) + "\n")
for i in self.methods:
@@ -728,7 +745,7 @@ class ObjectStanza(Stanza):
fo.write(' :ref:`%s`\n \n' % i.rstlbl)
def cstuff(self, fo, w):
- sn = self.vcc.sympfx + self.vcc.modname + "_" + self.proto.name
+ sn = "VPFX(" + self.vcc.modname + "_" + self.proto.name + ")"
fo.write("struct %s;\n" % sn)
fo.write(self.init.cproto(
@@ -739,13 +756,8 @@ class ObjectStanza(Stanza):
fo.write("\n")
def cstruct(self, fo, define):
- if define:
- fmt_cstruct(fo, self.vcc.modname, self.init.name)
- fmt_cstruct(fo, self.vcc.modname, self.fini.name)
- else:
- p = "\t" + self.vcc.sympfx
- fo.write(p + self.init.name + ",\n")
- fo.write(p + self.fini.name + ",\n")
+ self.fmt_cstruct_proto(fo, self.init, define)
+ self.fmt_cstruct_proto(fo, self.fini, define)
for i in self.methods:
i.cstruct(fo, define)
fo.write("\n")
@@ -787,14 +799,11 @@ class MethodStanza(Stanza):
err("$Method %s: Method names need to start with . (dot)"
% self.proto.bname, warn=False)
self.proto.obj = "x" + self.pfx
- self.rstlbl = "func_" + self.proto.name
+ self.rstlbl = "vmod_%s.%s" % ( self.vcc.modname, self.proto.name )
p.methods.append(self)
def cstruct(self, fo, define):
- if define:
- fmt_cstruct(fo, self.vcc.modname, self.proto.cname())
- else:
- fo.write('\t' + self.proto.cname(pfx=True) + ",\n")
+ self.fmt_cstruct_proto(fo, self.proto, define)
def json(self, jl):
jl.append(["$METHOD", self.proto.name[len(self.pfx)+1:]])
@@ -823,7 +832,7 @@ class vcc(object):
self.inputfile = inputvcc
self.rstdir = rstdir
self.pfx = outputprefix
- self.sympfx = "vmod_"
+ self.sympfx = None
self.contents = []
self.commit_files = []
self.copyright = ""
@@ -831,6 +840,7 @@ class vcc(object):
self.strict_abi = True
self.auto_synopsis = True
self.modname = None
+ self.csn = None
def openfile(self, fn):
self.commit_files.append(fn)
@@ -857,6 +867,7 @@ class vcc(object):
err("Unknown stanza $%s" % toks[0], warn=False)
stanzaclass(self, toks, docstr)
inputline = None
+ self.csn = "Vmod_%sFunc" % self.sympfx
def tokenize(self, txt, seps=None, quotes=None):
if seps is None:
@@ -943,8 +954,12 @@ class vcc(object):
fo.write("#endif\n")
fo.write("\n")
+ fo.write('#define VPFX(a) %s##a\n' % self.sympfx)
+ fo.write('#define VENUM(a) enum_%s##a\n' % self.sympfx)
+ fo.write('\n')
+
for j in sorted(self.enums):
- fo.write("extern VCL_ENUM %senum_%s;\n" % (self.sympfx, j))
+ fo.write("extern VCL_ENUM VENUM(%s);\n" % j)
fo.write("\n")
for j in self.contents:
@@ -956,16 +971,15 @@ class vcc(object):
for j in self.contents:
j.cstruct(fo, True)
for j in sorted(self.enums):
- fo.write("\tVCL_ENUM\t\t\t*enum_%s;\n" % j)
+ fmt_cstruct(fo, 'VCL_ENUM', '*enum_%s;' % j)
fo.write("};\n")
def cstruct_init(self, fo, csn):
- fo.write("\nstatic const %s Vmod_Func = {\n" % csn)
+ fo.write("\nstatic const struct %s %s = {\n" % (self.csn, self.csn))
for j in self.contents:
j.cstruct(fo, False)
- fo.write("\n")
for j in sorted(self.enums):
- fo.write("\t&%senum_%s,\n" % (self.sympfx, j))
+ fmt_cstruct(fo, '.enum_%s =' % j, '&VENUM(%s),' % j)
fo.write("};\n")
def json(self, fo):
@@ -999,8 +1013,9 @@ class vcc(object):
fo.write("\t.vrt_major =\tVRT_MAJOR_VERSION,\n")
fo.write("\t.vrt_minor =\tVRT_MINOR_VERSION,\n")
fo.write('\t.name =\t\t"%s",\n' % self.modname)
- fo.write('\t.func =\t\t&Vmod_Func,\n')
- fo.write('\t.func_len =\tsizeof(Vmod_Func),\n')
+ fo.write('\t.func_name =\t\"%s\",\n' % self.csn)
+ fo.write('\t.func =\t\t&%s,\n' % self.csn)
+ fo.write('\t.func_len =\tsizeof(%s),\n' % self.csn)
fo.write('\t.proto =\tVmod_Proto,\n')
fo.write('\t.json =\t\tVmod_Json,\n')
fo.write('\t.abi =\t\tVMOD_ABI_Version,\n')
@@ -1016,14 +1031,22 @@ class vcc(object):
write_c_file_warning(fo)
+ fx.write('#define VPFX(a) %s##a\n' % self.sympfx)
+ fx.write('#define VENUM(a) enum_%s##a\n' % self.sympfx)
+ fx.write('\n')
+
fo.write('#include "config.h"\n')
fo.write('#include <stdio.h>\n')
for i in ["vdef", "vrt", self.pfx, "vmod_abi"]:
fo.write('#include "%s.h"\n' % i)
fo.write("\n")
+ for i in self.contents:
+ if isinstance(i, ModuleStanza):
+ i.cstuff(fx, 'o')
+
for j in sorted(self.enums):
- fo.write('VCL_ENUM %senum_%s = "%s";\n' % (self.sympfx, j, j))
+ fo.write('VCL_ENUM VENUM(%s) = "%s";\n' % (j, j))
fo.write("\n")
for i in self.contents:
@@ -1037,21 +1060,24 @@ class vcc(object):
i.cstuff(fo, 'c')
i.cstuff(fx, 'o')
- csn = "Vmod_%s_Func" % self.modname
- scsn = "struct " + csn
+ scsn = "struct " + self.csn
self.cstruct(fo, scsn)
self.cstruct(fx, scsn)
- fo.write("\n/*lint -esym(754, " + csn + "::*) */\n")
+ fo.write("\n/*lint -esym(754, " + self.csn + "::*) */\n")
self.cstruct_init(fo, scsn)
+ fx.write('#undef VPFX\n')
+ fx.write('#undef VENUM\n')
+
fx.close()
fo.write("\nstatic const char Vmod_Proto[] =\n")
for i in open(fnx):
fo.write('\t"%s\\n"\n' % i.rstrip())
- fo.write('\t"static struct %s %s;";\n' % (csn, csn))
+ fo.write('\t"static struct %s %s;"\n' % (self.csn, self.csn))
+ fo.write('\t;\n')
os.remove(fnx)
diff --git a/lib/libvmod_blob/vmod_blob.c b/lib/libvmod_blob/vmod_blob.c
index 28e486856..1b5038bdc 100644
--- a/lib/libvmod_blob/vmod_blob.c
+++ b/lib/libvmod_blob/vmod_blob.c
@@ -34,7 +34,7 @@
#include "vcc_if.h"
#include "vmod_blob.h"
-struct vmod_blob_blob {
+struct VPFX(blob_blob) {
unsigned magic;
#define VMOD_BLOB_MAGIC 0xfade4fa9
struct vmod_priv blob;
@@ -117,7 +117,7 @@ static const struct vmod_priv null_blob[1] =
static enum encoding
parse_encoding(VCL_ENUM e)
{
-#define VMODENUM(n) if (e == vmod_enum_ ## n) return(n);
+#define VMODENUM(n) if (e == VENUM(n)) return(n);
#include "tbl_encodings.h"
WRONG("illegal encoding enum");
}
@@ -125,7 +125,7 @@ parse_encoding(VCL_ENUM e)
static enum case_e
parse_case(VCL_ENUM e)
{
-#define VMODENUM(n) if (e == vmod_enum_ ## n) return(n);
+#define VMODENUM(n) if (e == VENUM(n)) return(n);
#include "tbl_case.h"
WRONG("illegal case enum");
}
@@ -182,10 +182,10 @@ check_enc_case(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, enum encoding enc,
/* Objects */
VCL_VOID v_matchproto_(td_blob_blob__init)
-vmod_blob__init(VRT_CTX, struct vmod_blob_blob **blobp, const char *vcl_name,
+VPFX(blob__init)(VRT_CTX, struct VPFX(blob_blob) **blobp, const char *vcl_name,
VCL_ENUM decs, VCL_STRANDS strings)
{
- struct vmod_blob_blob *b;
+ struct VPFX(blob_blob) *b;
enum encoding dec = parse_encoding(decs);
ssize_t len;
@@ -234,7 +234,7 @@ vmod_blob__init(VRT_CTX, struct vmod_blob_blob **blobp, const char *vcl_name,
}
VCL_BLOB v_matchproto_(td_blob_blob_get)
-vmod_blob_get(VRT_CTX, struct vmod_blob_blob *b)
+VPFX(blob_get)(VRT_CTX, struct VPFX(blob_blob) *b)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(b, VMOD_BLOB_MAGIC);
@@ -242,7 +242,7 @@ vmod_blob_get(VRT_CTX, struct vmod_blob_blob *b)
}
VCL_STRING v_matchproto_(td_blob_blob_encode)
-vmod_blob_encode(VRT_CTX, struct vmod_blob_blob *b, VCL_ENUM encs,
+VPFX(blob_encode)(VRT_CTX, struct VPFX(blob_blob) *b, VCL_ENUM encs,
VCL_ENUM case_s)
{
enum encoding enc = parse_encoding(encs);
@@ -294,9 +294,9 @@ vmod_blob_encode(VRT_CTX, struct vmod_blob_blob *b, VCL_ENUM encs,
}
VCL_VOID v_matchproto_(td_blob_blob__fini)
-vmod_blob__fini(struct vmod_blob_blob **blobp)
+VPFX(blob__fini)(struct VPFX(blob_blob) **blobp)
{
- struct vmod_blob_blob *b;
+ struct VPFX(blob_blob) *b;
if (blobp == NULL || *blobp == NULL)
return;
@@ -323,7 +323,7 @@ vmod_blob__fini(struct vmod_blob_blob **blobp)
/* Functions */
VCL_BLOB v_matchproto_(td_blob_decode)
-vmod_decode(VRT_CTX, VCL_ENUM decs, VCL_INT length, VCL_STRANDS strings)
+VPFX(decode)(VRT_CTX, VCL_ENUM decs, VCL_INT length, VCL_STRANDS strings)
{
enum encoding dec = parse_encoding(decs);
struct vmod_priv *b;
@@ -406,7 +406,7 @@ encode(VRT_CTX, enum encoding enc, enum case_e kase, VCL_BLOB b)
}
VCL_STRING v_matchproto_(td_blob_encode)
-vmod_encode(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, VCL_BLOB b)
+VPFX(encode)(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, VCL_BLOB b)
{
enum encoding enc = parse_encoding(encs);
enum case_e kase = parse_case(case_s);
@@ -418,7 +418,7 @@ vmod_encode(VRT_CTX, VCL_ENUM encs, VCL_ENUM case_s, VCL_BLOB b)
}
VCL_STRING v_matchproto_(td_blob_transcode)
-vmod_transcode(VRT_CTX, VCL_ENUM decs, VCL_ENUM encs, VCL_ENUM case_s,
+VPFX(transcode)(VRT_CTX, VCL_ENUM decs, VCL_ENUM encs, VCL_ENUM case_s,
VCL_INT length, VCL_STRANDS strings)
{
enum encoding dec = parse_encoding(decs);
@@ -479,7 +479,7 @@ vmod_transcode(VRT_CTX, VCL_ENUM decs, VCL_ENUM encs, VCL_ENUM case_s,
}
VCL_BOOL v_matchproto_(td_blob_same)
-vmod_same(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
+VPFX(same)(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
{
(void) ctx;
@@ -491,7 +491,7 @@ vmod_same(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
}
VCL_BOOL v_matchproto_(td_blob_equal)
-vmod_equal(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
+VPFX(equal)(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
{
(void) ctx;
@@ -509,7 +509,7 @@ vmod_equal(VRT_CTX, VCL_BLOB b1, VCL_BLOB b2)
}
VCL_INT v_matchproto_(td_blob_length)
-vmod_length(VRT_CTX, VCL_BLOB b)
+VPFX(length)(VRT_CTX, VCL_BLOB b)
{
(void) ctx;
@@ -519,7 +519,7 @@ vmod_length(VRT_CTX, VCL_BLOB b)
}
VCL_BLOB v_matchproto_(td_blob_sub)
-vmod_sub(VRT_CTX, VCL_BLOB b, VCL_BYTES n, VCL_BYTES off)
+VPFX(sub)(VRT_CTX, VCL_BLOB b, VCL_BYTES n, VCL_BYTES off)
{
uintptr_t snap;
struct vmod_priv *sub;
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 8738ee243..c670570dd 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -94,16 +94,16 @@ xyzzy_author(VRT_CTX, VCL_ENUM person, VCL_ENUM someone)
(void)someone;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
- if (person == xyzzy_enum_phk)
+ if (person == enum_xyzzy_phk)
return ("Poul-Henning");
assert(strcmp(person, "phk"));
- if (person == xyzzy_enum_des)
+ if (person == enum_xyzzy_des)
return ("Dag-Erling");
assert(strcmp(person, "des"));
- if (person == xyzzy_enum_kristian)
+ if (person == enum_xyzzy_kristian)
return ("Kristian");
assert(strcmp(person, "kristian"));
- if (person == xyzzy_enum_mithrandir)
+ if (person == enum_xyzzy_mithrandir)
return ("Tollef");
assert(strcmp(person, "mithrandir"));
WRONG("Illegal VMOD enum");
@@ -371,7 +371,7 @@ event_cold(VRT_CTX, const struct vmod_priv *priv)
}
int v_matchproto_(vmod_event_f)
-event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
+xyzzy_event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
switch (e) {
diff --git a/lib/libvmod_directors/vmod.vcc b/lib/libvmod_directors/vmod.vcc
index a98352983..78aa8f71e 100644
--- a/lib/libvmod_directors/vmod.vcc
+++ b/lib/libvmod_directors/vmod.vcc
@@ -33,6 +33,7 @@
# SUCH DAMAGE.
$ABI strict
+$Prefix vmod
$Module directors 3 "Varnish Directors Module"
DESCRIPTION
@@ -349,13 +350,14 @@ Set the default rampup duration. See `rampup` parameter of
$Method VOID .associate(BLOB param=0)
-Associate a default `obj_shard_param`_ object or clear an association.
+Associate a default `vmod_directors.shard_param`_ object or clear
+an association.
The value of the `param` argument must be a call to the
-`func_shard_param.use`_ method. No argument clears the association.
+`vmod_directors.shard_param.use`_ method. No argument clears the association.
The association can be changed per backend request using the `param`
-argument of `func_shard.backend`_.
+argument of `vmod_directors.shard.backend`_.
$Method BOOL .add_backend(PRIV_TASK, BACKEND backend,
[STRING ident], [DURATION rampup])
@@ -371,7 +373,7 @@ backend name.
`rampup`: Optionally specify a specific rampup time for this
backend. Otherwise, the per-director rampup time is used (see
-:ref:`func_shard.set_rampup`).
+:ref:`vmod_directors.shard.set_rampup`).
NOTE: Backend changes need to be finalized with `shard.reconfigure()`
and are only supported on one shard director at a time.
@@ -536,14 +538,14 @@ is _not_ the order given when backends are added.
* `param`
Use or associate a parameter set. The value of the `param` argument
- must be a call to the `func_shard_param.use`_ method.
+ must be a call to the `vmod_directors.shard_param.use`_ method.
- default: as set by `func_shard.associate`_ or unset.
+ default: as set by `vmod_directors.shard.associate`_ or unset.
* for ``resolve=NOW`` take parameter defaults from the
- `obj_shard_param`_ parameter set
+ `vmod_directors.shard_param`_ parameter set
- * for ``resolve=LAZY`` associate the `obj_shard_param`_ parameter
+ * for ``resolve=LAZY`` associate the `vmod_directors.shard_param`_ parameter
set for this backend request
Implementation notes for use of parameter sets with
@@ -557,7 +559,7 @@ is _not_ the order given when backends are added.
and are kept even if the parameter set given by the `param`
argument is subsequently changed within the same backend request.
- * Each call to `func_shard.backend`_ overrides any previous call.
+ * Each call to `vmod_directors.shard.backend`_ overrides any previous call.
$Method VOID .debug(INT)
@@ -567,7 +569,7 @@ $Object shard_param()
Create a shard parameter set.
-A parameter set allows for re-use of `func_shard.backend`_ arguments
+A parameter set allows for re-use of `vmod_directors.shard.backend`_ arguments
across many shard director instances and simplifies advanced use cases
(e.g. shard director with custom parameters layered below other
directors).
@@ -586,7 +588,7 @@ Parameter sets can not be used in client context.
$Method VOID .clear()
Reset the parameter set to default values as documented for
-`func_shard.backend`_.
+`vmod_directors.shard.backend`_.
* in ``vcl_init{}``, resets the parameter set default for this VCL
* in backend context, resets the parameter set for this backend
@@ -604,7 +606,7 @@ $Method VOID .set(
[ ENUM {CHOSEN, IGNORE, ALL} healthy ])
Change the given parameters of a parameter set as documented for
-`func_shard.backend`_.
+`vmod_directors.shard.backend`_.
* in ``vcl_init{}``, changes the parameter set default for this VCL
@@ -618,39 +620,39 @@ $Method STRING .get_by()
Get a string representation of the `by` enum argument which denotes
how a shard director using this parameter object would derive the
-shard key. See `func_shard.backend`_.
+shard key. See `vmod_directors.shard.backend`_.
$Method INT .get_key()
Get the key which a shard director using this parameter object would
-use. See `func_shard.backend`_.
+use. See `vmod_directors.shard.backend`_.
$Method INT .get_alt()
Get the `alt` parameter which a shard director using this parameter
-object would use. See `func_shard.backend`_.
+object would use. See `vmod_directors.shard.backend`_.
$Method REAL .get_warmup()
Get the `warmup` parameter which a shard director using this parameter
-object would use. See `func_shard.backend`_.
+object would use. See `vmod_directors.shard.backend`_.
$Method BOOL .get_rampup()
Get the `rampup` parameter which a shard director using this parameter
-object would use. See `func_shard.backend`_.
+object would use. See `vmod_directors.shard.backend`_.
$Method STRING .get_healthy()
Get a string representation of the `healthy` enum argument which a
shard director using this parameter object would use. See
-`func_shard.backend`_.
+`vmod_directors.shard.backend`_.
$Method BLOB .use()
This method may only be used in backend context.
-For use with the `param` argument of `func_shard.backend`_ to associate
+For use with the `param` argument of `vmod_directors.shard.backend`_ to associate
this shard parameter set with a shard director.
ACKNOWLEDGEMENTS
diff --git a/lib/libvmod_directors/vmod_shard.c b/lib/libvmod_directors/vmod_shard.c
index 3f4924bc3..e18ab23d9 100644
--- a/lib/libvmod_directors/vmod_shard.c
+++ b/lib/libvmod_directors/vmod_shard.c
@@ -180,7 +180,7 @@ struct vmod_directors_shard {
static enum by_e
parse_by_e(VCL_ENUM e)
{
-#define VMODENUM(n) if (e == vmod_enum_ ## n) return(BY_ ## n);
+#define VMODENUM(n) if (e == enum_vmod_ ## n) return(BY_ ## n);
#include "tbl_by.h"
WRONG("illegal by enum");
}
@@ -188,7 +188,7 @@ parse_by_e(VCL_ENUM e)
static enum healthy_e
parse_healthy_e(VCL_ENUM e)
{
-#define VMODENUM(n) if (e == vmod_enum_ ## n) return(n);
+#define VMODENUM(n) if (e == enum_vmod_ ## n) return(n);
#include "tbl_healthy.h"
WRONG("illegal healthy enum");
}
@@ -196,7 +196,7 @@ parse_healthy_e(VCL_ENUM e)
static enum resolve_e
parse_resolve_e(VCL_ENUM e)
{
-#define VMODENUM(n) if (e == vmod_enum_ ## n) return(n);
+#define VMODENUM(n) if (e == enum_vmod_ ## n) return(n);
#include "tbl_resolve.h"
WRONG("illegal resolve enum");
}
diff --git a/lib/libvmod_proxy/vmod.vcc b/lib/libvmod_proxy/vmod.vcc
index 2d0663582..3a176e03b 100644
--- a/lib/libvmod_proxy/vmod.vcc
+++ b/lib/libvmod_proxy/vmod.vcc
@@ -26,6 +26,7 @@
# SUCH DAMAGE.
$ABI strict
+$Prefix vmod
$Module proxy 3 "Varnish Module to extract TLV attributes from PROXYv2"
DESCRIPTION
diff --git a/lib/libvmod_purge/vmod_purge.c b/lib/libvmod_purge/vmod_purge.c
index 1a01bae50..38f7406e7 100644
--- a/lib/libvmod_purge/vmod_purge.c
+++ b/lib/libvmod_purge/vmod_purge.c
@@ -39,7 +39,7 @@
#include "vcc_if.h"
VCL_INT v_matchproto_(td_purge_hard)
-vmod_hard(VRT_CTX)
+VPFX(hard)(VRT_CTX)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -47,7 +47,7 @@ vmod_hard(VRT_CTX)
}
VCL_INT v_matchproto_(td_purge_soft)
-vmod_soft(VRT_CTX, VCL_DURATION ttl, VCL_DURATION grace, VCL_DURATION keep)
+VPFX(soft)(VRT_CTX, VCL_DURATION ttl, VCL_DURATION grace, VCL_DURATION keep)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
diff --git a/lib/libvmod_std/vmod.vcc b/lib/libvmod_std/vmod.vcc
index 0ae941c12..53feb1aa4 100644
--- a/lib/libvmod_std/vmod.vcc
+++ b/lib/libvmod_std/vmod.vcc
@@ -205,7 +205,7 @@ $Function TIME real2time(REAL r, TIME fallback)
Description
Rounds the real *r* to the nearest integer (see
- `func_real2integer`_) and returns the corresponding time when
+ `vmod_std.real2integer`_) and returns the corresponding time when
interpreted as a unix epoch. If conversion fails, *fallback*
will be returned.
Example
diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index d35d89f6c..ba57c37b4 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -50,7 +50,7 @@
#include "vcc_if.h"
VCL_VOID v_matchproto_(td_std_set_ip_tos)
-vmod_set_ip_tos(VRT_CTX, VCL_INT tos)
+VPFX(set_ip_tos)(VRT_CTX, VCL_INT tos)
{
struct suckaddr *sa;
int itos = tos;
@@ -65,7 +65,7 @@ vmod_set_ip_tos(VRT_CTX, VCL_INT tos)
}
static const char *
-vmod_updown(VRT_CTX, int up, const char *s, va_list ap)
+updown(VRT_CTX, int up, const char *s, va_list ap)
{
unsigned u;
char *b, *e;
@@ -102,33 +102,33 @@ vmod_updown(VRT_CTX, int up, const char *s, va_list ap)
}
VCL_STRING v_matchproto_(td_std_toupper)
-vmod_toupper(VRT_CTX, const char *s, ...)
+VPFX(toupper)(VRT_CTX, const char *s, ...)
{
const char *p;
va_list ap;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
va_start(ap, s);
- p = vmod_updown(ctx, 1, s, ap);
+ p = updown(ctx, 1, s, ap);
va_end(ap);
return (p);
}
VCL_STRING v_matchproto_(td_std_tolower)
-vmod_tolower(VRT_CTX, const char *s, ...)
+VPFX(tolower)(VRT_CTX, const char *s, ...)
{
const char *p;
va_list ap;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
va_start(ap, s);
- p = vmod_updown(ctx, 0, s, ap);
+ p = updown(ctx, 0, s, ap);
va_end(ap);
return (p);
}
VCL_REAL v_matchproto_(td_std_random)
-vmod_random(VRT_CTX, VCL_REAL lo, VCL_REAL hi)
+VPFX(random)(VRT_CTX, VCL_REAL lo, VCL_REAL hi)
{
double a;
@@ -140,7 +140,7 @@ vmod_random(VRT_CTX, VCL_REAL lo, VCL_REAL hi)
}
VCL_VOID v_matchproto_(td_std_log)
-vmod_log(VRT_CTX, const char *fmt, ...)
+VPFX(log)(VRT_CTX, const char *fmt, ...)
{
const char *p;
va_list ap;
@@ -168,7 +168,7 @@ vmod_log(VRT_CTX, const char *fmt, ...)
/* XXX use vsyslog() ? */
VCL_VOID v_matchproto_(td_std_syslog)
-vmod_syslog(VRT_CTX, VCL_INT fac, const char *fmt, ...)
+VPFX(syslog)(VRT_CTX, VCL_INT fac, const char *fmt, ...)
{
const char *p;
va_list ap;
@@ -185,7 +185,7 @@ vmod_syslog(VRT_CTX, VCL_INT fac, const char *fmt, ...)
}
VCL_BOOL v_matchproto_(td_std_file_exists)
-vmod_file_exists(VRT_CTX, VCL_STRING file_name)
+VPFX(file_exists)(VRT_CTX, VCL_STRING file_name)
{
struct stat st;
@@ -194,7 +194,7 @@ vmod_file_exists(VRT_CTX, VCL_STRING file_name)
}
VCL_VOID v_matchproto_(td_std_collect)
-vmod_collect(VRT_CTX, VCL_HEADER hdr, VCL_STRING sep)
+VPFX(collect)(VRT_CTX, VCL_HEADER hdr, VCL_STRING sep)
{
struct http *hp;
@@ -204,7 +204,7 @@ vmod_collect(VRT_CTX, VCL_HEADER hdr, VCL_STRING sep)
}
VCL_BOOL v_matchproto_(td_std_healthy)
-vmod_healthy(VRT_CTX, VCL_BACKEND be)
+VPFX(healthy)(VRT_CTX, VCL_BACKEND be)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_ORNULL(be, DIRECTOR_MAGIC);
@@ -212,7 +212,7 @@ vmod_healthy(VRT_CTX, VCL_BACKEND be)
}
VCL_INT v_matchproto_(td_std_port)
-vmod_port(VRT_CTX, VCL_IP ip)
+VPFX(port)(VRT_CTX, VCL_IP ip)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ip == NULL)
@@ -221,13 +221,13 @@ vmod_port(VRT_CTX, VCL_IP ip)
}
VCL_VOID v_matchproto_(td_std_rollback)
-vmod_rollback(VRT_CTX, VCL_HTTP hp)
+VPFX(rollback)(VRT_CTX, VCL_HTTP hp)
{
VRT_Rollback(ctx, hp);
}
VCL_VOID v_matchproto_(td_std_timestamp)
-vmod_timestamp(VRT_CTX, VCL_STRING label)
+VPFX(timestamp)(VRT_CTX, VCL_STRING label)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -247,7 +247,7 @@ vmod_timestamp(VRT_CTX, VCL_STRING label)
}
VCL_BOOL v_matchproto_(td_std_cache_req_body)
-vmod_cache_req_body(VRT_CTX, VCL_BYTES size)
+VPFX(cache_req_body)(VRT_CTX, VCL_BYTES size)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (size < 0)
@@ -258,7 +258,7 @@ vmod_cache_req_body(VRT_CTX, VCL_BYTES size)
}
VCL_STRING v_matchproto_(td_std_strstr)
-vmod_strstr(VRT_CTX, VCL_STRING s1, VCL_STRING s2)
+VPFX(strstr)(VRT_CTX, VCL_STRING s1, VCL_STRING s2)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (s1 == NULL || s2 == NULL)
@@ -267,7 +267,7 @@ vmod_strstr(VRT_CTX, VCL_STRING s1, VCL_STRING s2)
}
VCL_STRING v_matchproto_(td_std_getenv)
-vmod_getenv(VRT_CTX, VCL_STRING name)
+VPFX(getenv)(VRT_CTX, VCL_STRING name)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (name == NULL || *name == '\0')
@@ -276,7 +276,7 @@ vmod_getenv(VRT_CTX, VCL_STRING name)
}
VCL_VOID v_matchproto_(td_std_late_100_continue)
-vmod_late_100_continue(VRT_CTX, VCL_BOOL late)
+VPFX(late_100_continue)(VRT_CTX, VCL_BOOL late)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->method != VCL_MET_RECV) {
@@ -291,7 +291,7 @@ vmod_late_100_continue(VRT_CTX, VCL_BOOL late)
}
VCL_BOOL v_matchproto_(td_std_syntax)
-vmod_syntax(VRT_CTX, VCL_REAL r)
+VPFX(syntax)(VRT_CTX, VCL_REAL r)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -305,7 +305,7 @@ vmod_syntax(VRT_CTX, VCL_REAL r)
}
VCL_BOOL v_matchproto_(td_std_fnmatch)
-vmod_fnmatch(VRT_CTX, VCL_STRING pattern, VCL_STRING subject,
+VPFX(fnmatch)(VRT_CTX, VCL_STRING pattern, VCL_STRING subject,
VCL_BOOL pathname, VCL_BOOL noescape, VCL_BOOL period)
{
int flags = 0;
diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c
index ba10fa513..9f6407d02 100644
--- a/lib/libvmod_std/vmod_std_conversions.c
+++ b/lib/libvmod_std/vmod_std_conversions.c
@@ -45,7 +45,7 @@
#include "vcc_if.h"
VCL_DURATION v_matchproto_(td_std_duration)
-vmod_duration(VRT_CTX, VCL_STRING p, VCL_DURATION d)
+VPFX(duration)(VRT_CTX, VCL_STRING p, VCL_DURATION d)
{
double r = VNUM_duration(p);
@@ -55,7 +55,7 @@ vmod_duration(VRT_CTX, VCL_STRING p, VCL_DURATION d)
}
VCL_INT v_matchproto_(td_std_integer)
-vmod_integer(VRT_CTX, VCL_STRING p, VCL_INT i)
+VPFX(integer)(VRT_CTX, VCL_STRING p, VCL_INT i)
{
const char *e;
double r;
@@ -77,7 +77,7 @@ vmod_integer(VRT_CTX, VCL_STRING p, VCL_INT i)
}
VCL_IP
-vmod_ip(VRT_CTX, VCL_STRING s, VCL_IP d, VCL_BOOL n)
+VPFX(ip)(VRT_CTX, VCL_STRING s, VCL_IP d, VCL_BOOL n)
{
struct addrinfo hints, *res0 = NULL;
const struct addrinfo *res;
@@ -122,7 +122,7 @@ vmod_ip(VRT_CTX, VCL_STRING s, VCL_IP d, VCL_BOOL n)
}
VCL_REAL v_matchproto_(td_std_real)
-vmod_real(VRT_CTX, VCL_STRING p, VCL_REAL d)
+VPFX(real)(VRT_CTX, VCL_STRING p, VCL_REAL d)
{
double r;
@@ -140,7 +140,7 @@ vmod_real(VRT_CTX, VCL_STRING p, VCL_REAL d)
}
VCL_INT v_matchproto_(td_std_real2integer)
-vmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)
+VPFX(real2integer)(VRT_CTX, VCL_REAL r, VCL_INT i)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -153,7 +153,7 @@ vmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)
}
VCL_TIME v_matchproto_(td_std_real2time)
-vmod_real2time(VRT_CTX, VCL_REAL r, VCL_TIME t)
+VPFX(real2time)(VRT_CTX, VCL_REAL r, VCL_TIME t)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -164,7 +164,7 @@ vmod_real2time(VRT_CTX, VCL_REAL r, VCL_TIME t)
}
VCL_INT v_matchproto_(td_std_time2integer)
-vmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)
+VPFX(time2integer)(VRT_CTX, VCL_TIME t, VCL_INT i)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -177,7 +177,7 @@ vmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)
}
VCL_REAL v_matchproto_(td_std_time2real)
-vmod_time2real(VRT_CTX, VCL_TIME t, VCL_REAL r)
+VPFX(time2real)(VRT_CTX, VCL_TIME t, VCL_REAL r)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
@@ -188,7 +188,7 @@ vmod_time2real(VRT_CTX, VCL_TIME t, VCL_REAL r)
}
VCL_TIME v_matchproto_(td_std_time)
-vmod_time(VRT_CTX, VCL_STRING p, VCL_TIME d)
+VPFX(time)(VRT_CTX, VCL_STRING p, VCL_TIME d)
{
double r;
@@ -197,5 +197,5 @@ vmod_time(VRT_CTX, VCL_STRING p, VCL_TIME d)
r = VTIM_parse(p);
if (r)
return (r);
- return (vmod_real(ctx, p, d));
+ return (VPFX(real)(ctx, p, d));
}
diff --git a/lib/libvmod_std/vmod_std_fileread.c b/lib/libvmod_std/vmod_std_fileread.c
index 1bb003e48..f6ffa9cc7 100644
--- a/lib/libvmod_std/vmod_std_fileread.c
+++ b/lib/libvmod_std/vmod_std_fileread.c
@@ -81,7 +81,7 @@ free_frfile(void *ptr)
}
VCL_STRING v_matchproto_(td_std_fileread)
-vmod_fileread(VRT_CTX, struct vmod_priv *priv,
+VPFX(fileread)(VRT_CTX, struct vmod_priv *priv,
VCL_STRING file_name)
{
struct frfile *frf = NULL;
diff --git a/lib/libvmod_std/vmod_std_querysort.c b/lib/libvmod_std/vmod_std_querysort.c
index 4b99092f8..b2c148a2d 100644
--- a/lib/libvmod_std/vmod_std_querysort.c
+++ b/lib/libvmod_std/vmod_std_querysort.c
@@ -49,7 +49,7 @@ compa(const void *a, const void *b)
}
VCL_STRING v_matchproto_(td_std_querysort)
-vmod_querysort(VRT_CTX, VCL_STRING url)
+VPFX(querysort)(VRT_CTX, VCL_STRING url)
{
const char *cq, *cu;
char *p, *r;
diff --git a/lib/libvmod_unix/vmod.vcc b/lib/libvmod_unix/vmod.vcc
index 38e48a7d3..1d41dccfd 100644
--- a/lib/libvmod_unix/vmod.vcc
+++ b/lib/libvmod_unix/vmod.vcc
@@ -6,6 +6,7 @@
#
$ABI strict
+$Prefix vmod
$Module unix 3 "Utilities for Unix domain sockets"
DESCRIPTION
diff --git a/lib/libvmod_vtc/vmod.vcc b/lib/libvmod_vtc/vmod.vcc
index e1644fffc..9070621af 100644
--- a/lib/libvmod_vtc/vmod.vcc
+++ b/lib/libvmod_vtc/vmod.vcc
@@ -26,6 +26,7 @@
# SUCH DAMAGE.
$ABI strict
+$Prefix vmod
$Module vtc 3 "Utility module for varnishtest"
DESCRIPTION
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev