Commit 09e302b5 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't call functions outside the VRT namespace, even if this means

that we have to wrap strcmp().



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1830 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 770fb201
......@@ -501,6 +501,17 @@ VRT_purge(const char *regexp, int hash)
AddBan(regexp, hash);
}
/*--------------------------------------------------------------------
* 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
*/
......
......@@ -88,6 +88,10 @@ char *VRT_GetHdr(struct sess *, enum gethdr_e where, const char *);
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 *);
......
......@@ -446,6 +446,10 @@ vcl_output_lang_h(struct vsb *sb)
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");
......
......@@ -232,7 +232,7 @@ Cond_String(const struct var *vp, struct tokenlist *tl)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment