r1830 - in trunk/varnish-cache: bin/varnishd include lib/libvcl
phk at projects.linpro.no
phk at projects.linpro.no
Fri Aug 10 12:28:08 CEST 2007
Author: phk
Date: 2007-08-10 12:28:08 +0200 (Fri, 10 Aug 2007)
New Revision: 1830
Modified:
trunk/varnish-cache/bin/varnishd/cache_vrt.c
trunk/varnish-cache/include/vrt.h
trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
trunk/varnish-cache/lib/libvcl/vcc_parse.c
Log:
Don't call functions outside the VRT namespace, even if this means
that we have to wrap strcmp().
Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-08-10 09:51:16 UTC (rev 1829)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2007-08-10 10:28:08 UTC (rev 1830)
@@ -502,6 +502,17 @@
}
/*--------------------------------------------------------------------
+ * Simple stuff
+ */
+
+int
+VRT_strcmp(const char *s1, const char *s2)
+{
+ return (strcmp(s1, s2));
+}
+
+
+/*--------------------------------------------------------------------
* Backend stuff, should probably move to its own file eventually
*/
void
Modified: trunk/varnish-cache/include/vrt.h
===================================================================
--- trunk/varnish-cache/include/vrt.h 2007-08-10 09:51:16 UTC (rev 1829)
+++ trunk/varnish-cache/include/vrt.h 2007-08-10 10:28:08 UTC (rev 1830)
@@ -88,6 +88,10 @@
void VRT_SetHdr(struct sess *, enum gethdr_e where, const char *, const char *, ...);
void VRT_handling(struct sess *sp, unsigned hand);
+/* Simple stuff */
+int VRT_strcmp(const char *s1, const char *s2);
+
+
/* Backend related */
void VRT_init_simple_backend(struct backend **, struct vrt_simple_backend *);
void VRT_fini_backend(struct backend *);
Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2007-08-10 09:51:16 UTC (rev 1829)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2007-08-10 10:28:08 UTC (rev 1830)
@@ -446,6 +446,10 @@
vsb_cat(sb, "void VRT_SetHdr(struct sess *, enum gethdr_e where, const char *, const char *, ...);\n");
vsb_cat(sb, "void VRT_handling(struct sess *sp, unsigned hand);\n");
vsb_cat(sb, "\n");
+ vsb_cat(sb, "/* Simple stuff */\n");
+ vsb_cat(sb, "int VRT_strcmp(const char *s1, const char *s2);\n");
+ vsb_cat(sb, "\n");
+ vsb_cat(sb, "\n");
vsb_cat(sb, "/* Backend related */\n");
vsb_cat(sb, "void VRT_init_simple_backend(struct backend **, struct vrt_simple_backend *);\n");
vsb_cat(sb, "void VRT_fini_backend(struct backend *);\n");
Modified: trunk/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_parse.c 2007-08-10 09:51:16 UTC (rev 1829)
+++ trunk/varnish-cache/lib/libvcl/vcc_parse.c 2007-08-10 10:28:08 UTC (rev 1830)
@@ -232,7 +232,7 @@
break;
case T_EQ:
case T_NEQ:
- Fb(tl, 1, "%sstrcmp(%s, ",
+ Fb(tl, 1, "%sVRT_strcmp(%s, ",
tl->t->tok == T_EQ ? "!" : "", vp->rname);
vcc_NextToken(tl);
ExpectErr(tl, CSTR);
More information about the varnish-commit
mailing list