Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
44ae23e3
Commit
44ae23e3
authored
Jan 08, 2016
by
Poul-Henning Kamp
Committed by
Lasse Karstensen
Jan 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to do
import vmod from "/some/dir/" and have the default vmod shlib filename appended.
parent
d7e898c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
m00008.vtc
bin/varnishtest/tests/m00008.vtc
+8
-0
v00046.vtc
bin/varnishtest/tests/v00046.vtc
+1
-1
vcc_compile.c
lib/libvcc/vcc_compile.c
+8
-8
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+5
-1
No files found.
bin/varnishtest/tests/m00008.vtc
View file @
44ae23e3
...
...
@@ -23,3 +23,11 @@ varnish v1 -cliok "param.set vmod_dir /nowhere:${topbuild}/lib/libvmod_std/.libs
varnish v1 -vcl+backend {
import std;
}
varnish v1 -cliok "param.set vcc_unsafe_path on"
varnish v1 -cliok "param.set vmod_dir /nowhere:/else"
varnish v1 -vcl+backend {
import std from "${topbuild}/lib/libvmod_std/.libs/";
}
bin/varnishtest/tests/v00046.vtc
View file @
44ae23e3
...
...
@@ -67,7 +67,7 @@ varnish v1 -errvcl {Found: 'zool' at} {
shell "rm -f ${tmpdir}/a"
shell "rm -f ${tmpdir}/_start.vcl"
varnish v1 -errvcl {
only works in nested VCL include files
} {
varnish v1 -errvcl {
needs absolute filename of including file.
} {
include "./foobar";
}
lib/libvcc/vcc_compile.c
View file @
44ae23e3
...
...
@@ -511,8 +511,8 @@ vcc_resolve_includes(struct vcc *tl)
*/
if
(
t1
->
src
->
name
[
0
]
!=
'/'
)
{
VSB_printf
(
tl
->
sb
,
"include
\"
./xxxxx
\"
;
only works in
"
"
nested VCL include files
\n
"
);
"include
\"
./xxxxx
\"
;
needs absolute
"
"
filename of including file.
\n
"
);
vcc_ErrWhere
(
tl
,
t1
);
return
;
}
...
...
@@ -784,14 +784,14 @@ VCC_Compile(const struct vcp *vcp, struct vsb *sb,
{
struct
source
*
sp
;
char
*
r
;
CHECK_OBJ_NOTNULL
(
vcp
,
VCP_MAGIC
);
AN
(
sb
);
AN
(
vclsrcfile
);
if
(
vclsrc
!=
NULL
)
{
AZ
(
vclsrcfile
);
sp
=
vcc_new_source
(
vclsrc
,
NULL
,
"<input>"
);
}
else
{
AN
(
vclsrcfile
);
if
(
vclsrc
!=
NULL
)
sp
=
vcc_new_source
(
vclsrc
,
NULL
,
vclsrcfile
);
else
sp
=
vcc_file_source
(
vcp
,
sb
,
vclsrcfile
);
}
if
(
sp
==
NULL
)
return
(
NULL
);
r
=
vcc_CompileSource
(
vcp
,
sb
,
sp
);
...
...
lib/libvcc/vcc_vmod.c
View file @
44ae23e3
...
...
@@ -117,7 +117,11 @@ vcc_ParseImport(struct vcc *tl)
return
;
}
ExpectErr
(
tl
,
CSTR
);
bprintf
(
fn
,
"%s"
,
tl
->
t
->
dec
);
p
=
strrchr
(
tl
->
t
->
dec
,
'/'
);
if
(
p
!=
NULL
&&
p
[
1
]
==
'\0'
)
bprintf
(
fn
,
"%slibvmod_%.*s.so"
,
tl
->
t
->
dec
,
PF
(
mod
));
else
bprintf
(
fn
,
"%s"
,
tl
->
t
->
dec
);
vcc_NextToken
(
tl
);
}
else
{
bprintf
(
fn
,
"libvmod_%.*s.so"
,
PF
(
mod
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment