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
d9a6488d
Commit
d9a6488d
authored
Jan 08, 2016
by
Poul-Henning Kamp
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
6564a0cf
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 @
d9a6488d
...
@@ -23,3 +23,11 @@ varnish v1 -cliok "param.set vmod_dir /nowhere:${topbuild}/lib/libvmod_std/.libs
...
@@ -23,3 +23,11 @@ varnish v1 -cliok "param.set vmod_dir /nowhere:${topbuild}/lib/libvmod_std/.libs
varnish v1 -vcl+backend {
varnish v1 -vcl+backend {
import std;
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 @
d9a6488d
...
@@ -67,7 +67,7 @@ varnish v1 -errvcl {Found: 'zool' at} {
...
@@ -67,7 +67,7 @@ varnish v1 -errvcl {Found: 'zool' at} {
shell "rm -f ${tmpdir}/a"
shell "rm -f ${tmpdir}/a"
shell "rm -f ${tmpdir}/_start.vcl"
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";
include "./foobar";
}
}
lib/libvcc/vcc_compile.c
View file @
d9a6488d
...
@@ -511,8 +511,8 @@ vcc_resolve_includes(struct vcc *tl)
...
@@ -511,8 +511,8 @@ vcc_resolve_includes(struct vcc *tl)
*/
*/
if
(
t1
->
src
->
name
[
0
]
!=
'/'
)
{
if
(
t1
->
src
->
name
[
0
]
!=
'/'
)
{
VSB_printf
(
tl
->
sb
,
VSB_printf
(
tl
->
sb
,
"include
\"
./xxxxx
\"
;
only works in
"
"include
\"
./xxxxx
\"
;
needs absolute
"
"
nested VCL include files
\n
"
);
"
filename of including file.
\n
"
);
vcc_ErrWhere
(
tl
,
t1
);
vcc_ErrWhere
(
tl
,
t1
);
return
;
return
;
}
}
...
@@ -784,14 +784,14 @@ VCC_Compile(const struct vcp *vcp, struct vsb *sb,
...
@@ -784,14 +784,14 @@ VCC_Compile(const struct vcp *vcp, struct vsb *sb,
{
{
struct
source
*
sp
;
struct
source
*
sp
;
char
*
r
;
char
*
r
;
CHECK_OBJ_NOTNULL
(
vcp
,
VCP_MAGIC
);
AN
(
sb
);
AN
(
vclsrcfile
);
if
(
vclsrc
!=
NULL
)
{
if
(
vclsrc
!=
NULL
)
AZ
(
vclsrcfile
);
sp
=
vcc_new_source
(
vclsrc
,
NULL
,
vclsrcfile
);
sp
=
vcc_new_source
(
vclsrc
,
NULL
,
"<input>"
);
else
}
else
{
AN
(
vclsrcfile
);
sp
=
vcc_file_source
(
vcp
,
sb
,
vclsrcfile
);
sp
=
vcc_file_source
(
vcp
,
sb
,
vclsrcfile
);
}
if
(
sp
==
NULL
)
if
(
sp
==
NULL
)
return
(
NULL
);
return
(
NULL
);
r
=
vcc_CompileSource
(
vcp
,
sb
,
sp
);
r
=
vcc_CompileSource
(
vcp
,
sb
,
sp
);
...
...
lib/libvcc/vcc_vmod.c
View file @
d9a6488d
...
@@ -117,7 +117,11 @@ vcc_ParseImport(struct vcc *tl)
...
@@ -117,7 +117,11 @@ vcc_ParseImport(struct vcc *tl)
return
;
return
;
}
}
ExpectErr
(
tl
,
CSTR
);
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
);
vcc_NextToken
(
tl
);
}
else
{
}
else
{
bprintf
(
fn
,
"libvmod_%.*s.so"
,
PF
(
mod
));
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