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
1474cf37
Commit
1474cf37
authored
Nov 12, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark stuff we export in shlibs with "extern".
parent
6114af83
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
vcc_compile.c
lib/libvcc/vcc_compile.c
+2
-0
vcc_expr.c
lib/libvcc/vcc_expr.c
+1
-1
vmodtool.py
lib/libvcc/vmodtool.py
+14
-4
No files found.
lib/libvcc/vcc_compile.c
View file @
1474cf37
...
...
@@ -355,6 +355,7 @@ EmitStruct(const struct vcc *tl)
{
struct
source
*
sp
;
Fc
(
tl
,
0
,
"
\n
extern const char *srcname[];
\n
"
);
Fc
(
tl
,
0
,
"
\n
const char *srcname[%u] = {
\n
"
,
tl
->
nsources
);
VTAILQ_FOREACH
(
sp
,
&
tl
->
sources
,
list
)
{
Fc
(
tl
,
0
,
"
\t
"
);
...
...
@@ -363,6 +364,7 @@ EmitStruct(const struct vcc *tl)
}
Fc
(
tl
,
0
,
"};
\n
"
);
Fc
(
tl
,
0
,
"
\n
extern const char *srcbody[];
\n
"
);
Fc
(
tl
,
0
,
"
\n
const char *srcbody[%u] = {
\n
"
,
tl
->
nsources
);
VTAILQ_FOREACH
(
sp
,
&
tl
->
sources
,
list
)
{
Fc
(
tl
,
0
,
" /* "
);
...
...
lib/libvcc/vcc_expr.c
View file @
1474cf37
...
...
@@ -547,7 +547,7 @@ vcc_func(struct vcc *tl, struct expr **e, const char *cfunc,
p
+=
strlen
(
p
)
+
1
;
}
else
if
(
fmt
==
VOID
&&
!
strcmp
(
p
,
"PRIV_CALL"
))
{
bprintf
(
buf
,
"vmod_priv_%u"
,
tl
->
nvmodpriv
++
);
Fh
(
tl
,
0
,
"struct vmod_priv %s;
\n
"
,
buf
);
Fh
(
tl
,
0
,
"st
atic st
ruct vmod_priv %s;
\n
"
,
buf
);
e2
=
vcc_mk_expr
(
VOID
,
"&%s"
,
buf
);
p
+=
strlen
(
p
)
+
1
;
}
else
if
(
fmt
==
ENUM
)
{
...
...
lib/libvcc/vmodtool.py
View file @
1474cf37
...
...
@@ -145,31 +145,40 @@ class vmod(object):
fo
.
write
(
i
+
"
\n
"
)
def
c_vmod
(
self
,
fo
):
fo
.
write
(
'extern const char Vmod_'
+
self
.
nam
+
'_Name[];
\n
'
)
fo
.
write
(
'const char Vmod_'
+
self
.
nam
+
'_Name[] ='
)
fo
.
write
(
'
\"
'
+
self
.
nam
+
'";
\n
'
)
fo
.
write
(
"
\n
"
)
cs
=
self
.
c_struct
()
fo
.
write
(
"const "
+
cs
+
' Vmod_'
+
self
.
nam
+
'_Func = '
)
fo
.
write
(
cs
+
';
\n
'
)
vfn
=
'Vmod_'
+
self
.
nam
+
'_Func'
;
fo
.
write
(
"extern const struct "
+
vfn
+
" "
+
vfn
+
';
\n
'
)
fo
.
write
(
"const struct "
+
vfn
+
" "
+
vfn
+
' ='
)
fo
.
write
(
self
.
c_initializer
())
fo
.
write
(
"
\n
"
)
fo
.
write
(
"
\n
"
)
fo
.
write
(
"extern const int Vmod_"
+
self
.
nam
+
'_Len;
\n
'
)
fo
.
write
(
"const int Vmod_"
+
self
.
nam
+
'_Len ='
)
fo
.
write
(
" sizeof(Vmod_"
+
self
.
nam
+
"_Func);
\n
"
)
fo
.
write
(
"
\n
"
)
fo
.
write
(
"extern const char Vmod_"
+
self
.
nam
+
"_Proto[];
\n
"
)
fo
.
write
(
"const char Vmod_"
+
self
.
nam
+
"_Proto[] =
\n
"
)
for
t
in
self
.
c_typedefs_
():
fo
.
write
(
'
\t
"'
+
t
+
'
\\
n"
\n
'
)
fo
.
write
(
'
\t
"
\\
n"
\n
'
)
for
i
in
(
cs
+
"
Vmod_"
+
self
.
nam
+
'_Func;'
)
.
split
(
"
\n
"
):
for
i
in
(
cs
+
"
;"
)
.
split
(
"
\n
"
):
fo
.
write
(
'
\n\t
"'
+
i
+
'
\\
n"'
)
fo
.
write
(
";
\n\n
"
)
fo
.
write
(
'
\n\t
"static struct '
+
vfn
+
" "
+
vfn
+
';";
\n\n
'
)
fo
.
write
(
self
.
c_strspec
())
fo
.
write
(
"
\n
"
)
fo
.
write
(
'extern const char Vmod_'
+
self
.
nam
+
'_ABI[];
\n
'
)
fo
.
write
(
'const char Vmod_'
+
self
.
nam
+
'_ABI[] ='
)
fo
.
write
(
' VMOD_ABI_Version;
\n
'
)
#fo.write("\n")
...
...
@@ -208,7 +217,8 @@ class vmod(object):
return
s
def
c_strspec
(
self
):
s
=
"const char * const Vmod_"
+
self
.
nam
+
"_Spec[] = {
\n
"
s
=
"const char * const Vmod_"
+
self
.
nam
+
"_Spec[]"
s
=
"extern "
+
s
+
";
\n
"
+
s
+
" = {
\n
"
for
o
in
self
.
objs
:
s
+=
o
.
c_strspec
(
self
.
nam
)
...
...
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